[Kgdb-bugreport] Problem getting kgdb to read kernel symbols. addresses shifted?

Vivek Goyal vgoyal at in.ibm.com
Sun Sep 30 01:38:14 EDT 2007


On Fri, Sep 28, 2007 at 05:40:33PM -0600, Eric W. Biederman wrote:
> Derek Atkins <warlord at MIT.EDU> writes:
> 
> > Well, gdb agrees with System.map, so I'm sure that gdb itself is
> > okay.  It's certainly possible that that the kgdb stub is weird,
> > but /proc/kallsyms doesn't match System.map, and THAT'S what's
> > confusing me most of all.
> 
> Ok.  So we must have a relocatable kernel that figures it has been
> relocated.  Interesting.  
> 
> What is your bootloader?
> What is your kernel version?
> What is your kernel config?
> 
> The only time I would expect to see what you are seeing is if
> you are debugging the kdump kernel, which doesn't sound like
> the case.
> 
> If we actually have a truly offset kernel then while things
> may not be perfect this is at least expected.  I don't think
> I have heard of anyone handling this case very well.
> 

Hi Eric and others,

I think we might be running into the issues because i386, FC7 relocatable
kernel has been compiled for 16MB physical address but effectively it
runs at 4MB physical address. So kernel does not run at compiled address
and any kind of debugging tools reading symbol address from System.map
or rom vmlinux will fail as run time symbol addresses are different.

/proc/kallsyms should help though. This is one problem with shift in run
time virtual address while relocating the kernel. We should be running kernel
at compiled address to be able to debug it. Or enable any tools to parse
/proc/kallsyms to read the shift in symbol addresses and adjust accordingly.

Thanks
Vivek



More information about the kexec mailing list