x86_64: rdstc

arm: attempt pmccntr, but didn't work, TODO why: no QEMU support?
This commit is contained in:
Ciro Santilli
2018-04-15 12:40:01 +01:00
parent ae780f6750
commit 51e31cdc29
6 changed files with 118 additions and 4 deletions

View File

@@ -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