From patchwork Tue Jun 7 15:48:02 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Marchi X-Patchwork-Id: 12862 Received: (qmail 48653 invoked by alias); 7 Jun 2016 15:48:20 -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 48636 invoked by uid 89); 7 Jun 2016 15:48:18 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00, SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: usplmg21.ericsson.net Received: from usplmg21.ericsson.net (HELO usplmg21.ericsson.net) (198.24.6.65) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Tue, 07 Jun 2016 15:48:06 +0000 Received: from EUSAAHC006.ericsson.se (Unknown_Domain [147.117.188.90]) by usplmg21.ericsson.net (Symantec Mail Security) with SMTP id 8A.32.03614.B7CE6575; Tue, 7 Jun 2016 17:47:07 +0200 (CEST) Received: from [142.133.110.144] (147.117.188.8) by smtp-am.internal.ericsson.com (147.117.188.92) with Microsoft SMTP Server id 14.3.294.0; Tue, 7 Jun 2016 11:48:02 -0400 Subject: Re: [PATCH] Add method/format information to =record-started To: Yao Qi References: <20160603155220.22286-1-simon.marchi@ericsson.com> <86ziqywju7.fsf@gmail.com> <57557992.90908@ericsson.com> <86inxlwdhv.fsf@gmail.com> <5756C3CD.4070202@ericsson.com> <861t49vwjg.fsf@gmail.com> CC: "Metzger, Markus T" , "gdb-patches@sourceware.org" From: Simon Marchi Message-ID: <5756ECB2.3000909@ericsson.com> Date: Tue, 7 Jun 2016 11:48:02 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 MIME-Version: 1.0 In-Reply-To: <861t49vwjg.fsf@gmail.com> X-IsSubscribed: yes On 16-06-07 11:38 AM, Yao Qi wrote: > Simon Marchi writes: > >>>> else >>>> fprintf_unfiltered (mi->event_channel, >>>> "record-stopped,thread-group=\"i%d\"", inferior->num); >> >> I suppose here too? > > Yes, I think so. Ok, I pushed this patch to fix it: From 1aec0b6ad6eae1fa97bb1a4a47959ff204aa15a2 Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Tue, 7 Jun 2016 10:02:42 -0400 Subject: [PATCH] mi/mi-interp.c: Add missing braces gdb/ChangeLog: * mi/mi-interp.c (mi_record_changed): Add missing braces. --- gdb/ChangeLog | 4 ++++ gdb/mi/mi-interp.c | 26 ++++++++++++++++---------- 2 files changed, 20 insertions(+), 10 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index bd2d5d2..9c09269 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2016-06-07 Simon Marchi + + * mi/mi-interp.c (mi_record_changed): Add missing braces. + 2016-06-07 Bernhard Heckel * findvar.c (follow_static_link): Check for valid pointer. diff --git a/gdb/mi/mi-interp.c b/gdb/mi/mi-interp.c index 8ce816c..3bbdb1f 100644 --- a/gdb/mi/mi-interp.c +++ b/gdb/mi/mi-interp.c @@ -412,19 +412,25 @@ mi_record_changed (struct inferior *inferior, int started, const char *method, if (started) { if (format != NULL) - fprintf_unfiltered ( - mi->event_channel, - "record-started,thread-group=\"i%d\",method=\"%s\",format=\"%s\"", - inferior->num, method, format); + { + fprintf_unfiltered ( + mi->event_channel, + "record-started,thread-group=\"i%d\",method=\"%s\",format=\"%s\"", + inferior->num, method, format); + } else - fprintf_unfiltered ( - mi->event_channel, - "record-started,thread-group=\"i%d\",method=\"%s\"", - inferior->num, method); + { + fprintf_unfiltered ( + mi->event_channel, + "record-started,thread-group=\"i%d\",method=\"%s\"", + inferior->num, method); + } } else - fprintf_unfiltered (mi->event_channel, - "record-stopped,thread-group=\"i%d\"", inferior->num); + { + fprintf_unfiltered (mi->event_channel, + "record-stopped,thread-group=\"i%d\"", inferior->num); + } gdb_flush (mi->event_channel);