In GDB remote debugging, monitor <verb>
sends the command <verb>
to be executed by the remote GDB server. In this particular case, the GDB server is in fact the one supplied by JLink for their JTAG debugger, to debug embedded software running on real hardware. These commands are extensively used to control the target CPU, such as resetting it using monitor reset
.
I am running a bare-metal executable compiled using clang/LLVM (with libc++). Therefore, I would prefer to use LLDB with that executable, hoping to get better support for pretty-printing of library types and compiler-generated internal structures.
LLDB does support the GDB-remote debugging protocol. But how do I send the equivalent of GDB's monitor
commands to the server?
This is answered in a mailing list post. Basically, say you want to send the reset halt
command, in GDB you'd say:
monitor reset halt
In LLDB you can do the same with:
process plugin packet monitor reset halt