diff options
author | Pedro Alves <palves@redhat.com> | 2010-09-06 14:22:07 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2010-09-06 14:22:07 +0000 |
commit | 48f9886d473c936907a5d1647cd5f1dd4bb9e36c (patch) | |
tree | b1aa25d3fbcab63ceb31b6a772da6b2b19c102ee /gdb/infrun.c | |
parent | 423ec54cd3a05bdd5835076e3afe962fe4dd025b (diff) | |
download | gdb-48f9886d473c936907a5d1647cd5f1dd4bb9e36c.zip gdb-48f9886d473c936907a5d1647cd5f1dd4bb9e36c.tar.gz gdb-48f9886d473c936907a5d1647cd5f1dd4bb9e36c.tar.bz2 |
* infrun.c (resume): Extend comment on ignoring single-step
requests on vfork parents waiting for a vfork-done.
Diffstat (limited to 'gdb/infrun.c')
-rw-r--r-- | gdb/infrun.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/gdb/infrun.c b/gdb/infrun.c index b21fd3f..a6f8fd1 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -1560,13 +1560,19 @@ resume (int step, enum target_signal sig) QUIT; - /* Don't consider single-stepping when the inferior is - waiting_for_vfork_done, either software or hardware step. In - software step, child process will hit the software single step - breakpoint inserted in parent process. In hardware step, GDB - can resumes inferior, and wait for vfork_done event. */ if (current_inferior ()->waiting_for_vfork_done) { + /* Don't try to single-step a vfork parent that is waiting for + the child to get out of the shared memory region (by exec'ing + or exiting). This is particularly important on software + single-step archs, as the child process would trip on the + software single step breakpoint inserted for the parent + process. Since the parent will not actually execute any + instruction until the child is out of the shared region (such + are vfork's semantics), it is safe to simply continue it. + Eventually, we'll see a TARGET_WAITKIND_VFORK_DONE event for + the parent, and tell it to `keep_going', which automatically + re-sets it stepping. */ if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: resume : clear step\n"); |