remove some more kernel_module- references

make kgdb x86_64 work once again, now pending a decent serial refactor
This commit is contained in:
Ciro Santilli 六四事件 法轮功
2018-10-31 00:00:00 +00:00
parent 4f47491482
commit 911dd8be32
4 changed files with 24 additions and 10 deletions

View File

@@ -1317,7 +1317,7 @@ Useless, but a good way to show how hardcore you are. Disable `lx-symbols` with:
From inside guest:
....
insmod /fops.ko
insmod /timer.ko
cat /proc/modules
....
@@ -1336,7 +1336,8 @@ And then tell GDB where the module was loaded with:
....
Ctrl-C
add-symbol-file ../kernel_modules-1.0/fops.ko 0xfffffffa00000000
add-symbol-file ../../../rootfs_overlay/x86_64/timer.ko 0xffffffffc0000000
0xffffffffc0000000
....
Alternatively, if the module panics before you can read `/proc/modules`, there is a <<pr_debug>> which shows the load address:
@@ -1353,6 +1354,8 @@ And then search for a line of type:
[ 84.877482] 0xfffffffa00000000 .text
....
Tested on 4f4749148273c282e80b58c59db1b47049e190bf + 1.
=== GDB step debug early boot
TODO sucessfully debu the very first instruction that the Linux kernel runs, before `start_kernel`!
@@ -1834,8 +1837,6 @@ Bibliography:
== KGDB
TODO: only working with <<qemu-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.
It is useless with QEMU since we already have full system visibility with `-gdb`, but this is a good way to learn it.