http://llvm.org/bugs/show_bug.cgi?id=18894

            Bug ID: 18894
           Summary: inferior process exits due to SIGTRAP after detach on
                    FreeBSD
           Product: lldb
           Version: unspecified
          Hardware: PC
                OS: FreeBSD
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: [email protected]
          Reporter: [email protected]
    Classification: Unclassified

Invoke lldb against some target e.g. /bin/sleep, set a breakpoint, run, then
detach when the breakpoint is hit.  The inferior dumps core with SIGTRAP.
(LLDB r201577)


Typescript:

joule% bin/lldb /bin/sleep 60           
Current executable set to '/bin/sleep' (x86_64).
(lldb) b main
Breakpoint 1: where = sleep`main + 20 at sleep.c:75, address =
0x0000000000400964
(lldb) run
Process 26485 launching
Process 26485 stopped
(lldb) Process 26485 launched: '/bin/sleep' (x86_64)
Process 26485 stopped
* thread #1: tid = 100436, 0x0000000000400964 sleep`main(argc=<unavailable>,
argv=0x00007fffffffd730) + 20 at sleep.c:75, stop reason = breakpoint 1.1
    frame #0: 0x0000000000400964 sleep`main(argc=<unavailable>,
argv=0x00007fffffffd730) + 20 at sleep.c:75
   72           if (argc != 2)
   73                   usage();
   74  
-> 75           if (sscanf(argv[1], "%lf%1s", &d, buf) != 1)
   76                   usage();
   77           if (d > INT_MAX)
   78                   usage();
(lldb) detach
Process 26485 detached
(lldb) Detaching from process 26485
(lldb) quit
joule% ls sleep.core 
sleep.core
joule% bin/lldb /bin/sleep -c sleep.core
Core file '/data/emaste/src/llvm/build/sleep.core' (x86_64) was loaded.
Process 0 stopped
* thread #1: tid = 0, 0x0000000000400965 sleep`main(argc=<unavailable>,
argv=0x00007fffffffd730) + 21 at sleep.c:75, name = 'sleep', stop reason =
signal SIGTRAP
    frame #0: 0x0000000000400965 sleep`main(argc=<unavailable>,
argv=0x00007fffffffd730) + 21 at sleep.c:75
   72           if (argc != 2)
   73                   usage();
   74  
-> 75           if (sscanf(argv[1], "%lf%1s", &d, buf) != 1)
   76                   usage();
   77           if (d > INT_MAX)
   78                   usage();
(lldb)

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
lldb-dev mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev

Reply via email to