Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Simon Marchi <simon.marchi@ericsson.com>
To: Yao Qi <qiyaoltc@gmail.com>
Cc: "Metzger, Markus T" <markus.t.metzger@intel.com>,
	"gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [PATCH] Add method/format information to =record-started
Date: Tue, 07 Jun 2016 15:48:00 -0000	[thread overview]
Message-ID: <5756ECB2.3000909@ericsson.com> (raw)
In-Reply-To: <861t49vwjg.fsf@gmail.com>

On 16-06-07 11:38 AM, Yao Qi wrote:
> Simon Marchi <simon.marchi@ericsson.com> 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 <simon.marchi@ericsson.com>
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  <simon.marchi@ericsson.com>
+
+	* mi/mi-interp.c (mi_record_changed): Add missing braces.
+
 2016-06-07  Bernhard Heckel  <bernhard.heckel@intel.com>

 	* 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);
-- 
2.8.3



  reply	other threads:[~2016-06-07 15:48 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-03 15:52 Simon Marchi
2016-06-03 17:03 ` Simon Marchi
2016-06-06  6:38 ` Metzger, Markus T
2016-06-06 13:03   ` Yao Qi
2016-06-06 13:24     ` Simon Marchi
2016-06-07  9:32       ` Yao Qi
2016-06-07 12:53         ` Simon Marchi
2016-06-07 15:38           ` Yao Qi
2016-06-07 15:48             ` Simon Marchi [this message]
2016-06-06 13:07   ` Simon Marchi
2016-06-06 13:20     ` Metzger, Markus T
2016-06-06 13:39       ` Simon Marchi
2016-06-06 13:44         ` Metzger, Markus T
2016-06-06 13:49           ` Simon Marchi
2016-06-06 14:02             ` Metzger, Markus T
2016-06-06 14:28               ` Simon Marchi
2016-06-06 14:33                 ` Metzger, Markus T
2016-06-06 15:13             ` Eli Zaretskii
2016-06-06 21:12               ` Simon Marchi
2016-07-05 13:51 ` Yao Qi
2016-07-05 13:52   ` Simon Marchi

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=5756ECB2.3000909@ericsson.com \
    --to=simon.marchi@ericsson.com \
    --cc=gdb-patches@sourceware.org \
    --cc=markus.t.metzger@intel.com \
    --cc=qiyaoltc@gmail.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