This is the mail archive of the gdb@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]

Re: ARCH_NUM_REGS


David Taylor wrote:
> 
> In addition to NUM_REGS and NUM_PSEUDO_REGS, there's the define
> ARCH_NUM_REGS -- which by default is the same as NUM_REGS.
> 
> One presumes that ARCH_NUM_REGS is meant to have slightly different
> semantics than NUM_REGS, but it isn't documented and it doesn't seem
> to be used in any consistent fashion that I've discerned.
> 
> So, what are the intended semantics of ARCH_NUM_REGS?

Check out m88k/tm-cxux.h, where the number of registers from the
inferior would depend on whether an 88110 was in use, as detected
by code in cxux-nat.c.  At the time, NUM_REGS had to be a constant,
so ARCH_NUM_REGS was its dynamically-sized counterpart.  This was
actually one of the problems that got me to thinking about GDB's
need to be able to vary the target architecture's characteristics
at runtime...

ARCH_NUM_REGS could probably be retired along with CX/UX support.
The OS was barely in existence two years ago, and may have
been discontinued by now.

Stan


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