public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* Internal Error in GDB (was: ld includes entire archive (.a) when compiling .elf file)
@ 2006-04-07 14:17 Josh Keller
  2006-04-07 14:28 ` Daniel Jacobowitz
  0 siblings, 1 reply; 6+ messages in thread
From: Josh Keller @ 2006-04-07 14:17 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: binutils, Reuben Johnston

 
Daniel, for some reason, when I turn on garbage collection, I get the
following error (many, many times) when I run gdb:

Internal error: pc 0x0 in read in psymtab, but not in symtab.

I can still debug my program, but I get these errors all over the place.
I saw a thread back in 2002 titled (Internal error in GDB) initially
posted by Steven Johnson.  I'm not sure what the ultimate resolution
was.  Any ideas?

-Josh

-----Original Message-----
From: Daniel Jacobowitz [mailto:drow@false.org] 
Sent: Friday, March 10, 2006 6:43 PM
To: Josh Keller
Cc: binutils@sourceware.org; Reuben Johnston
Subject: Re: ld includes entire archive (.a) when compiling .elf file

On Fri, Mar 10, 2006 at 06:08:53PM -0500, Josh Keller wrote:
> How will specifying the start of execution with (-e) remove the 
> uncalled functions and unused variables?  Does the ld linker even have

> the capability to automatically remove uncalled functions without 
> having to specify each used section?  I'm sorry if I sound really 
> confused, I'm pretty new to this.  Thanks for your patience.

No, you need that to prevent the linker from removing everything.

--
Daniel Jacobowitz
CodeSourcery

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

* Re: Internal Error in GDB (was: ld includes entire archive (.a) when compiling .elf file)
  2006-04-07 14:17 Internal Error in GDB (was: ld includes entire archive (.a) when compiling .elf file) Josh Keller
@ 2006-04-07 14:28 ` Daniel Jacobowitz
  2006-04-07 14:51   ` Alan Modra
  0 siblings, 1 reply; 6+ messages in thread
From: Daniel Jacobowitz @ 2006-04-07 14:28 UTC (permalink / raw)
  To: Josh Keller; +Cc: binutils, Reuben Johnston

On Fri, Apr 07, 2006 at 10:15:26AM -0400, Josh Keller wrote:
>  
> Daniel, for some reason, when I turn on garbage collection, I get the
> following error (many, many times) when I run gdb:
> 
> Internal error: pc 0x0 in read in psymtab, but not in symtab.

Code is being discarded, but not its debug information.

Alan Modra was doing some work on this, but ran into a snag, IIRC.

> I can still debug my program, but I get these errors all over the place.
> I saw a thread back in 2002 titled (Internal error in GDB) initially
> posted by Steven Johnson.  I'm not sure what the ultimate resolution
> was.  Any ideas?

No relation to this problem most likely.

-- 
Daniel Jacobowitz
CodeSourcery

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

* Re: Internal Error in GDB (was: ld includes entire archive (.a) when compiling .elf file)
  2006-04-07 14:28 ` Daniel Jacobowitz
@ 2006-04-07 14:51   ` Alan Modra
  0 siblings, 0 replies; 6+ messages in thread
From: Alan Modra @ 2006-04-07 14:51 UTC (permalink / raw)
  To: Josh Keller, binutils, Reuben Johnston

On Fri, Apr 07, 2006 at 10:17:44AM -0400, Daniel Jacobowitz wrote:
> Code is being discarded, but not its debug information.
> 
> Alan Modra was doing some work on this, but ran into a snag, IIRC.

The snag is that it is more work than I originally thought.  :)

I don't think there is a major technical problem, but of course I might
run into a real snag when I find time to do some further work.

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre

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

* RE: Internal Error in GDB (was: ld includes entire archive (.a) when compiling .elf file)
  2006-04-07 14:38 ` Daniel Jacobowitz
