I'm learning to use GDB on my own (for the purpose of understanding an assignment that requires binary analysis) and need a little bit of help. I've looked through the manual but can't find an answer to this specific issue.
I know where a 64-bit pointer resides in memory, and I want to change the address that it points to. When I try to set the value of the memory address, it only seems to modify the last 32 bits instead of the entire 64 bits.
(gdb) x/xg $rbp-8
0x7fffffffe338: 0x0000000000400a2d
(gdb) set *0x7fffffffe338 = 0x7fffffffe130
(gdb) x/xg $rbp-8
0x7fffffffe338: 0x00000000ffffe130
What's going on here?
Thanks in advance!