Hi all,
this is to ask clarification about the most appropriate tool to debug userspace applications.
I did some research by reading the source code, and I have several doubts.
I drop here a list of points:
1- GDB: there is a gdb_main.c, but it doesn't use ptrace (as I expected). Rather, it relies on kdb to do its operations.
For instance, function kdb_cpu_set_singlestep(...). My impression is that kdb acts only on kernel side (indeed, it directly writes the architectural registers), so it cannot be used by userspace. Is this right?
2- Ptrace: it is implemented here, but it seems that any debugger uses it. How does it possible?
3- LLDB: my impression is that it is, again, a kernel-debugger.
Can you make some clarity about it, please?
Thanks
this is to ask clarification about the most appropriate tool to debug userspace applications.
I did some research by reading the source code, and I have several doubts.
I drop here a list of points:
1- GDB: there is a gdb_main.c, but it doesn't use ptrace (as I expected). Rather, it relies on kdb to do its operations.
For instance, function kdb_cpu_set_singlestep(...). My impression is that kdb acts only on kernel side (indeed, it directly writes the architectural registers), so it cannot be used by userspace. Is this right?
2- Ptrace: it is implemented here, but it seems that any debugger uses it. How does it possible?
3- LLDB: my impression is that it is, again, a kernel-debugger.
Can you make some clarity about it, please?
Thanks