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 1/7] Merge async and sync code paths some more
Date: Tue, 18 Aug 2015 10:48:00 -0000	[thread overview]
Message-ID: <86wpws3ma3.fsf@gmail.com> (raw)
In-Reply-To: <1439398917-22761-2-git-send-email-palves@redhat.com> (Pedro	Alves's message of "Wed, 12 Aug 2015 18:01:51 +0100")

Pedro Alves <palves@redhat.com> writes:

> +  /* do only one step for now, before returning control to the event

s/do/Do

> +     loop.  Let the continuation figure out how many other steps we
> +     need to do, and handle them one at the time, through
> +     step_once.  */

> diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c
> index be7a915..fa8e5e3 100644
> --- a/gdb/linux-nat.c
> +++ b/gdb/linux-nat.c
> @@ -3442,12 +3442,6 @@ linux_nat_wait_1 (struct target_ops *ops,
>  			    target_pid_to_str (lp->ptid));
>      }
>  
> -  if (!target_is_async_p ())
> -    {
> -      /* Causes SIGINT to be passed on to the attached process.  */
> -      set_sigint_trap ();
> -    }
> -

so SIGINT is handled by event-top.c:handle_sigint in event loop, right?

>    /* But if we don't find a pending event, we'll have to wait.  Always
>       pull all events out of the kernel.  We'll randomly select an
>       event LWP out of all that have events, to prevent starvation.  */
> @@ -3518,9 +3512,6 @@ linux_nat_wait_1 (struct target_ops *ops,
>  
>  	  ourstatus->kind = TARGET_WAITKIND_NO_RESUMED;
>  
> -	  if (!target_is_async_p ())
> -	    clear_sigint_trap ();
> -
>  	  restore_child_signals_mask (&prev_mask);
>  	  return minus_one_ptid;
>  	}

> diff --git a/gdb/target.c b/gdb/target.c
> index e41a338..210cc70 100644
> --- a/gdb/target.c
> +++ b/gdb/target.c
> @@ -2229,6 +2229,17 @@ target_wait (ptid_t ptid, struct target_waitstatus *status, int options)
>    return (current_target.to_wait) (&current_target, ptid, status, options);
>  }
>  
> +/* See target.h.  */
> +
> +ptid_t
> +default_target_wait (ptid_t ptid,
> +		     struct target_waitstatus *status,
> +		     int options)
> +{
> +  status->kind = TARGET_WAITKIND_NO_RESUMED;
> +  return minus_one_ptid;
> +}
> +
>  char *
>  target_pid_to_str (ptid_t ptid)
>  {
> diff --git a/gdb/target.h b/gdb/target.h
> index e283c86..48e6857 100644
> --- a/gdb/target.h
> +++ b/gdb/target.h
> @@ -471,7 +471,7 @@ struct target_ops
>      ptid_t (*to_wait) (struct target_ops *,
>  		       ptid_t, struct target_waitstatus *,
>  		       int TARGET_DEBUG_PRINTER (target_debug_print_options))
> -      TARGET_DEFAULT_NORETURN (noprocess ());
> +      TARGET_DEFAULT_FUNC (default_to_wait);

s/default_to_wait/default_target_wait/ ?

Otherwise, the patch looks good to me.

-- 
Yao (齐尧)


  parent reply	other threads:[~2015-08-18 10:48 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-12 17:02 [PATCH 0/7] Replace continuations with an extendable "class" Pedro Alves
2015-08-12 17:02 ` [PATCH 3/7] Convert infcalls to thread_fsm mechanism Pedro Alves
2015-08-12 17:02 ` [PATCH 2/7] Replace "struct continuation" mechanism by something more extensible Pedro Alves
2015-08-18 12:50   ` Yao Qi
2015-08-19 14:55     ` Pedro Alves
2015-08-12 17:02 ` [PATCH 1/7] Merge async and sync code paths some more Pedro Alves
2015-08-12 19:48   ` Simon Marchi
2015-08-17 17:54     ` Pedro Alves
2015-08-17 19:28       ` Simon Marchi
2015-08-18 10:48   ` Yao Qi [this message]
2015-08-19 14:11     ` Pedro Alves
2015-08-27 13:26       ` Yao Qi
2015-10-16  0:35   ` Joel Brobecker
2015-10-16 12:24     ` Pedro Alves
2015-10-16 16:22       ` Joel Brobecker
2015-10-16 16:37         ` Pedro Alves
2015-10-16 17:05           ` Joel Brobecker
2015-10-22 16:18             ` Pedro Alves
2015-08-12 17:02 ` [PATCH 4/7] Convert the until/advance commands to thread_fsm mechanism Pedro Alves
2015-08-12 17:11 ` [PATCH 6/7] Garbage collect thread continuations Pedro Alves
2015-08-12 17:11 ` [PATCH 7/7] Delete enum inferior_event_handler::INF_TIMER Pedro Alves
2015-08-18 11:22   ` Yao Qi
2015-08-12 17:11 ` [PATCH 5/7] Garbage collect dummy_frame_ctx_saver Pedro Alves
2015-08-18 12:52 ` [PATCH 0/7] Replace continuations with an extendable "class" Yao Qi
2015-08-19 14:56   ` Pedro Alves
2015-09-09 17:33   ` 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=86wpws3ma3.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