[Lldb-commits] [PATCH] D63667: Support __kernel_rt_sigreturn in frame initialization

Jan Kratochvil via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Jun 28 09:11:29 PDT 2019


jankratochvil added a comment.

When I compare the backtrace from GDB and LLDB (on x86_64, I haven't tried aarch64 as x86_64 is much faster=easier to handle):

      frame #2: 0x0000000000401195 sigtest2`handler(sig=6) at sigtest2.c:9:5
  #2  0x0000000000401195 in handler (sig=6) at sigtest2.c:9
  
      frame #3: 0x00007f5fd888ef00 libc.so.6`.annobin_sigaction.c + 16
  #3  <signal handler called> => 0x00007f5fd888ef00 <+0>: mov    $0xf,%rax
  
      frame #4: 0x00007f5fd888ee75 libc.so.6`__GI_raise at internal-signals.h:84:10
  #4  __GI_raise (sig=sig at entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50 $1 = 0x7f5fd888ee75
  
      frame #5: 0x00007f5fd888ee5e libc.so.6`__GI_raise(sig=2) at raise.c:48
  Missing in GDB
  
      frame #6: 0x00007f5fd8879895 libc.so.6`__GI_abort at abort.c:79:7
  #5  0x00007f5fd8879895 in __GI_abort () at abort.c:79

That LLDB frame #5 is a bit bogus:

  (lldb) down
  frame #5: 0x00007f5fd888ee5e libc.so.6`__GI_raise(sig=2) at raise.c:48
     45  	
     46  	  int ret = INLINE_SYSCALL (tgkill, 3, pid, tid, sig);
     47  	
  -> 48  	  __libc_signal_restore_set (&set);
     49  	
     50  	  return ret;
     51  	}
  (lldb) disas
  libc.so.6`__GI_raise:
  ...
      0x7f5fd888ee5b <+299>: movl   %eax, %r8d
      0x7f5fd888ee5e <+302>: movl   $0x8, %r10d
      0x7f5fd888ee64 <+308>: xorl   %edx, %edx
      0x7f5fd888ee66 <+310>: movq   %r9, %rsi
      0x7f5fd888ee69 <+313>: movl   $0x2, %edi
      0x7f5fd888ee6e <+318>: movl   $0xe, %eax
      0x7f5fd888ee73 <+323>: syscall 
  ->  0x7f5fd888ee75 <+325>: movq   0x108(%rsp), %rax
      0x7f5fd888ee7d <+333>: xorq   %fs:0x28, %rax

That `0x00007f5fd888ee5e` is not even shown by `disas`, also it is no point of a return from any call.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D63667/new/

https://reviews.llvm.org/D63667





More information about the lldb-commits mailing list