[Lldb-commits] [lldb] [lldb] Select signal-frame CFI at the raw PC (PR #223109)
Minsoo Choo via lldb-commits
lldb-commits at lists.llvm.org
Thu Sep 24 14:12:46 PDT 2026
mchoo7 wrote:
To see why this is needed, look at the change I made to `lldb/test/Shell/Unwind/trap_frame_sym_ctx.test`:
```console
# .---command stderr------------
# | /home/mchoo/llvm/main/lldb/test/Shell/Unwind/trap_frame_sym_ctx.test:18:10: error: CHECK: expected string not found in input
# | # CHECK: frame #1: {{.*}}`tramp
# | ^
# | <stdin>:14:62: note: scanning from here
# | frame #0: 0x000012b33eb0270c trap_frame_sym_ctx.test.tmp`bar
# | ^
# | <stdin>:25:2: note: possible intended match here
# | frame #1: 0x000012b33eb02729 trap_frame_sym_ctx.test.tmp`asm_main + 24
# | ^
# |
# | Input file: <stdin>
# | Check file: /home/mchoo/llvm/main/lldb/test/Shell/Unwind/trap_frame_sym_ctx.test
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | .
# | .
# | .
# | 9: Breakpoint 1: where = trap_frame_sym_ctx.test.tmp`bar, address = 0x000000000000170c
# | 10: (lldb) process launch
# | 11: Process 6410 launched: '/home/mchoo/llvm/main/build/tools/lldb/test/Shell/Unwind/Output/trap_frame_sym_ctx.test.tmp' (x86_64)
# | 12: Process 6410 stopped
# | 13: * thread #1, name = 'trap_frame_sym_c', stop reason = breakpoint 1.1
# | 14: frame #0: 0x000012b33eb0270c trap_frame_sym_ctx.test.tmp`bar
# | check:18'0 { search range start (exclusive)
# | check:18'1 error: no match found in search range
# | 15: trap_frame_sym_ctx.test.tmp`bar:
# | 16: -> 0x12b33eb0270c <+0>: leal (%edi,%edi), %eax
# | 17: 0x12b33eb02710 <+4>: retq
# | 18:
# | 19: trap_frame_sym_ctx.test.tmp`asm_main:
# | 20: 0x12b33eb02711 <+0>: pushq %rbp
# | 21: 0x12b33eb02712 <+1>: movq %rsp, %rbp
# | 22: (lldb) thread backtrace -u
# | 23: * thread #1, name = 'trap_frame_sym_c', stop reason = breakpoint 1.1
# | 24: * frame #0: 0x000012b33eb0270c trap_frame_sym_ctx.test.tmp`bar
# | 25: frame #1: 0x000012b33eb02729 trap_frame_sym_ctx.test.tmp`asm_main + 24
# | check:18'2 ? possible intended match
# | 26: frame #2: 0x000012b33eb02706 trap_frame_sym_ctx.test.tmp`main + 22
# | 27: frame #3: 0x000012bb626005ff libc.so.7`__libc_start1 + 303
# | 28: frame #4: 0x000012b33eb02671 trap_frame_sym_ctx.test.tmp`_start at crt1_s.S:80
# | 29: (lldb) exit
# | check:18'3 } search range end (exclusive)
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1
```
Without this change, the test fails because unwinder doesn't use raw PC but uses the PC-1, so it discovers asm+24 instead of tramp+0
https://github.com/llvm/llvm-project/pull/223109
More information about the lldb-commits
mailing list