From 8b77fe703b8b48273ae991df7994e0c7b023f0eb Mon Sep 17 00:00:00 2001 From: Ciro Santilli Date: Sun, 8 Apr 2018 18:16:35 +0100 Subject: [PATCH] readme: kgdb only working in x86 graphic mode Not sure if it ever worked outside, but I guess it didn't. Fix should be simple, but not important enough. --- README.adoc | 37 ++++++++++++++++++++++++++++++------- 1 file changed, 30 insertions(+), 7 deletions(-) diff --git a/README.adoc b/README.adoc index dc49a55..7ade5f1 100644 --- a/README.adoc +++ b/README.adoc @@ -388,6 +388,10 @@ This makes things a bit more reproducible, since the microsecond in which you pr + But on the other hand maybe you are interested in observing the interrupts generated by key presses. +=== arm graphic mode + +TODO: how to see the terminal on the graphic window, just like happens on x86? + === Automatic startup commands When debugging a module, it becomes tedious to wait for build and re-type: @@ -842,6 +846,8 @@ See also: https://github.com/cirosantilli/linux-kernel-module-cheat/issues/19 == KGDB +TODO: only working with <>. Without it, nothing shows on the terminal. So likely something linked to the option `console=ttyS0`. + KGDB is kernel dark magic that allows you to GDB the kernel on real hardware without any extra hardware support. It is useless with QEMU since we already have full system visibility with `-gdb`, but this is a good way to learn it. @@ -887,6 +893,28 @@ See also: * https://github.com/torvalds/linux/blob/v4.9/Documentation/DocBook/kgdb.tmpl * https://stackoverflow.com/questions/22004616/qemu-kernel-debugging-with-kgdb/44197715#44197715 +=== KGDB ARM + +GDB not connecting to KGDB in ARM. Possibly linked to `-serial stdio`. See also: https://stackoverflow.com/questions/14155577/how-to-use-kgdb-on-arm + +Main shell just falls on: + +.... +Entering kdb (current=0xf8ce07d3, pid 1) due to Keyboard Entry +kdb> +.... + +and GDB shell gives: + +.... +Reading symbols from vmlinux...done. +Remote debugging using localhost:1234 +Ignoring packet error, continuing... +warning: unrecognized item "timeout" in "qSupported" response +Ignoring packet error, continuing... +Remote replied unexpectedly to 'vMustReplyEmpty': timeout +.... + === KGDB kernel modules In QEMU: @@ -1058,11 +1086,6 @@ Known quirks of the supported architectures are documented in this section. === arm -TODOs: - -* only managed to run in the terminal interface (but weirdly a blank QEMU window is still opened) -* GDB not connecting to KGDB. Possibly linked to `-serial stdio`. See also: https://stackoverflow.com/questions/14155577/how-to-use-kgdb-on-arm - ==== arm shutdown https://stackoverflow.com/questions/31990487/how-to-cleanly-exit-qemu-after-executing-bare-metal-program-without-user-interve @@ -1316,9 +1339,9 @@ For example, when porting a benchmark to Buildroot, you can first use QEMU's KVM == X11 -Only tested successfully in `x86_64`. +Only tested successfully in `x86_64`. Requires <>. -Build: +Build and run: .... ./build -b br2_x11