From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stan Shebs To: David Taylor Cc: gdb@sources.redhat.com Subject: Re: ARCH_NUM_REGS Date: Thu, 22 Feb 2001 16:44:00 -0000 Message-id: <3A95B218.1E334FBC@apple.com> References: <200102222230.RAA17311@texas.cygnus.com> X-SW-Source: 2001-02/msg00310.html 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