gdb: mac ctrl c make Terminal hanging

Viewed 447

My os is MACOS. When I debug the python source code with gdb --pid,I type the c, but I forget make a breakpoint, so i want to go back the gdb prompt with ctrl+c, but when i type ctrl+c, the terminal is hung, then i can't type anything. At last I have to close the terminal window, but it's ok with gdb program command. And then, I write a simple code,

#include <stdio.h>

int main(int argc, char** argv){
    int num = 2;
    while(1){
        num ++;
    }
    return 1;
}

then debug with gdb --pid, it's the same problem.

(gdb) c

Continuing.

^Cdarwin-nat.c:1356: internal-error: void darwin_interrupt(struct target_ops *, ptid_t): Assertion `!inf->priv->no_ptrace' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.

Quit this debugging session? (y or n)
1 Answers

Try to use lldb . lldb is advised to use to debug code on OSX. Just let me know if lldb solves this problem

Related