Blame SOURCES/gdb-rhbz1187581-power8-regs-7of7.patch

689258
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
689258
From: Jan Kratochvil <jan.kratochvil@redhat.com>
689258
Date: Thu, 9 Aug 2018 17:18:49 +0200
689258
Subject: gdb-rhbz1187581-power8-regs-7of7.patch
689258
689258
;; Add GDB support to access/display POWER8 registers (IBM, RH BZ 1187581).
689258
689258
commit a7f25a84f4cc1df5248c46346337f19a2a66af5a
689258
Author: Simon Marchi <simon.marchi@ericsson.com>
689258
Date:   Mon Aug 6 16:54:47 2018 -0400
689258
689258
    Fix compilation failure in remote.c
689258
689258
    A recent patch introduced a few of these:
689258
689258
    /home/emaisin/src/binutils-gdb/gdb/remote.c:12862:19: error: format not a string literal and no format arguments [-Werror=format-security]
689258
         error (err_msg);
689258
                       ^
689258
689258
    Fix them by replacing the call to error with
689258
689258
      error ("%s", err_msg);
689258
689258
    gdb/ChangeLog:
689258
689258
            * remote.c (remote_target::download_tracepoint): Fix format
689258
            string errors.
689258
689258
+2018-08-06  Simon Marchi  <simon.marchi@ericsson.com>
689258
+
689258
+	* remote.c (remote_target::download_tracepoint): Fix format
689258
+	string errors.
689258
+
689258
 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
689258
689258
 	* tracefile.c: Include common/byte-vector.h.
689258
689258
diff --git a/gdb/remote.c b/gdb/remote.c
689258
--- a/gdb/remote.c
689258
+++ b/gdb/remote.c
689258
@@ -12826,7 +12826,7 @@ remote_target::download_tracepoint (struct bp_location *loc)
689258
 		  t->step_count, t->pass_count);
689258
 
689258
   if (ret < 0 || ret >= buf.size ())
689258
-    error (err_msg);
689258
+    error ("%s", err_msg);
689258
 
689258
   /* Fast tracepoints are mostly handled by the target, but we can
689258
      tell the target how big of an instruction block should be moved
689258
@@ -12846,7 +12846,7 @@ remote_target::download_tracepoint (struct bp_location *loc)
689258
 			      gdb_insn_length (loc->gdbarch, tpaddr));
689258
 
689258
 	      if (ret < 0 || ret >= size_left)
689258
-		error (err_msg);
689258
+		error ("%s", err_msg);
689258
 	    }
689258
 	  else
689258
 	    /* If it passed validation at definition but fails now,
689258
@@ -12877,7 +12877,7 @@ remote_target::download_tracepoint (struct bp_location *loc)
689258
 			      size_left, ":S");
689258
 
689258
 	      if (ret < 0 || ret >= size_left)
689258
-		error (err_msg);
689258
+		error ("%s", err_msg);
689258
 	    }
689258
 	  else
689258
 	    error (_("Static tracepoint not valid during download"));
689258
@@ -12905,14 +12905,14 @@ remote_target::download_tracepoint (struct bp_location *loc)
689258
 			  size_left, ":X%x,", aexpr->len);
689258
 
689258
 	  if (ret < 0 || ret >= size_left)
689258
-	    error (err_msg);
689258
+	    error ("%s", err_msg);
689258
 
689258
 	  size_left = buf.size () - strlen (buf.data ());
689258
 
689258
 	  /* Two bytes to encode each aexpr byte, plus the terminating
689258
 	     null byte.  */
689258
 	  if (aexpr->len * 2 + 1 > size_left)
689258
-	    error (err_msg);
689258
+	    error ("%s", err_msg);
689258
 
689258
 	  pkt = buf.data () + strlen (buf.data ());
689258
 
689258
@@ -12933,7 +12933,7 @@ remote_target::download_tracepoint (struct bp_location *loc)
689258
 		      size_left, "-");
689258
 
689258
       if (ret < 0 || ret >= size_left)
689258
-	error (err_msg);
689258
+	error ("%s", err_msg);
689258
     }
689258
 
689258
   putpkt (buf.data ());
689258
@@ -12956,7 +12956,7 @@ remote_target::download_tracepoint (struct bp_location *loc)
689258
 		      has_more ? '-' : 0);
689258
 
689258
       if (ret < 0 || ret >= buf.size ())
689258
-	error (err_msg);
689258
+	error ("%s", err_msg);
689258
 
689258
       putpkt (buf.data ());
689258
       remote_get_noisy_reply ();
689258
@@ -12979,7 +12979,7 @@ remote_target::download_tracepoint (struct bp_location *loc)
689258
 		      has_more ? "-" : "");
689258
 
689258
       if (ret < 0 || ret >= buf.size ())
689258
-	error (err_msg);
689258
+	error ("%s", err_msg);
689258
 
689258
       putpkt (buf.data ());
689258
       remote_get_noisy_reply ();
689258
@@ -12994,7 +12994,7 @@ remote_target::download_tracepoint (struct bp_location *loc)
689258
 	  ret = snprintf (buf.data (), buf.size (), "QTDPsrc:");
689258
 
689258
 	  if (ret < 0 || ret >= buf.size ())
689258
-	    error (err_msg);
689258
+	    error ("%s", err_msg);
689258
 
689258
 	  encode_source_string (b->number, loc->address, "at",
689258
 				event_location_to_string (b->location.get ()),
689258
@@ -13010,7 +13010,7 @@ remote_target::download_tracepoint (struct bp_location *loc)
689258
 	  ret = snprintf (buf.data (), buf.size (), "QTDPsrc:");
689258
 
689258
 	  if (ret < 0 || ret >= buf.size ())
689258
-	    error (err_msg);
689258
+	    error ("%s", err_msg);
689258
 
689258
 	  encode_source_string (b->number, loc->address,
689258
 				"cond", b->cond_string,