Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@mvista.com>
To: Steven Johnson <sjohnson@neurizon.net>,
	gdb@sources.redhat.com, jimb@redhat.com
Subject: Re: Internal error in GDB
Date: Tue, 19 Nov 2002 12:09:00 -0000	[thread overview]
Message-ID: <20021119201044.GA29274@nevyn.them.org> (raw)
In-Reply-To: <20021114151528.GA14693@nevyn.them.org>

On Thu, Nov 14, 2002 at 10:15:28AM -0500, Daniel Jacobowitz wrote:
> On Thu, Nov 14, 2002 at 05:34:05PM +1000, Steven Johnson wrote:
> > Im getting the error:
> > 
> > Internal error: pc 0x0 in read in psymtab, but not in symtab.
> > 
> > from a very recent CVS build of GDB (As of 11th November).
> > 
> > It happens when I set breakpoints in an assembler file, that has been 
> > assembled through GCC, using the C Preprocessor (.S file, not .s file).
> > 
> > It does nothing wrong, except pop up all the time and hence interfere 
> > with debugging significantly. (Im using insight and have to keep 
> > pressing OK to continue).
> > 
> > I searched the code and it seems to be coming from 
> > symtab.c:find_pc_sect_symtab (last if in the function)

Jim, I need your opinion on this... here's the problem.

2092      /* When using the GNU linker, .gnu.linkonce. sections are used to
2093         eliminate duplicate copies of functions and vtables and such.
2094         The linker will arbitrarily choose one and discard the others.
2095         The AT_*_pc values for such functions refer to local labels in
2096         these sections.  If the section from that file was discarded, the
2097         labels are not in the output, so the relocs get a value of 0.
2098         If this is a discarded function, mark the pc bounds as invalid,
2099         so that GDB will ignore it.  */
2100      if (low == 0 && (bfd_get_file_flags (objfile->obfd) & HAS_RELOC) == 0)
(top-gdb)
2101        return 0;
2102


In Steven's asm is a .vectors section which goes over the PPC hardware
interrupt vectors in RAM - that's actually at VMA 0.  Oops.

Since LD still doesn't edit DWARF-2 sections when discarding, and won't
for the forseeable future (although it needs to eventually), we can't
just drop the check.  Any ideas on what to do?

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


  reply	other threads:[~2002-11-19 20:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-13 23:40 Steven Johnson
2002-11-14  7:14 ` Daniel Jacobowitz
2002-11-19 12:09   ` Daniel Jacobowitz [this message]
2002-11-20 20:42     ` Jim Blandy
2002-11-20 20:50       ` DWARF-2 + discarded link-once sections (was Re: Internal error in GDB) Daniel Jacobowitz
2002-11-20 22:30         ` H. J. Lu
2002-11-20 22:40         ` Daniel Berlin

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=20021119201044.GA29274@nevyn.them.org \
    --to=drow@mvista.com \
    --cc=gdb@sources.redhat.com \
    --cc=jimb@redhat.com \
    --cc=sjohnson@neurizon.net \
    /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