This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: ARCH_NUM_REGS
- To: David Taylor <taylor at cygnus dot com>
- Subject: Re: ARCH_NUM_REGS
- From: Stan Shebs <shebs at apple dot com>
- Date: Thu, 22 Feb 2001 16:43:04 -0800
- CC: gdb at sources dot redhat dot com
- References: <200102222230.RAA17311@texas.cygnus.com>
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