This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: Minimal symbols and gdb's two-stage symbol reading
- To: Orjan Friberg <orjan dot friberg at axis dot com>
- Subject: Re: Minimal symbols and gdb's two-stage symbol reading
- From: Michael Snyder <msnyder at redhat dot com>
- Date: Sat, 25 Nov 2000 12:28:16 -0800
- CC: gdb-patches at sources dot redhat dot com
- References: <3A1D337B.42ED5B3D@axis.com>
Orjan Friberg wrote:
>
> Would it be safe to rely on an absolute global symbol being read into
> the minimal symbol table with the initial 'file' command (without using
> the '-readnow' option) for an a.out target? From looking at
> read_dbx_symtab it wasn't clear to me what happens.
That's because the absolute global symbols are not read by
read_dbx_symtab. That function reads the stabs, which are
entirely distinct from the "minimal symbols". The minimal
symbols (mainly) come from the linker symbols, not the stabs.
The minimal symbols are all read on the first pass. So yes,
it should be safe to make the assumption you asked about.
> As discussed in a previous thread, I will use the symbol as an ABI
> indicator, and I'm just wondering if gdb's two-stage symbol reading
> could interfere with my intentions (i.e., the symbol not being there yet
> when I want it to).
So long as "when I want it to" is after the "file" command
(ie. there is a symbol file now), then this should be safe.
Michael