summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/functionalities/thread/TestNumThreads.py
diff options
context:
space:
mode:
authorPetar Jovanovic <petar.jovanovic@imgtec.com>2015-11-05 17:19:59 +0000
committerPetar Jovanovic <petar.jovanovic@imgtec.com>2015-11-05 17:19:59 +0000
commit99fba3c1416447737bdc76c751ed8775d4abb106 (patch)
treea823454b443898d4b470b01fd0b7db2e4cf05c62 /lldb/packages/Python/lldbsuite/test/functionalities/thread/TestNumThreads.py
parentf6ecf963902978e78d07e1588eeef20dc62dff05 (diff)
downloadbcm5719-llvm-99fba3c1416447737bdc76c751ed8775d4abb106.tar.gz
bcm5719-llvm-99fba3c1416447737bdc76c751ed8775d4abb106.zip
Add cfi instr for CFA calculation when movpc is expanded to call and pop
This fixes the issue of wrong CFA calculation in the following case: 0x08048400 <+0>: push %ebx 0x08048401 <+1>: sub $0x8,%esp 0x08048404 <+4>: **call 0x8048409 <test+9>** 0x08048409 <+9>: **pop %eax** 0x0804840a <+10>: add $0x1bf7,%eax 0x08048410 <+16>: mov %eax,%ebx 0x08048412 <+18>: call 0x80483f0 <bar> 0x08048417 <+23>: add $0x8,%esp 0x0804841a <+26>: pop %ebx 0x0804841b <+27>: ret The highlighted instructions are a product of movpc instruction. The call instruction changes the stack pointer, and pop instruction restores its value. However, the rule for computing CFA is not updated and is wrong on the pop instruction. So, e.g. backtrace in gdb does not work when on the pop instruction. This adds cfi instructions for both call and pop instructions. cfi_adjust_cfa_offset** instruction is used with the appropriate offset for setting the rules to calculate CFA correctly. Patch by Violeta Vukobrat. Differential Revision: http://reviews.llvm.org/D14021 llvm-svn: 252176
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/functionalities/thread/TestNumThreads.py')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud