Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* GDB internal error:  pc in psymtab, not in symtab
@ 2006-10-12  4:29 Michael Eager
  2006-10-12  4:43 ` Daniel Jacobowitz
  0 siblings, 1 reply; 6+ messages in thread
From: Michael Eager @ 2006-10-12  4:29 UTC (permalink / raw)
  To: gdb

I've been bitten by this same problem:
http://sourceware.org/ml/gdb/2005-11/msg00279.html

It looks like GDB issues a warning when the ELF symbol
table contains symbols, but the DWARF data doesn't.
Assembler source with a .file will have DWARF sections,
but only a TAG_Compilation_Unit.  It's legit DWARF.

There seem to be fixes for problems with similar
symptoms with mdebug and stabs, but nothing for DWARF.
Have you seen any kind of fix?

Any suggestion for a fix?  It doesn't look like GDB
knows where the debug info came from.  One fix is
to simply suppress the message.  Another is to have
the DWARF reader tag the psym if no symbols are found,
so that symtab.c can know that it's not an error.


-- 
Michael Eager	 eager@eagercon.com
1960 Park Blvd., Palo Alto, CA 94306  650-325-8077


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

* Re: GDB internal error:  pc in psymtab, not in symtab
  2006-10-12  4:29 GDB internal error: pc in psymtab, not in symtab Michael Eager
@ 2006-10-12  4:43 ` Daniel Jacobowitz
  2006-10-12  7:55   ` Steven Johnson
  0 siblings, 1 reply; 6+ messages in thread
From: Daniel Jacobowitz @ 2006-10-12  4:43 UTC (permalink / raw)
  To: Michael Eager; +Cc: gdb

On Wed, Oct 11, 2006 at 09:29:07PM -0700, Michael Eager wrote:
> I've been bitten by this same problem:
> http://sourceware.org/ml/gdb/2005-11/msg00279.html
> 
> It looks like GDB issues a warning when the ELF symbol
> table contains symbols, but the DWARF data doesn't.
> Assembler source with a .file will have DWARF sections,
> but only a TAG_Compilation_Unit.  It's legit DWARF.

Psymtabs do not come from the ELF symbol table; they come from a first
pass over the DWARF information. So, if this warning triggers, that
pass must have done something bogus.

"maint print psymbols" and "maint print symbols" might be useful;
the interesting question is, what psymtab thought it covered the
address, and why didn't the corresponding symtab?

Oh, one frequent cause is mis-estimating the range of addresses covered
by the psymtab.

-- 
Daniel Jacobowitz
CodeSourcery


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

* Re: GDB internal error:  pc in psymtab, not in symtab
  2006-10-12  4:43 ` Daniel Jacobowitz
@ 2006-10-12  7:55   ` Steven Johnson
  2006-10-12 12:52     ` Daniel Jacobowitz
  2006-10-12 15:11     ` Michael Eager
  0 siblings, 2 replies; 6+ messages in thread
From: Steven Johnson @ 2006-10-12  7:55 UTC (permalink / raw)
  To: Michael Eager, gdb

I suggest you read this thread:
http://sourceware.org/ml/gdb/2006-06/msg00085.html

It may be the cause of your problem, as it is the cause of this warning 
for me.

I simply comment out the code referred to in this post and this warning 
goes away for me.  I can't come up with a better way to deal with it.  
Of course if you also have .linkonce sections in your program, you are 
probably hosed.

Steven J

Daniel Jacobowitz wrote:
> On Wed, Oct 11, 2006 at 09:29:07PM -0700, Michael Eager wrote:
>   
>> I've been bitten by this same problem:
>> http://sourceware.org/ml/gdb/2005-11/msg00279.html
>>
>> It looks like GDB issues a warning when the ELF symbol
>> table contains symbols, but the DWARF data doesn't.
>> Assembler source with a .file will have DWARF sections,
>> but only a TAG_Compilation_Unit.  It's legit DWARF.
>>     
>
> Psymtabs do not come from the ELF symbol table; they come from a first
> pass over the DWARF information. So, if this warning triggers, that
> pass must have done something bogus.
>
> "maint print psymbols" and "maint print symbols" might be useful;
> the interesting question is, what psymtab thought it covered the
> address, and why didn't the corresponding symtab?
>
> Oh, one frequent cause is mis-estimating the range of addresses covered
> by the psymtab.
>
>   


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

* Re: GDB internal error:  pc in psymtab, not in symtab
  2006-10-12  7:55   ` Steven Johnson
