mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-26 19:51:35 +01:00
x86_64: rdstc
arm: attempt pmccntr, but didn't work, TODO why: no QEMU support?
This commit is contained in:
@@ -682,6 +682,8 @@ tmux just makes things even more fun by allowing us to see both terminals at onc
|
||||
|
||||
=== GDB step debug kernel module
|
||||
|
||||
http://stackoverflow.com/questions/28607538/how-to-debug-linux-kernel-modules-with-qemu/44095831#44095831
|
||||
|
||||
Loadable kernel modules are a bit trickier since the kernel can place them at different memory locations depending on load order.
|
||||
|
||||
So we cannot set the breakpoints before `insmod`.
|
||||
@@ -730,8 +732,6 @@ Just don't forget to remove your breakpoints after `rmmod`, or they will point t
|
||||
|
||||
TODO: why does `break work_func` for `insmod kthread.ko` not break the first time I `insmod`, but breaks the second time?
|
||||
|
||||
See also: http://stackoverflow.com/questions/28607538/how-to-debug-linux-kernel-modules-with-qemu/44095831#44095831
|
||||
|
||||
==== GDB module_init
|
||||
|
||||
TODO find a convenient method.
|
||||
@@ -2209,7 +2209,7 @@ Error occurred in Python command: Cannot access memory at address 0xbf00010c
|
||||
so we need to either:
|
||||
|
||||
* <<gdb-module_init>>
|
||||
* <<kernel-module-trace-to-source-line>> post-mortem method
|
||||
* <<kernel-module-stack-trace-to-source-line>> post-mortem method
|
||||
|
||||
[[dump_stack]]
|
||||
==== dump_stack kernel module
|
||||
|
||||
Reference in New Issue
Block a user