Comment #7 on issue 476 by
mdemp...@google.com: Linux stack walker does not
I hacked together something to recognize DW_OP_bregN optionally followed by
DW_OP_deref, and now running dump_syms on
libpthread-2.19.so, I get this
entry for __restore_rt:
STACK CFI INIT 1033f a $r10: $rsp 56 + ^ $r11: $rsp 64 + ^ $r12: $rsp 72 +
^ $r13: $rsp 80 + ^ $r14: $rsp 88 + ^ $r15: $rsp 96 + ^ $r8: $rsp 40 + ^
$r9: $rsp 48 + ^ $rax: $rsp 144 + ^ $rbp: $rsp 120 + ^ $rbx: $rsp 128 + ^
$rcx: $rsp 152 + ^ $rdi: $rsp 104 + ^ $rdx: $rsp 136 + ^ $rsi: $rsp 112 + ^
$rsp: $rsp 160 + ^ .cfa: $rsp 160 + ^ .ra: $rsp 168 + ^
and when I run the sample program and then run minidump_stackwalk, I get a
full stack trace past the signal handler frame:
0 breakpad_signal + 0x2112
rax = 0x000000000000002a rdx = 0x00007fff15c71000
rcx = 0x000000000000002a rbx = 0x00007fff15c715c0
rsi = 0x00007fff15c71130 rdi = 0x0000000000000001
rbp = 0x00007fff15c70ff0 rsp = 0x00007fff15c70fd0
r8 = 0x00007fff15c716c0 r9 = 0x0000000000000000
r10 = 0x0000000000000008 r11 = 0x0000000000000246
r12 = 0x00007fff15c71640 r13 = 0x00007fff15c71980
r14 = 0x0000000000000000 r15 = 0x0000000000000000
rip = 0x0000000000402112
Found by: given as instruction pointer in context
1
libpthread-2.19.so + 0x10340
rbx = 0x00007fff15c715c0 rbp = 0x00000000ffffffff
rsp = 0x00007fff15c71000 r12 = 0x00007fff15c71640
r13 = 0x00007fff15c71980 r14 = 0x0000000000000000
r15 = 0x0000000000000000 rip = 0x00007f6d7b924340
Found by: call frame info
2
libc-2.19.so + 0xc19a0
rax = 0x0000000000000023 rdx = 0x0000000000000000
rcx = 0xffffffffffffffff rbx = 0x00007fff15c715c0
rsi = 0x00007fff15c715b0 rdi = 0x00007fff15c715b0
rbp = 0x00000000ffffffff rsp = 0x00007fff15c715a8
r8 = 0x00007fff15c716c0 r9 = 0x0000000000000000
r10 = 0x0000000000000008 r11 = 0x0000000000000246
r12 = 0x00007fff15c71640 r13 = 0x00007fff15c71980
r14 = 0x0000000000000000 r15 = 0x0000000000000000
rip = 0x00007f6d7b60f9a0
Found by: call frame info
3
libc-2.19.so!__sleep [sleep.c : 137 + 0xb]
rbx = 0x00007fff15c715c0 rbp = 0x00000000ffffffff
rsp = 0x00007fff15c715b0 r12 = 0x00007fff15c71640
r13 = 0x00007fff15c71980 r14 = 0x0000000000000000
r15 = 0x0000000000000000 rip = 0x00007f6d7b60f854
Found by: call frame info
4 breakpad_signal + 0x233c
rbx = 0x0000000000000000 rbp = 0x00007fff15c718a0
rsp = 0x00007fff15c71790 r12 = 0x0000000000401fc0
r13 = 0x00007fff15c71980 r14 = 0x0000000000000000
r15 = 0x0000000000000000 rip = 0x000000000040233c
Found by: call frame info
5
libc-2.19.so!__libc_start_main [libc-start.c : 287 + 0x1a]
rbx = 0x0000000000000000 rbp = 0x0000000000000000
rsp = 0x00007fff15c718b0 r12 = 0x0000000000401fc0
r13 = 0x00007fff15c71980 r14 = 0x0000000000000000
r15 = 0x0000000000000000 rip = 0x00007f6d7b56fec5
Found by: call frame info
6 breakpad_signal + 0x1fe9
rbx = 0x0000000000000000 rbp = 0x0000000000000000
rsp = 0x00007fff15c71970 r12 = 0x0000000000401fc0
r13 = 0x00007fff15c71980 r14 = 0x0000000000000000
r15 = 0x0000000000000000 rip = 0x0000000000401fe9
Found by: call frame info
7 0x7fff15c71978
rbx = 0x0000000000000000 rbp = 0x0000000000000000
rsp = 0x00007fff15c71978 r12 = 0x0000000000401fc0
r13 = 0x00007fff15c71980 r14 = 0x0000000000000000
r15 = 0x0000000000000000 rip = 0x00007fff15c71978
Found by: call frame info
So I'll work on cleaning that up and then mail a CL.