This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFA: use constructor to build 'struct regset' objects


Andrew Cagney <cagney@gnu.org> writes:

> > + struct regset *regset_xmalloc (void *descr,
> > +                                supply_regset_ftype *supply_regset,
> > +                                fill_regset_ftype *fill_regset)
> > + {
> 
> Can you run the file through gdb_indent.sh?

I thought that looked odd.  Thanks; this is fixed in the change I
committed.

> > +   struct regset *r = (struct regset *) xmalloc (sizeof (*r));
> 
> Since this data belongs to an architecture, this should be allocated
> From the architecture's obstack.  I suspect this is a pre-existing
> bug but can you still fix it?

I'll take a look at it.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]