gdbserver
gdbserver copied to clipboard
enable gdbserver debug in c/c++ source
Request:
// same as gdbserver, wait gdb remote connect debug.
int main()
{
gdb_init(1234);
// stop
gdb_end();
}
Some time,
- manual command launch program not inconvenient;
- --attach pid also not inconvenient;
I want enable gdbserver debug in source by c/c++ API.
You could do it by system
: https://github.com/vadimcn/codelldb/blob/master/MANUAL.md#attaching-debugger-to-the-current-process-c
Centainly, providing an API is better, but I don't have time to do it. You can try it and send a PR!