This is the mail archive of the
gdb-prs@sources.redhat.com
mailing list for the GDB project.
gdb/9: Linux kernel loadable modules
- To: gdb-gnats at sources dot redhat dot com
- Subject: gdb/9: Linux kernel loadable modules
- From: felix at allot dot com
- Date: 16 Nov 2000 12:41:25 -0000
- Cc: akale at veritas dot com
- Reply-To: felix at allot dot com
>Number: 9
>Category: gdb
>Synopsis: Linux kernel loadable modules
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Nov 16 04:48:00 PST 2000
>Closed-Date:
>Last-Modified:
>Originator: felix@allot.com
>Release: 5.0
>Organization:
>Environment:
linux-2.0.35, libc5, i386, modutils-2.1.121/2.3.19,
gdb 20000204
>Description:
I'm trying to debug loadable kernel module. The module
is loaded into kernel with "insmod -m". Map file insmod
generates is used to provide paremeters to add-symbol-file
gdb command. Module is compiled with -g and without
-fomit-frame-pointer options.
The problem is to see the values of global variables defined
in the module. The debugger complains that the address of
variable is unknown. It is possible however to view
variables' values using their addresses from the map file.
Loading module in debugger at address 0, i.e. by
"add-symbol-file foo.o 0" has the same effect, i.e
the address of variable is unknown.
I suspect that only uninitialized variables are affected,
though I'm not sure.
>How-To-Repeat:
Try debugging 2.0.x kernel module on libc5 system.
I've used a modified version of loadmodule.sh script
provided by Amit S. Kale at http://kgdb.sourceforge.net/
to extract a relevant information from module map file.
Make sure that .moduse section that insmod adds to map file
is not given to add-symbol-file.
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: