Do you get the debugability automatically? or you have to code to support the debugger?
Do you get the debugability automatically? or you have to code to support the debugger?
here are the instructions:
> Sam Rose Julia Evans • 2 years ago
> If you haven't yet experienced the joys of remote debugging with QEMU and gdb, you should totally try it out.
> Run qemu with the flag "-monitor stdio" and that should give you a terminal into QEMU. Then in that terminal, run "gdbserver" and it'll open up a gdb server on port 1234.
> Then, in another terminal, open gdb and run "target remote :1234" to connect to the gdbserver running in qemu.
> At first you'll find that gdb has no fucking idea what's going on. This is because it has no symbol data, so you'll need to load your kernel binary into it with the "file" command.
> After loading your kernel symbol table, you should be free to roam around the inside of your kernel using gdb as normal. If gdb isn't familiar to you, I personally really enjoyed Beej's Quick Guide to GDB: http://beej.us/guide/bggdb/ (pretty much everything by
I just wrote a guide that should make it straightforward: http://os.phil-opp.com/set-up-gdb.html
- printf to serial port
- LEDs attached to GPIOs