June 2017
Intermediate to advanced
478 pages
13h 14m
English
The preceding example works in cases where the code you are interested in is executed when the system is fully booted. If you need to get in early, you can tell the kernel to wait during boot by adding kgdbwait to the command line, after the kgdboc option:
kgdboc=ttyO0,115200 kgdbwait
Now, when you boot, you will see this on the console:
[ 1.103415] console [ttyO0] enabled[ 1.108216] kgdb: Registered I/O driver kgdboc.[ 1.113071] kgdb: Waiting for connection from remote gdb...
At this point, you can close the console and connect from GDB in the usual way.
Read now
Unlock full access