GEM5 gdb debug

Improve GEM5 documentation in general.

Fix documentation for x86 kernel module debugging example, fop_write had been made static,
and use timer.ko instead of fops which is more reliable and fun.
This commit is contained in:
Ciro Santilli
2018-02-22 09:42:17 +00:00
parent ff71f19fa6
commit 6420c31986
3 changed files with 77 additions and 33 deletions

View File

@@ -17,12 +17,14 @@ See also:
#include <linux/module.h>
#include <linux/timer.h>
static void callback(struct timer_list *data);
/* We would normally mark this as static and give it a more generic name.
* But let's do it like this this time for the sake of our GDB kernel module step debugging example. */
void lkmc_timer_callback(struct timer_list *data);
static unsigned long onesec;
DEFINE_TIMER(mytimer, callback);
DEFINE_TIMER(mytimer, lkmc_timer_callback);
static void callback(struct timer_list *data)
void lkmc_timer_callback(struct timer_list *data)
{
pr_info("%u\n", (unsigned)jiffies);
mod_timer(&mytimer, jiffies + onesec);