From patchwork Tue Sep 15 08:56:02 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yao Qi X-Patchwork-Id: 8693 Received: (qmail 117753 invoked by alias); 15 Sep 2015 08:56:14 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 117740 invoked by uid 89); 15 Sep 2015 08:56:13 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-wi0-f173.google.com Received: from mail-wi0-f173.google.com (HELO mail-wi0-f173.google.com) (209.85.212.173) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Tue, 15 Sep 2015 08:56:12 +0000 Received: by wiclk2 with SMTP id lk2so18470203wic.0 for ; Tue, 15 Sep 2015 01:56:09 -0700 (PDT) X-Received: by 10.194.250.40 with SMTP id yz8mr40889070wjc.37.1442307369695; Tue, 15 Sep 2015 01:56:09 -0700 (PDT) Received: from E107787-LIN ([195.154.84.196]) by smtp.gmail.com with ESMTPSA id fr10sm18697909wib.14.2015.09.15.01.56.08 (version=TLS1_2 cipher=AES128-SHA256 bits=128/128); Tue, 15 Sep 2015 01:56:08 -0700 (PDT) From: Yao Qi To: Don Breazeal Cc: Subject: Re: [pushed][PATCH v3 1/4] Extended-remote follow exec References: <1441996698-12694-1-git-send-email-donb@codesourcery.com> Date: Tue, 15 Sep 2015 09:56:02 +0100 In-Reply-To: <1441996698-12694-1-git-send-email-donb@codesourcery.com> (Don Breazeal's message of "Fri, 11 Sep 2015 11:38:15 -0700") Message-ID: <86lhc83vtp.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 X-IsSubscribed: yes Don Breazeal writes: Hi Don, I happen to read the code you pushed in some days ago... > @@ -2111,6 +2112,12 @@ handle_query (char *own_buf, int packet_len, int *new_packet_len_p) > if (target_supports_vfork_events ()) > report_vfork_events = 1; > } > + if (strcmp (p, "exec-events+") == 0) Shouldn't we use "else if"? > + { > + /* GDB supports and wants exec events if possible. */ > + if (target_supports_exec_events ()) > + report_exec_events = 1; > + } > else > target_process_qsupported (p); diff --git a/gdb/gdbserver/server.c b/gdb/gdbserver/server.c index 1481c47..c82c232 100644 --- a/gdb/gdbserver/server.c +++ b/gdb/gdbserver/server.c @@ -2112,7 +2112,7 @@ handle_query (char *own_buf, int packet_len, int *new_packet_len_p) if (target_supports_vfork_events ()) report_vfork_events = 1; } - if (strcmp (p, "exec-events+") == 0) + else if (strcmp (p, "exec-events+") == 0) { /* GDB supports and wants exec events if possible. */ if (target_supports_exec_events ())