What kinds of bytes does GDB insert in memory to debug the executable?
I know that GDB must insert (or manipulate) some bytes in memory, since when I debug a program that computes, i.e., the XOR over a region of memory and set the breakpoint within this region, then the program computes the wrong result.
However, if I do x
(inspect memory), then everything in memory seems unchanged.
My question is therefore:
Suppose I set a breakpoint, e.g., b *0x40206e
. What (invisble) changes does GDB make to the executable within memory to support debugging it?