@ 2006-04-07 14:59   ` Dave Korn
  0 siblings, 0 replies; 6+ messages in thread
From: Dave Korn @ 2006-04-07 14:59 UTC (permalink / raw)
  To: 'Daniel Jacobowitz', 'Josh Keller'
  Cc: binutils, 'Reuben Johnston', gdb

On 07 April 2006 15:35, Daniel Jacobowitz wrote:

> On Fri, Apr 07, 2006 at 10:33:46AM -0400, Josh Keller wrote:
>> Is there any way that I can disable these messages so that I can debug
>> more easily?
> 
> I don't think so.

  :)  Why, are you saying that building gdb from source isn't easy?

  /src/gdb/symtab.c, line 1919:

---------------------------------------<snip>
  s = NULL;
  ps = find_pc_sect_psymtab (pc, section);
  if (ps)
    {
      if (ps->readin)
	/* Might want to error() here (in case symtab is corrupt and
	   will cause a core dump), but maybe we can successfully
	   continue, so let's not.  */
	warning (_("\
(Internal error: pc 0x%s in read in psymtab, but not in symtab.)\n"),
		 paddr_nz (pc));
      s = PSYMTAB_TO_SYMTAB (ps);
    }
  return (s);
---------------------------------------<snip>

  Yow.  If you delete the warning() call, watch out for the un-braced if
conditional, it's easy to miss one of those when there's a comment in the way
like that.


    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....

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

* Re: Internal Error in GDB (was: ld includes entire archive (.a) when compiling .elf file)
  2006-04-07 14:34 Josh Keller
@ 2006-04-07 14:38 ` Daniel Jacobowitz
  2006-04-07 14:59   ` Dave Korn
  0 siblings, 1 reply; 6+ messages in thread
From: Daniel Jacobowitz @ 2006-04-07 14:38 UTC (permalink / raw)
  To: Josh Keller; +Cc: binutils, Reuben Johnston

On Fri, Apr 07, 2006 at 10:33:46AM -0400, Josh Keller wrote:
> Is there any way that I can disable these messages so that I can debug
> more easily?

I don't think so.

-- 
Daniel Jacobowitz
CodeSourcery

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

* RE: Internal Error in GDB (was: ld includes entire archive (.a) when compiling .elf file)
@ 2006-04-07 14:34 Josh Keller
  2006-04-07 14:38 ` Daniel Jacobowitz
  0 siblings, 1 reply; 6+ messages in thread
From: Josh Keller @ 2006-04-07 14:34 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: binutils, Reuben Johnston

Is there any way that I can disable these messages so that I can debug
more easily?
-Josh 

-----Original Message-----
From: Daniel Jacobowitz [mailto:drow@false.org] 
Sent: Friday, April 07, 2006 10:18 AM
To: Josh Keller
Cc: binutils@sourceware.org; Reuben Johnston
Subject: Re: Internal Error in GDB (was: ld includes entire archive (.a)
when compiling .elf file)

On Fri, Apr 07, 2006 at 10:15:26AM -0400, Josh Keller wrote:
>  
> Daniel, for some reason, when I turn on garbage collection, I get the 
> following error (many, many times) when I run gdb:
> 
> Internal error: pc 0x0 in read in psymtab, but not in symtab.

Code is being discarded, but not its debug information.

Alan Modra was doing some work on this, but ran into a snag, IIRC.

> I can still debug my program, but I get these errors all over the
place.
> I saw a thread back in 2002 titled (Internal error in GDB) initially 
> posted by Steven Johnson.  I'm not sure what the ultimate resolution 
> was.  Any ideas?

No relation to this problem most likely.

--
Daniel Jacobowitz
CodeSourcery

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

end of thread, other threads:[~2006-04-07 14:57 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-04-07 14:17 Internal Error in GDB (was: ld includes entire archive (.a) when compiling .elf file) Josh Keller
2006-04-07 14:28 ` Daniel Jacobowitz
2006-04-07 14:51   ` Alan Modra
2006-04-07 14:34 Josh Keller
2006-04-07 14:38 ` Daniel Jacobowitz
2006-04-07 14:59   ` Dave Korn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).