I'm debugging an ELF 64-bit binary using
gdb and I notice that the
%fs register is set to
0x63. For some testing that I'd like to perform I'd like to set the
%fs register to
I tried doing a
set $fs=0x0 but the value wouldn't change. In some cases I got a:
Couldn't write registers: Input/output error.
Is there any way I could set the value for the
%fs register? I'm also open to modifying the binary, adding inline assembly to the source, etc.
EDIT : Currently, I'm trying this out by attaching to a process rather than running it from within
A screenshot to illustrate the problem :