Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Yao Qi <qiyaoltc@gmail.com>
To: Pedro Alves <palves@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH/7.10 1/2] Linux gdbserver confused when event randomization returns a process exit event
Date: Mon, 03 Aug 2015 10:59:00 -0000	[thread overview]
Message-ID: <86io8weize.fsf@gmail.com> (raw)
In-Reply-To: <1438362229-27653-2-git-send-email-palves@redhat.com> (Pedro	Alves's message of "Fri, 31 Jul 2015 18:03:48 +0100")

Pedro Alves <palves@redhat.com> writes:

> @@ -3128,7 +3116,7 @@ linux_wait_1 (ptid_t ptid,
>  		   || (gdb_breakpoint_here (event_child->stop_pc)
>  		       && gdb_condition_true_at_breakpoint (event_child->stop_pc)
>  		       && gdb_no_commands_at_breakpoint (event_child->stop_pc))
> -		   || extended_event_reported (&event_child->waitstatus));
> +		   || event_child->waitstatus.kind != TARGET_WAITKIND_IGNORE);
>  
>    run_breakpoint_commands (event_child->stop_pc);
>  
> @@ -3150,9 +3138,11 @@ linux_wait_1 (ptid_t ptid,
>  			  paddress (event_child->stop_pc),
>  			  paddress (event_child->step_range_start),
>  			  paddress (event_child->step_range_end));
> -	  if (extended_event_reported (&event_child->waitstatus))
> +	  if (event_child->waitstatus.kind != TARGET_WAITKIND_IGNORE)
>  	    {
> -	      char *str = target_waitstatus_to_string (ourstatus);
> +	      char *str;
> +
> +	      str = target_waitstatus_to_string (&event_child->waitstatus);
>  	      debug_printf ("LWP %ld: extended event with waitstatus %s\n",
>  			    lwpid_of (get_lwp_thread (event_child)), str);
>  	      xfree (str);

Looks this code is dead code even without your patch. This code is
guarded by "if (!report_to_gdb)", but if report_to_gdb is false,
"(event_child->waitstatus.kind != TARGET_WAITKIND_IGNORE)" is false too.

-- 
Yao (齐尧)


  reply	other threads:[~2015-08-03 10:59 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-31 17:03 [PATCH/7.10 0/2] gdbserver: Fix several fork support (& co) issues Pedro Alves
2015-07-31 17:04 ` [PATCH/7.10 1/2] Linux gdbserver confused when event randomization returns a process exit event Pedro Alves
2015-08-03 10:59   ` Yao Qi [this message]
2015-08-06  9:34     ` [pushed][PATCH 1/3] Linux gdbserver fork event debug output (Re: [PATCH/7.10 1/2] Linux gdbserver confused when event randomization returns a process exit event) Pedro Alves
2015-08-06  9:43     ` [pushed]Re: [PATCH/7.10 1/2] Linux gdbserver confused when event randomization returns a process exit event Pedro Alves
2015-07-31 17:04 ` [PATCH/7.10 2/2] gdbserver: Fix non-stop / fork / step-over issues Pedro Alves
2015-07-31 18:04   ` Don Breazeal
2015-07-31 19:02     ` Pedro Alves
2015-08-05 22:19       ` Don Breazeal
2015-08-06 10:09         ` Pedro Alves
2015-08-03 15:14   ` Yao Qi
2015-08-03 16:20     ` Pedro Alves
2015-08-04 16:40       ` Pedro Alves
2015-08-05 11:41         ` Yao Qi
2015-08-05 15:10           ` Pedro Alves
2015-08-06  9:44             ` [pushed] " Pedro Alves

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=86io8weize.fsf@gmail.com \
    --to=qiyaoltc@gmail.com \
    --cc=gdb-patches@sourceware.org \
    --cc=palves@redhat.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