X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gdb%2Flinux-nat.c;h=ce3df53f5dbc99bb45400e813056c0318b312b9d;hb=25b22b0a6f353d95932f8ee0b9bf861d3eed3261;hp=964337884e088394e41c961b05f88288354e6242;hpb=cce9b6bff92ae507e4517198c4b64e268f975760;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c index 964337884e..ce3df53f5d 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; }