public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Pedro Alves <pedro@codesourcery.com>
To: gdb-patches@sourceware.org
Cc: Yao Qi <yao@codesourcery.com>
Subject: Re: [PATCH,ARM] Fix single step on vfork
Date: Wed, 01 Sep 2010 17:11:00 -0000	[thread overview]
Message-ID: <201009011811.10735.pedro@codesourcery.com> (raw)
In-Reply-To: <4C7E85C0.3050902@codesourcery.com>

On Wednesday 01 September 2010 17:56:32, Yao Qi wrote:
> 
> +  /* 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 waiting for vfork_done event.  */

This last sentence looks incomplete?  At least, I can't seem to
parse it.

> +  if (current_inferior()->waiting_for_vfork_done)

Space before parens.

> +    {
> +      if (debug_infrun)
> +       fprintf_unfiltered (gdb_stdlog,
> +                           "infrun: resume : clear step\n");
> +      step = 0;
> +    }
> +
>    if (debug_infrun)
>      fprintf_unfiltered (gdb_stdlog,
>                          "infrun: resume (step=%d, signal=%d), "
> @@ -1577,11 +1590,16 @@ a command like `return' or `jump' to continue execution."));
>       We can't use displaced stepping when we have a signal to deliver;
>       the comments for displaced_step_prepare explain why.  The
>       comments in the handle_inferior event for dealing with 'random
> -     signals' explain what we do instead.  */
> +     signals' explain what we do instead.
> +
> +     We can't use displaced stepping when we are waiting for vfork_done
> +     event, displaced stepping breaks the vfork child similarly as single
> +     step software breakpoint.  */
>    if (use_displaced_stepping (gdbarch)
>        && (tp->trap_expected
>           || (step && gdbarch_software_single_step_p (gdbarch)))
> -      && sig == TARGET_SIGNAL_0)
> +      && sig == TARGET_SIGNAL_0
> +      && !current_inferior()->waiting_for_vfork_done)

Space before parens.

Otherwise okay.  Thanks!

-- 
Pedro Alves

  reply	other threads:[~2010-09-01 17:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-01 16:56 Yao Qi
2010-09-01 17:11 ` Pedro Alves [this message]
2010-09-02  3:03   ` Yao Qi
2010-09-06 14:09     ` Pedro Alves
2010-09-06 14:25       ` Yao Qi
2010-09-06 14:56         ` Pedro Alves
2010-09-08 17:23           ` Yao Qi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201009011811.10735.pedro@codesourcery.com \
    --to=pedro@codesourcery.com \
    --cc=gdb-patches@sourceware.org \
    --cc=yao@codesourcery.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).