[Kgdb-bugreport] Problem getting kgdb to read kernel symbols. addresses shifted?
warlord at MIT.EDU
Mon Oct 1 14:44:06 EDT 2007
Dave Anderson <anderson at redhat.com> writes:
>> 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.
> Right, crash was updated in version 4.0-4.5 to allow the use
> of /proc/kallsyms as an alternative to the System.map file,
> as well as adding a new --reloc command line argument. After
> bringing up the vmlinux file in gdb (with the "wrong" addresses),
> all of the minimal_symbol data structures in the gdb module are
> back-patched with the /proc/kallsyms values:
> It seems the benefit of configuring the kernel that way is debatable,
> and I will do all I can to convince the RHEL-6 and beyond kernel
> maintainers from doing it that way in the future. But Fedora goes
> its own way. Seems totally lame to issue a bogus System.map file
Well, this is kgdb, so "/proc/kallsyms" is on the target machine,
not the host machine. So, 'gdb' cannot read /proc/kallsyms, because,
well, it's not local.
However, I AM building my own kernel -- so I can certainly reconfigure
it as necessary. What do I need to do to reconfigure my kernel to
run at the same place it was built for? I.e., what's changing the
runtime from 16M to 4M and how do I make it consistent?
Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
Member, MIT Student Information Processing Board (SIPB)
URL: http://web.mit.edu/warlord/ PP-ASEL-IA N1NWH
warlord at MIT.EDU PGP key available
More information about the kexec