@ 2006-10-12 12:52     ` Daniel Jacobowitz
  2006-10-12 20:30       ` Steven Johnson
  2006-10-12 15:11     ` Michael Eager
  1 sibling, 1 reply; 6+ messages in thread
From: Daniel Jacobowitz @ 2006-10-12 12:52 UTC (permalink / raw)
  To: Steven Johnson; +Cc: Michael Eager, gdb

On Thu, Oct 12, 2006 at 06:55:05PM +1100, Steven Johnson wrote:
> I suggest you read this thread:
> http://sourceware.org/ml/gdb/2006-06/msg00085.html
> 
> It may be the cause of your problem, as it is the cause of this warning 
> for me.
> 
> I simply comment out the code referred to in this post and this warning 
> goes away for me.  I can't come up with a better way to deal with it.  
> Of course if you also have .linkonce sections in your program, you are 
> probably hosed.

That was already fixed in CVS for your case, as you may recall.

-- 
Daniel Jacobowitz
CodeSourcery


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

* Re: GDB internal error:  pc in psymtab, not in symtab
  2006-10-12  7:55   ` Steven Johnson
  2006-10-12 12:52     ` Daniel Jacobowitz
@ 2006-10-12 15:11     ` Michael Eager
  1 sibling, 0 replies; 6+ messages in thread
From: Michael Eager @ 2006-10-12 15:11 UTC (permalink / raw)
  To: Steven Johnson; +Cc: gdb

Steven Johnson wrote:
> I suggest you read this thread:
> http://sourceware.org/ml/gdb/2006-06/msg00085.html
> 
> It may be the cause of your problem, as it is the cause of this warning 
> for me.

Different problem, but thanks anyway.  The assembler source file
doesn't have .gnu.linkonce sections and the low/high pc values appear OK.

-- 
Michael Eager	 eager@eagercon.com
1960 Park Blvd., Palo Alto, CA 94306  650-325-8077


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

* Re: GDB internal error:  pc in psymtab, not in symtab
  2006-10-12 12:52     ` Daniel Jacobowitz
@ 2006-10-12 20:30       ` Steven Johnson
  0 siblings, 0 replies; 6+ messages in thread
From: Steven Johnson @ 2006-10-12 20:30 UTC (permalink / raw)
  To: Steven Johnson, Michael Eager, gdb

No, I don't recall.  I will check CVS out.  Thanks.

Steven J

Daniel Jacobowitz wrote:
> On Thu, Oct 12, 2006 at 06:55:05PM +1100, Steven Johnson wrote:
>   
>> I suggest you read this thread:
>> http://sourceware.org/ml/gdb/2006-06/msg00085.html
>>
>> It may be the cause of your problem, as it is the cause of this warning 
>> for me.
>>
>> I simply comment out the code referred to in this post and this warning 
>> goes away for me.  I can't come up with a better way to deal with it.  
>> Of course if you also have .linkonce sections in your program, you are 
>> probably hosed.
>>     
>
> That was already fixed in CVS for your case, as you may recall.
>
>   


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

end of thread, other threads:[~2006-10-12 20:30 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-10-12  4:29 GDB internal error: pc in psymtab, not in symtab Michael Eager
2006-10-12  4:43 ` Daniel Jacobowitz
2006-10-12  7:55   ` Steven Johnson
2006-10-12 12:52     ` Daniel Jacobowitz
2006-10-12 20:30       ` Steven Johnson
2006-10-12 15:11     ` Michael Eager

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