* infrun.c (resume): Extend comment on ignoring single-step
requests on vfork parents waiting for a vfork-done.
This commit is contained in:
parent
423ec54cd3
commit
48f9886d47
2 changed files with 16 additions and 5 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2010-09-06 Pedro Alves <pedro@codesourcery.com>
|
||||||
|
|
||||||
|
* infrun.c (resume): Extend comment on ignoring single-step
|
||||||
|
requests on vfork parents waiting for a vfork-done.
|
||||||
|
|
||||||
2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
|
2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||||
Pedro Alves <pedro@codesourcery.com>
|
Pedro Alves <pedro@codesourcery.com>
|
||||||
|
|
||||||
|
|
16
gdb/infrun.c
16
gdb/infrun.c
|
@ -1560,13 +1560,19 @@ resume (int step, enum target_signal sig)
|
||||||
|
|
||||||
QUIT;
|
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)
|
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)
|
if (debug_infrun)
|
||||||
fprintf_unfiltered (gdb_stdlog,
|
fprintf_unfiltered (gdb_stdlog,
|
||||||
"infrun: resume : clear step\n");
|
"infrun: resume : clear step\n");
|
||||||
|
|
Loading…
Add table
Reference in a new issue