[PATCH] Print vector registers in natural format, not hex

Klee Dienes klee@apple.com
Sat Oct 5 13:03:00 GMT 2002


The only relevant part of the documentation I noticed was the following:

> Some registers have distinct ``raw'' and ``virtual'' data formats.  
> This
> means that the data format in which the register contents are saved by
> the operating system is not the same one that your program normally
> sees.  For example, the registers of the 68881 floating point
> coprocessor are always saved in ``extended'' (raw) format, but all C
> programs expect to work with ``double'' (virtual) format.  In such
> cases, @value{GDBN} normally works with the virtual format only (the 
> format
> that makes sense for your program), but the @code{info registers} 
> command
> prints the data in both formats.

Fortunately for me, that's exactly what my patch modifies GDB to do 
(although according my interpretation of the documentation, I should 
really be testing for (TYPE_CODE_INT) and not (TYPE_CODE_FLOAT || 
TYPE_VECTOR).  But in practice I suspect the two cases are the same.

The following documentation patch isn't really related to my patch, but 
would probably be a good idea regardless:

diff -u -r1.23 gdb.texinfo
--- gdb.texinfo 2002/09/27 00:36:40     1.23
+++ gdb.texinfo 2002/10/05 20:06:50
@@ -5559,14 +5559,14 @@
  @table @code
  @kindex info registers
  @item info registers
-Print the names and values of all registers except floating-point
-registers (in the selected stack frame).
+Print the names and values of all registers except floating-point and
+vector registers (in the selected stack frame).

  @kindex info all-registers
  @cindex floating point registers
  @item info all-registers
  Print the names and values of all registers, including floating-point
-registers.
+and vector registers.

  @item info registers @var{regname} @dots{}
  Print the @dfn{relativized} value of each specified register 
@var{regname}.



More information about the Gdb-patches mailing list