hanchenye-llvm-project/lldb
Jason Molenda 91e428bc90 Revert one part of Ashok Thirumurthi's patch from September 16, r190812.
In those set of patches, Ashok changed Module::ResolveSymbolContextForAddress 
so that if it failed to find a symbol for a pc, it could back up
the pc value by 1 and re-search for a symbol.

His change to RegisterContextLLDB.cpp partially duplicates that
behavior but it also removes the separate case where we find a
Symbol for the pc address but it's the wrong symbol -- we need to
handle this as well as the lookup-by-pc-finds-no-symbol case.

The most obvious fallout from this regression was that lldb on
Mac OS X couldn't backtrace past __assert_rtn() which tail-calls 
abort().  e.g.

(lldb) bt
* thread #1: tid = 0x5d6ea1, 0x00007fff8ee80866 libsystem_kernel.dylib`__pthread_kill + 10, queue = 'com.apple.main-thread', stop reason = signal SIGABRT
  * frame #0: 0x00007fff8ee80866 libsystem_kernel.dylib`__pthread_kill + 10
    frame #1: 0x00007fff8eb5835c libsystem_pthread.dylib`pthread_kill + 92
    frame #2: 0x00007fff8852ab1a libsystem_c.dylib`abort + 125
    frame #3: 0x00007fff884f49bf libsystem_c.dylib`__assert_rtn + 321
    frame #4: 0x0000000100000f2c a.out`main + 124

(lldb) dis -c 3 -s 0x7fff884f49b3
libsystem_c.dylib`__assert_rtn + 309:
   0x7fff884f49b3:  movq   %rax, -0x11b96242(%rip)   ; gCRAnnotations + 8
   0x7fff884f49ba:  callq  0x7fff8854fd2c            ; symbol stub for: abort

libsystem_c.dylib`basename:
   0x7fff884f49bf:  pushq  %rbp
(lldb) 

in this case, __assert_rtn() is immediately followed by basename() and 
the changes in r190812 didn't back up the pc value to get the correct
function name / unwind info.

<rdar://problem/15367233> 

llvm-svn: 197655
2013-12-19 04:32:42 +00:00
..
docs Test commit. Capitalize 'os'. 2013-11-20 12:35:52 +00:00
examples Fix to only update the offset for concrete registers (ones that don't have 'slice' or 'composite' key/value pairs). 2013-12-13 00:35:21 +00:00
include Move the ivars / logic of SBQueue into a QueueImpl class and 2013-12-14 01:14:45 +00:00
lib Bug #18214 - Adds LLVMObjCARCOpts.a to Makefile linkage for liblldb. 2013-12-11 21:55:00 +00:00
lldb.xcodeproj Added missing header files to the Xcode project. 2013-12-17 21:42:58 +00:00
lldb.xcworkspace Move the performance test cases into their own project. 2013-03-18 23:05:00 +00:00
resources Tweak exports list so lldb will still build correctly when 2013-11-21 22:23:46 +00:00
scripts Add new Queue, QueueItem, Queuelist, SBQueue, SBQueueItem classes to represent 2013-12-13 00:29:16 +00:00
source Revert one part of Ashok Thirumurthi's patch from September 16, r190812. 2013-12-19 04:32:42 +00:00
test Correctly set the working directory when launching processes for both local and remote targets. 2013-12-13 19:18:59 +00:00
tools Test commit: added comment to tools makefile. 2013-12-14 07:21:51 +00:00
utils LUI: Fix some issues causing crashes in the source view 2013-10-23 01:18:21 +00:00
www Update cmake build instruction to compile LLVM in C++11 mode 2013-12-09 18:13:47 +00:00
.arcconfig Adding .arcconfig file to LLDB to allow using Phabricator for reviews 2013-05-23 20:21:28 +00:00
.gitignore
CMakeLists.txt Remove the hardcoded declaration to the Python include path. Thanks to Kal Conley for the patch 2013-11-15 10:32:40 +00:00
INSTALL.txt Update INSTALL.txt to mention LLDB builds on Linux with GCC or Clang. 2013-02-21 22:37:18 +00:00
LICENSE.TXT
Makefile Respect SDKROOT in lldb Makefile 2013-09-18 16:32:28 +00:00