Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Vivek Goyal <vgoyal@in.ibm.com>
To: gdb@sourceware.org
Cc: Dave Anderson <anderson@redhat.com>
Subject: "gdb vmlinux" gives wrong symbol addresses
Date: Fri, 18 Aug 2006 18:38:00 -0000	[thread overview]
Message-ID: <20060818183807.GD12962@in.ibm.com> (raw)

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


             reply	other threads:[~2006-08-18 18:38 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-18 18:38 Vivek Goyal [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060818183807.GD12962@in.ibm.com \
    --to=vgoyal@in.ibm.com \
    --cc=anderson@redhat.com \
    --cc=gdb@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox