This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Problems with startup code symbols (Copious warnings)
- From: Jim Blandy <jimb at codesourcery dot com>
- To: Steven Johnson <sjohnson at sakuraindustries dot com>
- Cc: gdb at sources dot redhat dot com
- Date: Thu, 08 Jun 2006 00:22:50 -0700
- Subject: Re: Problems with startup code symbols (Copious warnings)
- References: <4487C21F.2090907@sakuraindustries.com>
Steven Johnson <sjohnson@sakuraindustries.com> writes:
> For ever and a day with GDB i've gotten the following warnings:
>
> warning: (Internal error: pc 0x00 in read in psymtab, but not in symtab.)
>
> I get it a lot. I even patch GDB so it doesn't generate this warning,
> its so annoying.
>
> 0x00 happens to be my programs entry point (its an embedded system).
> And is in Assembler code.
>
> I've never liked patching GDB to get rid of this warning, so I invested
> some time on it and I've just discovered 2 ways to make it go away:
>
> 1. If I compile my code with stabs+ debug info, I don't get the
> warning. I would prefer to use Dwarf-2 however, as it seems to be the
> way of the future.
>
> 2. If I add:
>
> .section .debug_info,"",@progbits as the first directive in my asm file,
> the warning also goes away. But so does the code when I view it under GDB.
>
> Does anyone know any special incantation I need to make in my ASM file,
> to get rid of the warning, but still retain the symbolic information so
> I can see the code and symbols under GDB?
>
> The file is a ".S" file, it is assembler but i build it with GCC. The
> CPU is a PowerPC, Motorola MPC862.
Can you post an executable for which GDB produces this message, and
let us know which target you've configured GDB for?