Search code examples
gdbreverse-engineeringcpu-registers

How to print value pointed by register


I am trying to learn asembly and reverse and whene i tryed to debug a simple chall i wanted to see my registers in gdb with info registers Rax 0x7fffffdd90 Now inwant to know where rax. Is pointîg to ,( inprentrd rax now i want to print [rax] ) Or is it possible to set a pointed value in register Inteed of doing set $eax = $rax I want to do somthing like set $eax = [$rax]

Thanx for help


Solution

  • Rax 0x7fffffdd90 Now inwant to know where rax. Is pointîg to

    You already know that: it points to (stack) memory location at address 0x7fffffdd90.

    i want to print [rax]

     x/gx $rax
    

    or

     print *(int**)$rax
    

    I want to do somthing like set $eax = [$rax]

    set $rax = *(int**)$rax