This is the mail archive of the
gdb-patches@sourceware.cygnus.com
mailing list for the GDB project.
Re: RFA: gdbarch_free
Jim Blandy wrote:
>
> > > There are no uses for this yet, except in some code that's not ready
> > > for release yet.
> > >
> > > 2000-02-28 Jim Blandy <jimb@redhat.com>
> > >
> > > * gdbarch.sh: Emit a definition and declaration for gdbarch_free,
> > > a companion to gdbarch_alloc, which allows a gdbarch init function
> > > to free partially-built gdbarch structures.
> > > * gdbarch.c, gdbarch.h: Regenerated.
> >
> > Jim,
> >
> > Can you expand a little.
> >
> > >From memory, I figured that if an _initialize* function failed to create
> > a gdbarch the process was somewhat hosed and calling internal_error()
> > was probably the best thing to do.
> This situation could arise if someone adds support for a new variant
> of my architecture, but hasn't updated GDB yet.
So the real question is, is this an internal_error() and how should it
be handled?
I can be convinced either way on this :-)
Andrew
PS: Can you think of any way possible, to check for this problem during
a build?