Ejemplo n.º 1
0
        public void DumpException(ulong ObjRef)
        {
            var exception = m_heap.GetExceptionObject(ObjRef);

            if (exception == null)
            {
                WriteLine("No expeception found at {0:%p}", ObjRef);
                WriteLine("");
                return;
            }
            WriteLine("Address: {0:%p}", ObjRef);
            WriteLine("Exception Type: {0}", exception.Type.Name);
            WriteLine("Message: {0}", exception.Message);
            Write("Inner Exception: ");
            if (exception.Inner == null)
            {
                WriteLine("(none)");
            }
            else
            {
                WriteLine("<link cmd=\"!wpe {0:%p}\">{0:%p}</link> {1} {2}</link>", exception.Inner.Address,
                          exception.Inner.Type.Name.Replace("<", "&lt;").Replace(">", "&gt;"), exception.Inner.Message);
            }
            WriteLine("Stack:");
            WriteLine("{0}", DumpStack(exception.StackTrace, m_runtime.PointerSize));
            WriteLine("HResult: {0:x4}", exception.HResult);
            WriteLine("");
        }
Ejemplo n.º 2
0
 /// <summary>
 ///     Returns a  wrapper around a System.Exception object (or one of its subclasses).
 /// </summary>
 /// <param name="objRef">The object reference.</param>
 /// <returns>IClrException.</returns>
 /// <inheritdoc />
 public IClrException GetExceptionObject(ulong objRef) => Converter.Convert(Heap.GetExceptionObject(objRef));
Ejemplo n.º 3
0
 public void GetExceptionObject(ulong addr, out IMDException ppExcep)
 {
     ppExcep = new MDException(m_heap.GetExceptionObject(addr));
 }