This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] mips-tdep: info registers


Eli Zaretskii wrote:
Date: Sun, 22 Feb 2009 19:00:14 -0800
From: Joel Brobecker <brobecker@adacore.com>

Surprisingly, this feature is not documented yet. The documentation
mentions "info registers regname", but not "info registers regno".
Would you mind adding a line or two and sending a (separate) patch
to this list? Eli is the documentation guru...
Should this feature even exist?  This is a different "$1" than
anywhere else in GDB you might type that...
I was asking myself this question, but there is explict code in
GDB to handle that case, so I thought that this was deliberate.
On the other hand, I also thought that this was a very cool way
of knowing what register number NUM actually is. For instance,
on x86, register number 3 is (drums...) ebx:

    (gdb) info reg $3
    ebx            0xb7e84ff4       -1209511948

With x86, the number of registers is fairly limited, but there
are other processors where this isn't the case. The CPU that gave
me the largest number of pimples so far is ia64...

So I found that the above syntax was a cool thing to know about
and worth retaining.

I agree. Documenting it would be good, thanks.



I added a note about the regno syntax.


Thanks,

Aleksandar Ristovski
QNX Software Systems


ChangeLog:


* gdb.texinfo (info registers): Add a note about permitted
info registers regno syntax.


Index: gdb/doc/gdb.texinfo
===================================================================
RCS file: /cvs/src/src/gdb/doc/gdb.texinfo,v
retrieving revision 1.558
diff -r1.558 gdb.texinfo
7436a7437,7442
> 
> Note that syntax using register number (@var{regno}) in place of 
> @var{regname} is also permitted.  While for some architectures (like x86)
> @var{regno} has a meaning only within @value{GDBN} context and is 
> subject to change in different @value{GDBN} versions, others (like mips)
> explicitly define them.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]