JosephTremoulet added a comment.
Herald added subscribers: wuzish, MaskRay.

> That LLDB frame #5 is a bit bogus

Thanks for taking a look at this.  I'm trying to reproduce what you're seeing 
and failing.  This is what I see, in a fedora:latest docker container on an 
Ubuntu host on an x86_64 machine, with my patch applied to lldb:

  $ gcc -g -O0 -o sigtest main.c
  $ lldb ./sigtest
  (lldb) target create "./sigtest"
  Current executable set to './sigtest' (x86_64).
  (lldb) breakpoint set -f main.c -l 6
  Breakpoint 1: where = sigtest`handler + 11 at main.c:7:5, address = 
0x0000000000401171
  (lldb) run
  Process 149148 launched: '/home/josepht/scratch/sigtest' (x86_64)
  Process 149148 stopped
  * thread #1, name = 'sigtest', stop reason = signal SIGABRT
      frame #0: 0x00007ffff7e38e75 libc.so.6`__GI_raise + 325
  libc.so.6`__GI_raise:
  ->  0x7ffff7e38e75 <+325>: movq   0x108(%rsp), %rax
      0x7ffff7e38e7d <+333>: xorq   %fs:0x28, %rax
      0x7ffff7e38e86 <+342>: jne    0x7ffff7e38eac            ; <+380>
      0x7ffff7e38e88 <+344>: movl   %r8d, %eax
  (lldb) continue
  Process 149148 resuming
  Process 149148 stopped
  * thread #1, name = 'sigtest', stop reason = breakpoint 1.1
      frame #0: 0x0000000000401171 sigtest`handler(sig=6) at main.c:7:5
     4   
     5    void handler(int sig)
     6    {
  -> 7        printf("Set a breakpoint here.\n");
     8        exit(0);
     9    }
     10  
  (lldb) bt
  * thread #1, name = 'sigtest', stop reason = breakpoint 1.1
    * frame #0: 0x0000000000401171 sigtest`handler(sig=6) at main.c:7:5
      frame #1: 0x00007ffff7e38f00 libc.so.6`.annobin_sigaction.c + 16
      frame #2: 0x00007ffff7e38e75 libc.so.6`__GI_raise + 325
      frame #3: 0x00007ffff7e23895 libc.so.6`__GI_abort + 295
      frame #4: 0x000000000040118e sigtest`abort_caller at main.c:12:5
      frame #5: 0x00000000004011c2 sigtest`main at main.c:23:5
      frame #6: 0x00007ffff7e24f33 libc.so.6`__libc_start_main + 243
      frame #7: 0x00000000004010ae sigtest`_start + 46
  (lldb) frame select 2
  frame #2: 0x00007ffff7e38e75 libc.so.6`__GI_raise + 325
  libc.so.6`__GI_raise:
  ->  0x7ffff7e38e75 <+325>: movq   0x108(%rsp), %rax
      0x7ffff7e38e7d <+333>: xorq   %fs:0x28, %rax
      0x7ffff7e38e86 <+342>: jne    0x7ffff7e38eac            ; <+380>
      0x7ffff7e38e88 <+344>: movl   %r8d, %eax
  (lldb) frame select 3
  frame #3: 0x00007ffff7e23895 libc.so.6`__GI_abort + 295
  libc.so.6`__GI_abort:
  ->  0x7ffff7e23895 <+295>: movq   %fs:0x10, %rdx
      0x7ffff7e2389e <+304>: cmpq   %rdx, 0x19f493(%rip)      ; lock + 8
      0x7ffff7e238a5 <+311>: je     0x7ffff7e238ed            ; <+383>
      0x7ffff7e238a7 <+313>: movl   $0x1, %esi

My frame 2 seems to correspond to your frame 4, and then my frame 3 seems to 
correspond to your frame 6, without the bogus frame in between.  Do I have the 
wrong repro steps or something?

Thanks,
-Joseph


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D63667



_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to