https://llvm.org/bugs/show_bug.cgi?id=28989
Bug ID: 28989 Summary: lldb not sending SIGINT to inferior process Product: lldb Version: unspecified Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P Component: All Bugs Assignee: lldb-...@lists.llvm.org Reporter: pen...@apple.com CC: llvm-bugs@lists.llvm.org Classification: Unclassified Created attachment 16958 --> https://llvm.org/bugs/attachment.cgi?id=16958&action=edit Source file main.c used to reproduce issue When lldb connects to a previously launchd process via pid, issuing ^C (Ctrl-C) in the tty of the inferior process correctly sends SIGINT to the inferior process. At this point, commands to `process handle SIGINT ...` can be used to route the signal as the user wants. However, if the inferior process is launched by lldb itself, either via `lldb ./some_bin` at the command line, or via `target create ...` from within lldb; Ctrl-C is only received by lldb, and cannot be forwarded to the inferior process as a SIGINT. Note that sending a SIGINT to the debugged process with kill(1) or kill(2) will work, but is only a workaround. = Produce executable from attached source = $ clang -g -o main main.c = Attach to pid = # launch ./main in separate tty (lldb) pr at -p NNNNN (lldb) pr ha SIGINT -p true -s false (lldb) c # issue ^C in tty running ./main # ./main process exits via custom handler as intended = Launch from inside lldb = $ lldb (lldb) ta cr ./main (lldb) br s -n main (lldb) r Process NNNNN stopped ... stop reason = signal SIGSTOP [...] (lldb) pr ha SIGINT -p true -s false (lldb) c ^C Process NNNNN stopped ... stop reason = signal SIGSTOP [...] # ^C never results in a SIGINT to inferior process -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs