gdb symbol is wrong when using separate debug info file

Daniel Jacobowitz drow@mvista.com
Fri Jul 18 04:35:00 GMT 2003


On Thu, Jul 17, 2003 at 11:21:25PM -0500, Xiong Jiang wrote:
> Hi, all,
> 
> I met a problem that gdb gets wrong address for global variables
> when debug kernel module and load symbol from separate debug information
> file.
> 
> I am not sure if it is gdb problem or related to elfutils also, because
> it only happends when debug information is stripped out separately.
> 
> In order to debug kernel modules which are too big to include the debug
> information in the module .o files, I am using a redhat 8.0 system with
> 
> gdb-5.3post-1.20021129.37
> elfutils-0.84-3
> elfutils-libelf-0.84-3
> gcc-3.2-7
> 
> Basically the problem is that gdb gets wrong with the address of global
> variables. Following is a very simple example:

I recommend you try keeping two copies of the module and pointing GDB
at the one with debug info, instead.  No one's ever tested eu-strip -f
on an unlinked module AFAIK.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer



More information about the Gdb mailing list