kgdb
[Top] [All Lists]

RE: kgdb and modules

To: Douglas Kilpatrick <dougk@xxxxxxxxxxx>
Subject: RE: kgdb and modules
From: Carlo Pagano <carlop@xxxxxxxxx>
Date: Fri, 27 Oct 2000 16:13:09 -0400
Cc: kgdb@xxxxxxxxxxx
Sender: owner-kgdb@xxxxxxxxxxx
Hi,

        In a related story, I am trying to debug a module. I am using
gdbstart -s 4800 -t /dev/ttyS0 rather than the lilo switches. Everything
works fine until I try to add-symbol-file:

I type in

add-symbol-file hcfspkph.o 0xc880a060

It asks me if I want to load the symbol file at text address 0xc880a060

I say yes.

It says Reading symbols from hcfspkph.o ...done

I am using ddd as a front end to gdb 20001020.
The problem is when I try to open a source file (to set a breakpoint), I see
all the necessary source files in the window but when I try to open one of
the module ones it says:

Line 1 of "/x/y/x/file.c" is at address 0xc8843db0 <function_name> but
contains no code.

Any help would be appreciated.

Carlo


From: Douglas Kilpatrick [mailto:dougk@xxxxxxxxxxx]
Sent: Friday, October 27, 2000 1:23 PM
To: Brian Boerner
Cc: kgdb@xxxxxxxxxxx
Subject: Re: kgdb and modules


On Fri, 27 Oct 2000, Brian Boerner wrote:

> I'm using kgdb and want to debug a module that's causing an oops.

>From system:

# insmod -m foo.o 2>&1 | grep '\.text\>'

>From gdb:

(gdb) add-symbol-file ../foo.o 0xc482b050

where 0xc482b050 is the address given for the .text segment by the insmod
command.

You will want to use gdb version 5 if you want to be able to look at
global variables, and of course, compile with -g.


Doug
-- 
dougk@xxxxxxxxxxx
dkilpatr@xxxxxxx


<Prev in Thread] Current Thread [Next in Thread>