Thursday, June 16, 2011

[gdb tips] printing SSE2 registers

Hi!
I started [gdb tips] title for sharing useful gdb tips & tricks. First tip is printing SSE2 registers. You can use print/x for accessing SSE2 registers context.

Example;

Program received signal SIGSEGV, Segmentation fault.
=> 0x7ffff530862a: movlpd xmm2,QWORD PTR [rsi]
     0x7ffff530862e: movhpd xmm1,QWORD PTR [rdi+0x8]
gdb> print/x $xmm2

$1 = {
v4_float = {0x0, 0x0, 0x0, 0x0},
v2_double = {0x8000000000000000, 0x8000000000000000},
v16_int8 = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff},
v8_int16 = {0xffff, 0xffff, 0xffff, 0xffff, 0x0, 0xffff, 0xffff, 0xffff},
v4_int32 = {0xffffffff, 0xffffffff, 0xffff0000, 0xffffffff},
v2_int64 = {0xffffffffffffffff, 0xffffffffffff0000},
uint128 = 0xffffffffffff0000ffffffffffffffff
}





If you're saying what is f*ckin' SSE2 registers? 

No comments:

Post a Comment