Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: Sandeep Joshi <sandeepjoshi.it@gmail.com>
Cc: gdb@sourceware.org
Subject: Re: GDB not able to debug files(dwarf2.0) loaded using add-symbol-file
Date: Wed, 10 Jan 2007 04:16:00 -0000	[thread overview]
Message-ID: <20070110041637.GD14719@nevyn.them.org> (raw)
In-Reply-To: <ad83c5670701032256lddba884j4762d8b362996438@mail.gmail.com>

On Thu, Jan 04, 2007 at 12:26:51PM +0530, Sandeep Joshi wrote:
> Here the pc to be looked is is '34148' . It starts with first object
> file i.e vmlinux and checks all the psymtabs for their code range. Now
> for the above psymtab, Code range is 'textlow = 288, texthigh =
> 1076066628' and our PC lies in this. So this is set as best_pst and
> function returns without checking the second objfile, which has the
> perfect match for this PC. That is why gdb is not able to show the
> sources correct.

Aha.  OK, this is actually a different bug - the range should be set
that way.  Unfortunately, this is a very hard bug to fix in GDB.  I
recently patched GNU ld to prevent this from happening in new releases;
the patch is here:

  http://sourceware.org/ml/binutils/2006-11/msg00019.html

If you can apply that to your linker, I believe it will fix up the
problem, which comes from /DISCARD/ { *(.text.exit) } in the kernel's
linker scripts.

If you can't change your linker, it should be possible to detect the
problem in GDB.  Where we currently check for has_section_at_zero,
in dwarf2read.c, check instead that the address is in some section in
the file.

-- 
Daniel Jacobowitz
CodeSourcery


      reply	other threads:[~2007-01-10  4:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-22  4:21 Sandeep Joshi
2006-12-23 21:26 ` Daniel Jacobowitz
2007-01-03  9:44   ` Sandeep Joshi
2007-01-04  3:30     ` Daniel Jacobowitz
2007-01-04  6:56       ` Sandeep Joshi
2007-01-10  4:16         ` Daniel Jacobowitz [this message]

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=20070110041637.GD14719@nevyn.them.org \
    --to=drow@false.org \
    --cc=gdb@sourceware.org \
    --cc=sandeepjoshi.it@gmail.com \
    /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