From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 61815 invoked by alias); 18 Aug 2015 10:48:28 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 61804 invoked by uid 89); 18 Aug 2015 10:48:27 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-pa0-f45.google.com Received: from mail-pa0-f45.google.com (HELO mail-pa0-f45.google.com) (209.85.220.45) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Tue, 18 Aug 2015 10:48:26 +0000 Received: by pawq9 with SMTP id q9so33058090paw.3 for ; Tue, 18 Aug 2015 03:48:24 -0700 (PDT) X-Received: by 10.66.65.234 with SMTP id a10mr12196041pat.2.1439894904821; Tue, 18 Aug 2015 03:48:24 -0700 (PDT) Received: from E107787-LIN (gcc1-power7.osuosl.org. [140.211.15.137]) by smtp.gmail.com with ESMTPSA id fx4sm17628831pbb.92.2015.08.18.03.48.22 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 18 Aug 2015 03:48:24 -0700 (PDT) From: Yao Qi To: Pedro Alves Cc: gdb-patches@sourceware.org Subject: Re: [PATCH 1/7] Merge async and sync code paths some more References: <1439398917-22761-1-git-send-email-palves@redhat.com> <1439398917-22761-2-git-send-email-palves@redhat.com> Date: Tue, 18 Aug 2015 10:48:00 -0000 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") Message-ID: <86wpws3ma3.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2015-08/txt/msg00457.txt.bz2 Pedro Alves 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)); > } >=20=20 > - 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, >=20=20 > ourstatus->kind =3D TARGET_WAITKIND_NO_RESUMED; >=20=20 > - 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) (¤t_target, ptid, status, option= s); > } >=20=20 > +/* See target.h. */ > + > +ptid_t > +default_target_wait (ptid_t ptid, > + struct target_waitstatus *status, > + int options) > +{ > + status->kind =3D 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. --=20 Yao (=E9=BD=90=E5=B0=A7)