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