Various crash diagnostic improvements.

Register dumps, restore backtraces on Mac OS where possible, Mac demangling,
more comments, logging when using an abort hook, and more selective use of
abort hooks.

Linux:

 *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
 Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR) fault addr 0xdeadd00d
 Registers:
     eax: 0x00000000    ebx: 0x5598eff4    ecx: 0x56300000    edx: 0x55992de0
     edi: 0x5597e478    esi: 0xfff1f3c8    ebp: 0xfff1f3e8    esp: 0xfff1f390
     eip: 0x558a82ff eflags: 0x00010246
      cs: 0x00000023     ds: 0x0000002b     es: 0x0000002b     fs: 0x00000007
      gs: 0x00000063     ss: 0x0000002b
 Backtrace:
 	#00 art::Backtrace::Dump(std::ostream&)+0x4c [0x559357ac] (libartd.so)
 	#01 ??+0x3b73b0 [0x559343b0] (libartd.so)
 	#02 [0x55573410] (???)
 	#03 art::LogMessage::~LogMessage()+0x3bd [0x557e2e6d] (libartd.so)
 	#04 ?? [0x8088941] (dex2oatd)
 	#05 ?? [0x80898f7] (dex2oatd)
 	#06 __libc_start_main+0xe6 [0x55b06bd6] (libc.so.6)
 	#07 ?? [0x8085b31] (dex2oatd)

Mac OS:

 *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
 Fatal signal 6 (SIGABRT), code 0 (?)
 Registers:
     eax: 0x00000000    ebx: 0xc008bce0    ecx: 0xc008bc5c    edx: 0x906559c6
     edi: 0xac0f52c0    esi: 0x00000006    ebp: 0xc008bc78    esp: 0xc008bc5c
     eip: 0x906559c6 eflags: 0x00000246
      cs: 0x0000000b     ds: 0x00000023     es: 0x00000023     fs: 0x0000001f
      gs: 0x0000000f     ss: 0x00000023
 Backtrace:
 	#00 art::Backtrace::Dump(std::ostream&) + 40 [0x001ce25a] (libartd.dylib)
 	#01 _ZN3artL22HandleUnexpectedSignalEiP9__siginfoPv + 1051 [0x001cdacb] (libartd.dylib)
 	#02 _sigtramp + 43 [0x90a4559b] (libsystem_c.dylib)
 	#03 0x0 + 4294967295 [0xffffffff] (???)
 	#04 abort + 167 [0x909e0bdd] (libsystem_c.dylib)
 	#05 art::Runtime::Abort() + 322 [0x00192312] (libartd.dylib)
 	#06 art::LogMessage::~LogMessage() + 413 [0x00135a6d] (libartd.dylib)
 	#07 art::dex2oat(int, char**) + 6183 [0x00091927] (dex2oatd)
 	#08 start + 53 [0x0008fb75] (dex2oatd)

Change-Id: I68d215f09723f236889242cfe8aa8819afea4a60
3 files changed
tree: 10313ed9973021fa2c408493cfe9ff877b07beab
  1. build/
  2. jdwpspy/
  3. src/
  4. test/
  5. tools/
  6. .gitignore
  7. Android.mk