This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA] struct context moved
- From: Michael Snyder <msnyder at redhat dot com>
- To: Michal Ludvig <mludvig at suse dot cz>
- Cc: Andrew Cagney <ac131313 at ges dot redhat dot com>, GDB Patches <gdb-patches at sources dot redhat dot com>
- Date: Mon, 26 Aug 2002 19:17:28 -0700
- Subject: Re: [RFA] struct context moved
- Organization: Red Hat, Inc.
- References: <Pine.LNX.4.33.0207082233090.27221-100000@chimera.suse.cz>
Michal Ludvig wrote:
>
> On Mon, 8 Jul 2002, Andrew Cagney wrote:
>
> > > Hi all,
> > > the appended patch moved declaration of struct context and struct context_reg to frame.h, where these two are used in struct frame_info.
> > > OK to commit?
> > >
> > > 2002-07-08 Michal Ludvig <mludvig@suse.cz>
> > >
> > > * dwarf2cfi.c (struct context, struct context_reg): Moved...
> > > * farme.h (struct context, struct context_reg): ...here.
> > >
> > > Michal Ludvig
> >
> > Michael,
> >
> > I don't understand the rationale behind this.
> >
> > As a general trend, frame.h / struct frame is becomming increasingly
> > opaque. I don't see a reason for moving dwarf2cfi specific stuff into
> > frame.h.
>
> Because we have
> struct context *context;
> in the declaration of "struct frame_info", I thought it was logical to
> declare "struct context" in the same file. Otherwise, when debugging gdb
> itself, I'm getting "incomplete type" message when examining the content
> of struct frame_info. AFAIK it doesn't increase the size of the code, it
> just gives to debugger the appropriate information about the type of
> the structure.
>
> Or am I wrong?
I don't know if this thread is still alive, but
this change certainly seems wrong to me. Most of GDB
does not need to know about these structures. I assume
their use is strictly contained within dwarf2cfi.