This is the mail archive of the
mailing list for the GDB project.
Re: Register cache
- To: kettenis at wins dot uva dot nl
- Subject: Re: Register cache
- From: Nick Duffek <nsd at redhat dot com>
- Date: Sun, 11 Feb 2001 15:13:51 -0500
- CC: eliz at delorie dot com, gdb at sources dot redhat dot com
- References: <200102102237.f1AMbnJ00230@delius.kettenis.local>
On 10-Feb-2001, Mark Kettenis wrote:
>Therefore I propose to make this "official" and change
>the comment on target_fetch_registers() to:
> /* Fetch at least register REGNO, or all regs if REGNO == -1. */
I think that's a great idea.
>Another question is whether we should make this behaviour (I mean
>having target_fetch_registers() supply all registers it managed to get
>in one go) recommended practice.
I don't agree with that. There are times when GDB just needs one
register, and it may be much more efficient on some targets to fetch one
register than to fetch all of them.
I think there might be places in GDB that fetch all registers by calling
target_fetch_registers(REGNUM) for each REGNUM. If so, then I vote for
changing those places to call target_fetch_registers(-1) instead of
recommending against the target_fetch_registers(REGNUM) interface.