Listing 7. User-Space gdb Dialogue Running Modified Simple Module

[[email protected] /root]# cd /usr/src/linux
[[email protected] linux]# ./gdb vmlinux
GNU gdb 20000204
Copyright 2000 Free Software Foundation, Inc.
GDB is free software, covered by the
GNU General Public License, and you are
welcome to change it and/or distribute copies
of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.
Type "show warranty" for details.
This GDB was configured as
(gdb) rmt
breakpoint () at gdbstub.c:1240
1240    }
(gdb) add-symbol-file /root/simple.o 0xc480004c
add symbol table from file "/root/simple.o" at
        .text_addr = 0xc480004c
(y or n) y
Reading symbols from /root/simple.o...done.
(gdb) c

Program received signal SIGTRAP, Trace/breakpoint trap.
init_module () at simple.c:34
34      printk(KERN_ALERT
 "\nThe kernel module %s has been loaded.\n", MOD);
(gdb) s
printk (fmt=0xc4800100 "<1>\nThe kernel module %s has
    been loaded.\n");
    at printk.c:263
263           spin_lock_irqsave(&console_lock, flags);
(gdb) s
264 va_start(args, fmt);