Make --gdb-attach=yes work properly; rather than trying to attach gdb
to itself, Valgrind forks a child, and uses ptrace to manipulate its
state into what the client state would be at that point, and attaches
gdb to that.  In addition to giving gdb clean state to inspect, it
also stops mistakes in gdb (eg, continuing) from killing your target.
It also makes gdb strictly read-only; any state changes made from within
gdb will not be reflected in the running client.  Patch from Tom Hughes.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2187 a5019735-40e9-0310-863c-91ae7b9d1cf9
5 files changed