This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: who can explain the pseudo-registers and its mechanism tome?thanks
- From: Wu Zhou <woodzltc at cn dot ibm dot com>
- To: Michael Snyder <msnyder at redhat dot com>
- Cc: gdb at sources dot redhat dot com, mysea000 at 163 dot com
- Date: Sat, 5 Nov 2005 11:01:53 +0800 (CST)
- Subject: Re: who can explain the pseudo-registers and its mechanism tome?thanks
- References: <436BB1E7.10907@redhat.com>
On Fri, 4 Nov 2005, Michael Snyder wrote:
> "ayang" <mysea000 at 163 dot com> wrote:
> > hello,
> > I am puzzled by the the pseudo-registers and its mechanism when I >
> read the gdb source.It is not described in gdbint.who can explain the >
> pseudo-registers and its mechanism to me?thanks.
>
> Pseudo-registers are fake registers that do not exist
> (at least as represented) on the target. The basic distinction
> is that gdb fetches the values of "real" registers from the
> target, but computes or composes the values of "pseudo" registers
> locally. An example might be a double-wide pseudo-register
> that is composed from the values of two ordinary registers.
> GDB fetches the values of the two ordinary registers, but
> then combines them to produce the value of the pseudo-register.
>
> If a user changes the value of the pseudo-register, it may
> be necessary for gdb to change the target values from which
> the pseudo-register was composed.
>
Good explanation. At least for me. :-) Maybe this can get into <<GDB
internal>>?
Just my two cents anyway.
Regards
- Wu Zhou