mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-28 12:34:26 +01:00
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.
This commit is contained in:
37
README.adoc
37
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.
|
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
|
=== Automatic startup commands
|
||||||
|
|
||||||
When debugging a module, it becomes tedious to wait for build and re-type:
|
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
|
== KGDB
|
||||||
|
|
||||||
|
TODO: only working with <<graphic-mode>>. 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.
|
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.
|
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://github.com/torvalds/linux/blob/v4.9/Documentation/DocBook/kgdb.tmpl
|
||||||
* https://stackoverflow.com/questions/22004616/qemu-kernel-debugging-with-kgdb/44197715#44197715
|
* 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
|
=== KGDB kernel modules
|
||||||
|
|
||||||
In QEMU:
|
In QEMU:
|
||||||
@@ -1058,11 +1086,6 @@ Known quirks of the supported architectures are documented in this section.
|
|||||||
|
|
||||||
=== arm
|
=== 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
|
==== arm shutdown
|
||||||
|
|
||||||
https://stackoverflow.com/questions/31990487/how-to-cleanly-exit-qemu-after-executing-bare-metal-program-without-user-interve
|
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
|
== X11
|
||||||
|
|
||||||
Only tested successfully in `x86_64`.
|
Only tested successfully in `x86_64`. Requires <<graphic-mode>>.
|
||||||
|
|
||||||
Build:
|
Build and run:
|
||||||
|
|
||||||
....
|
....
|
||||||
./build -b br2_x11
|
./build -b br2_x11
|
||||||
|
|||||||
Reference in New Issue
Block a user