Oleg Now, to continue the tracee, gdb does not restore the
Oleg original instruction. Instead, it
Oleg - writes this insn into _start code
Oleg - changes regs-ip to point to this insn
Oleg - does single-step to execute this insn
Oleg - changes regs-ip again
This is what is done for non-stop.
I believe it is called displaced stepping in gdb.
I think eventually we would like it if uprobes did this work, instead of
gdb doing it. Presumably that would yield better performance. E.g., if
we have a thread-specific breakpoint, then other threads hitting that
breakpoint could simply do the displaced stepping via uprobes, and not
report a breakpoint hit to gdb at all.
For all-stop, breakpoints are handled differently, though I don't
remember how offhand.
Tom