Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* "gdb vmlinux" gives wrong symbol addresses
@ 2006-08-18 18:38 Vivek Goyal
  2006-08-18 18:48 ` Daniel Jacobowitz
  0 siblings, 1 reply; 11+ messages in thread
From: Vivek Goyal @ 2006-08-18 18:38 UTC (permalink / raw)
  To: gdb; +Cc: Dave Anderson

Hi,

I am trying to run gdb with kernel vmlinux to find out symbol addresses.

#> gdb vmlinux
(gdb) p &linux_banner

If I link my vmlinux with linker option --emit-relocs then gdb seems
to be giving wrong values for the symbols.

Following are two outputs.

vmlinux linked without option --emit-relocs

(gdb) p &linux_banner
$1 = (char (*)[162]) 0xc0344000

vmlinux linked with option --emit-relocs

(gdb) p &linux_banner
$1 =  (char (*)[162]) 0x8068a000

Above address is not a kernel address at all.

I have compiled my kernel with -g for i386 machine. I am using gdb
version 6.3

Any suggestions regarding where the anomaly is will help.

Thanks
Vivek


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2006-08-23 18:36 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-08-18 18:38 "gdb vmlinux" gives wrong symbol addresses Vivek Goyal
2006-08-18 18:48 ` Daniel Jacobowitz
2006-08-18 19:15   ` Vivek Goyal
2006-08-21  1:38   ` Alan Modra
2006-08-21  1:54     ` Daniel Jacobowitz
2006-08-21  3:24       ` Alan Modra
2006-08-23 17:33         ` Jan Kratochvil
2006-08-23 18:31           ` Mark Kettenis
2006-08-23 18:36             ` Daniel Jacobowitz
2006-08-21 15:15       ` Vivek Goyal
2006-08-21 15:25         ` Daniel Jacobowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox