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] h8300-tdep.c: Rewrite frame code, de-deprecate, ...


On Fri, Apr 29, 2005 at 11:10:18AM +0200, Corinna Vinschen wrote:
> On Apr 28 15:03, Daniel Jacobowitz wrote:
> > On Thu, Apr 28, 2005 at 05:32:32PM +0200, Corinna Vinschen wrote:
> > 
> > I know it's a pain, but please write a real changelog entry.
> 
> Sigh, ok, see below.

Thank you.

> > > +  /* Saved registers.  */
> > > +  CORE_ADDR saved_regs[H8300_MAX_NUM_REGS];
> > > +  CORE_ADDR saved_sp;
> > > +};
> > 
> > Can you use trad-frame.h instead of an array of CORE_ADDRs?
> 
> I rather would not.  Using the saved_regs technique is used throughout
> GDB in a couple of targets and I really don't see any advantage in using
> trad-frame.h.  Actually IMHO using saved_regs directly is a lot easier
> to read for people examining the code.

It's not that it is "used throughout GDB", it's that it's a
pre-existing technique.  We've been trying to migrate away from it. 
Nine targets do use it, fifteen have been updated not to.  Using it
improves consistency and reduces duplicated code - it would eliminate
the entire contents of h8300_frame_prev_register, for instance. If
there is something about the trad_frame interface that you find hard to
read, could you be more specific, so that we can improve the interface?

In any case, I am not interested in an argument, I've got enough of
those already :-)  The patch is OK.

As followups, you should probably:
  - Re-add the h8300-tdep.o to Makefile.in.
  - Update the h8300 entry in MAINTAINERS to say
    "--target=h8300-elf ,-Werror".

These should have been done when the target was restored, but they
were missed.

-- 
Daniel Jacobowitz
CodeSourcery, LLC


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