diff options
author | Pedro Alves <palves@redhat.com> | 2008-07-08 10:59:57 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2008-07-08 10:59:57 +0000 |
commit | 25b22b0a6f353d95932f8ee0b9bf861d3eed3261 (patch) | |
tree | 71079bc123086beec131668ccfc9f6b1c64a24d5 /gdb/linux-nat.c | |
parent | cce9b6bff92ae507e4517198c4b64e268f975760 (diff) | |
download | gdb-25b22b0a6f353d95932f8ee0b9bf861d3eed3261.zip gdb-25b22b0a6f353d95932f8ee0b9bf861d3eed3261.tar.gz 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/linux-nat.c')
-rw-r--r-- | gdb/linux-nat.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c index 9643378..ce3df53 100644 --- a/gdb/linux-nat.c +++ b/gdb/linux-nat.c @@ -1758,6 +1758,16 @@ linux_handle_extended_wait (struct lwp_info *lp, int status, linux_parent_pid = 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. + + Note that we have to do this after the detach_breakpoints + call above, otherwise breakpoints wouldn't be lifted from the + parent on a vfork, because detach_breakpoints would think + that breakpoints are not inserted. */ + mark_breakpoints_out (); return 0; } |