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: Andrew Cagney <ac131313 at cygnus dot com>
- Subject: Re: Minimal symbols and gdb's two-stage symbol reading
- From: Orjan Friberg <orjan dot friberg at axis dot com>
- Date: Fri, 24 Nov 2000 13:39:34 +0100
- CC: gdb-patches at sources dot redhat dot com
- Organization: Axis Communications AB
- References: <3A1D337B.42ED5B3D@axis.com> <3A1E4F97.C5D53651@cygnus.com>
Andrew Cagney wrote:
>
> 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.
> >
> > 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).
>
> If I'm understanding things correct then I think Kevin's suggestion is
> preferable to PeterSs.
>
> The arch_init() function shouldn't be relying on global state. Rather
> it should only be looking to its immediate parameters for information.
>
That sounds reasonable; thanks. bfd_symbol_lookup() also has the added
benefit of letting me detect the presence of the symbol I'm looking for
by the time gdbarch_init() is called as a result of the 'file' command.
(Previously, I wouldn't find the symbol until gdbarch_init() got called
_after_ the 'file' command was completed, for example as a result of a
user command that I've added.)
--
Orjan Friberg E-mail: orjan.friberg@axis.com
Axis Communications AB Phone: +46 46 272 17 68