Sending Signals to LLDB

I use LLDB as a standalone debugger, and I was wondering if there is a way to send signals to LLDB, the same way you can do it in GDB (e.g. SIGINT signal)

+4
source share
1 answer

Look at the commands process signaland process handle. for example with a program such as

#include <signal.h>
#include <stdio.h>
#include <unistd.h>

void handler (int in)
{
    puts ("signal handled");
}

int main()
{
    signal (SIGUSR1, handler);
    while (1) 
        sleep (1);
}

lldb ( lldb - lldb, / , lldb), lldb, , SIGUSR1 ( , continue), . .

(lldb) pro handle -s false SIGUSR1
NAME        PASS   STOP   NOTIFY
==========  =====  =====  ======
SIGUSR1     true   false  true 
(lldb) pro signal SIGUSR1
Process 6628 stopped and restarted: thread 1 received signal: SIGUSR1

signal handled , , .

+5

All Articles