From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cagney To: David Taylor Cc: gdb-patches@sources.redhat.com Subject: Re: [RFA] regcache.c (register_fetched) + related changes Date: Fri, 02 Mar 2001 09:06:00 -0000 Message-id: <3A9FD265.E706A7D4@cygnus.com> References: <200103020058.TAA18595@texas.cygnus.com> X-SW-Source: 2001-03/msg00038.html > Can you give an example of where this is happening? I'm currently aware > of two cases: > > [0 .. NUM_REGS) > where supply_register() should be used > > Not always. See below. > > [NUM_REGS .. NUM_REGS + PSEUDO_NUM_REGS) > I suspect your case. > > I *clear* in the [NUM_REGS, NUM_REGS+PSEUDO_NUM_REGS) range and *set* > in the [0, NUM_REGS) range. The code that sets the valid bit in the range [0, NUM_REGS) should be doing so using either of the functions: supply_register() - target side or write_register_gen() - core-gdb side if it isn't it is doing something un-documented and so, in my opinion, should use a function that makes the use of that un-documented behavour very clear. Hence, in your case, I think your code really should be using a function called something like deprecated_raw_register_fetched(). If I commit a change that replaces register_valid[] with the pair: deprecated_raw_register_fetched() pseudo_register_fetched() will this allow your existing code to work? Looking to the future, when (not if) the frame code is re-vamped to have register values bound to a frame, will it be possible to use that mechanism to implement what you're trying to do how using the regcache? Andrew