Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to dump all the XMM registers in gdb?

Tags:

x86

gdb

I can dump the all the integer registers in gdb with just:

info registers

for the xmm registers (intel) I need a file like:

print $xmm0
print $xmm1
...
print $xmm15

and then source that file. Is there an easier way?

like image 626
Peeter Joot Avatar asked Mar 30 '12 19:03

Peeter Joot


People also ask

How many bytes is XMM register?

The 128-bit XMM registers are part of the SSE extension (where SSE is short for Streaming SIMD Extension, and SIMD, in turn, stands for single instruction multiple data). There are eight XMM registers available in non -64-bit modes and 16 XMM registers in long mode, which allow simultaneous operations on: 16 bytes.

What is the command used for getting various contents of various registers?

If specified, the info registers command will show the contents of a given register only. If omitted, the command will show the contents of all general-purpose CPU registers.

What does Info registers do in GDB?

The info registers command shows the canonical names. For example, on the SPARC, info registers displays the processor status register as $psr but you can also refer to it as $ps . GDB always considers the contents of an ordinary register as an integer when the register is examined in this way.


1 Answers

(gdb) apropos registers
collect -- Specify one or more data items to be collected at a tracepoint
core-file -- Use FILE as core dump for examining memory and registers
info all-registers -- List of all registers and their contents
...

The last one is the one you want.

See also this answer below.

like image 199
Employed Russian Avatar answered Sep 18 '22 11:09

Employed Russian