aboutsummaryrefslogtreecommitdiff
path: root/gdb/inf-ttrace.c
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2008-07-08 10:59:57 +0000
committerPedro Alves <palves@redhat.com>2008-07-08 10:59:57 +0000
commit25b22b0a6f353d95932f8ee0b9bf861d3eed3261 (patch)
tree71079bc123086beec131668ccfc9f6b1c64a24d5 /gdb/inf-ttrace.c
parentcce9b6bff92ae507e4517198c4b64e268f975760 (diff)
downloadfsf-binutils-gdb-25b22b0a6f353d95932f8ee0b9bf861d3eed3261.zip
fsf-binutils-gdb-25b22b0a6f353d95932f8ee0b9bf861d3eed3261.tar.gz
fsf-binutils-gdb-25b22b0a6f353d95932f8ee0b9bf861d3eed3261.tar.bz2
* breakpoint.c (mark_breakpoints_out): Make public.
(update_breakpoints_after_exec): Don't call mark_breakpoints_out here. Update comment. * breakpoint.h (mark_breakpoints_out): Declare. * linux-nat.c (linux_handle_extended_wait): On TARGET_WAITKIND_EXECD, call mark_breakpoints_out. * inf-ttrace.c (inf_ttrace_wait): Likewise.
Diffstat (limited to 'gdb/inf-ttrace.c')
-rw-r--r--gdb/inf-ttrace.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gdb/inf-ttrace.c b/gdb/inf-ttrace.c
index 8a8399a..95c296e 100644
--- a/gdb/inf-ttrace.c
+++ b/gdb/inf-ttrace.c
@@ -904,6 +904,12 @@ inf_ttrace_wait (ptid_t ptid, struct target_waitstatus *ourstatus)
tts.tts_u.tts_exec.tts_pathlen, 0) == -1)
perror_with_name (("ttrace"));
ourstatus->value.execd_pathname[tts.tts_u.tts_exec.tts_pathlen] = 0;
+
+ /* At this point, all inserted breakpoints are gone. Doing this
+ as soon as we detect an exec prevents the badness of deleting
+ a breakpoint writing the current "shadow contents" to lift
+ the bp. That shadow is NOT valid after an exec. */
+ mark_breakpoints_out ();
break;
case TTEVT_EXIT: