Send Ctrl-C to Application in LLDB

I have a CLI application that crashes during completion (after submit Ctrl- C)

Pressing Ctrl- Cin lldb naturally pauses execution.

Then I try: (lldb) SIGINT (lldb) continues

But it doesn't actually do anything to abort the application.

Also tried: (lldb) process signal 2

+3


source to share


2 answers


The debugger uses ^ C to interrupt the target, so it assumes that you really don't want ^ C to propagate to the target. You can change this behavior using the "process handler" command:

(lldb) SIGINT process handler -p true



by telling lldb to "pass" SIGINT to the process.

+6


source


The easiest way I've found is to just submit the process SIGINT

directly. Take the pid of the debuggee process (which process status

will show you) and run

kill -INT <pid>

      



from another terminal.

0


source







All Articles