This is the mail archive of the
gdb-cvs@sourceware.org
mailing list for the GDB project.
[binutils-gdb/gdb-7.9-branch] Fix format warning in rs6000t-dep.c
- From: Wei-Cheng Wang <weicheng at sourceware dot org>
- To: gdb-cvs at sourceware dot org
- Date: 26 Jan 2015 16:13:09 -0000
- Subject: [binutils-gdb/gdb-7.9-branch] Fix format warning in rs6000t-dep.c
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=6c3e7fa837c0885fbf1f5a9203c3cb720d55ab76
commit 6c3e7fa837c0885fbf1f5a9203c3cb720d55ab76
Author: Wei-cheng Wang <cole945@gmail.com>
Date: Sun Jan 18 15:20:46 2015 +0800
Fix format warning in rs6000t-dep.c
gdb/ChangeLog
Backport from mainline:
* rs6000-tdep.c (ppc_process_record_op4, ppc_process_record_op19,
ppc_process_record_op31, ppc_process_record_op59,
ppc_process_record_op60, ppc_process_record_op63,
ppc_process_record): Fix -Wformat warning.
* rs6000-tdep.c (rs6000_epilogue_frame_cache, ppc_process_record_op60):
Remove unused variables.
Diff:
---
gdb/ChangeLog | 11 +++++++++++
gdb/rs6000-tdep.c | 33 ++++++++++++++++-----------------
2 files changed, 27 insertions(+), 17 deletions(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index dee10f2..666315e 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -2,6 +2,17 @@
Backport from mainline:
+ * rs6000-tdep.c (ppc_process_record_op4, ppc_process_record_op19,
+ ppc_process_record_op31, ppc_process_record_op59,
+ ppc_process_record_op60, ppc_process_record_op63,
+ ppc_process_record): Fix -Wformat warning.
+ * rs6000-tdep.c (rs6000_epilogue_frame_cache, ppc_process_record_op60):
+ Remove unused variables.
+
+2015-01-26 Wei-cheng Wang <cole945@gmail.com>
+
+ Backport from mainline:
+
* ppc-linux-tdep.c (ppc_skip_trampoline_code):
Scan PLT stub backward for reverse debugging.
* ppc64-tdep.c (ppc64_skip_trampoline_code): Likewise.
diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c
index 75811d1..6e37622 100644
--- a/gdb/rs6000-tdep.c
+++ b/gdb/rs6000-tdep.c
@@ -3356,7 +3356,6 @@ rs6000_epilogue_frame_cache (struct frame_info *this_frame, void **this_cache)
struct rs6000_frame_cache *cache;
struct gdbarch *gdbarch = get_frame_arch (this_frame);
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
- CORE_ADDR sp;
if (*this_cache)
return *this_cache;
@@ -3957,8 +3956,8 @@ ppc_process_record_op4 (struct gdbarch *gdbarch, struct regcache *regcache,
return 0;
}
- fprintf_unfiltered (gdb_stdlog, "Warning: Don't know how to record "
- "%08x at %08lx, 4-%d.\n", insn, addr, ext);
+ fprintf_unfiltered (gdb_stdlog, "Warning: Don't know how to record %08x "
+ "at %s, 4-%d.\n", insn, paddress (gdbarch, addr), ext);
return -1;
}
@@ -4000,8 +3999,8 @@ ppc_process_record_op19 (struct gdbarch *gdbarch, struct regcache *regcache,
return 0;
}
- fprintf_unfiltered (gdb_stdlog, "Warning: Don't know how to record "
- "%08x at %08lx, 19-%d.\n", insn, addr, ext);
+ fprintf_unfiltered (gdb_stdlog, "Warning: Don't know how to record %08x "
+ "at %s, 19-%d.\n", insn, paddress (gdbarch, addr), ext);
return -1;
}
@@ -4458,7 +4457,8 @@ ppc_process_record_op31 (struct gdbarch *gdbarch, struct regcache *regcache,
case 878: /* Transaction Abort Doubleword Conditional Immediate */
case 910: /* Transaction Abort */
fprintf_unfiltered (gdb_stdlog, "Cannot record Transaction instructions. "
- "%08x at %08lx, 31-%d.\n", insn, addr, ext);
+ "%08x at %s, 31-%d.\n",
+ insn, paddress (gdbarch, addr), ext);
return -1;
case 1014: /* Data Cache Block set to Zero */
@@ -4477,8 +4477,8 @@ ppc_process_record_op31 (struct gdbarch *gdbarch, struct regcache *regcache,
}
UNKNOWN_OP:
- fprintf_unfiltered (gdb_stdlog, "Warning: Don't know how to record "
- "%08x at %08lx, 31-%d.\n", insn, addr, ext);
+ fprintf_unfiltered (gdb_stdlog, "Warning: Don't know how to record %08x "
+ "at %s, 31-%d.\n", insn, paddress (gdbarch, addr), ext);
return -1;
}
@@ -4569,8 +4569,8 @@ ppc_process_record_op59 (struct gdbarch *gdbarch, struct regcache *regcache,
return 0;
}
- fprintf_unfiltered (gdb_stdlog, "Warning: Don't know how to record "
- "%08x at %08lx, 59-%d.\n", insn, addr, ext);
+ fprintf_unfiltered (gdb_stdlog, "Warning: Don't know how to record %08x "
+ "at %s, 59-%d.\n", insn, paddress (gdbarch, addr), ext);
return -1;
}
@@ -4582,7 +4582,6 @@ ppc_process_record_op60 (struct gdbarch *gdbarch, struct regcache *regcache,
{
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
int ext = PPC_EXTOP (insn);
- int tmp;
switch (ext >> 2)
{
@@ -4852,8 +4851,8 @@ ppc_process_record_op60 (struct gdbarch *gdbarch, struct regcache *regcache,
return 0;
}
- fprintf_unfiltered (gdb_stdlog, "Warning: Don't know how to record "
- "%08x at %08lx, 60-%d.\n", insn, addr, ext);
+ fprintf_unfiltered (gdb_stdlog, "Warning: Don't know how to record %08x "
+ "at %s, 60-%d.\n", insn, paddress (gdbarch, addr), ext);
return -1;
}
@@ -5018,8 +5017,8 @@ ppc_process_record_op63 (struct gdbarch *gdbarch, struct regcache *regcache,
}
- fprintf_unfiltered (gdb_stdlog, "Warning: Don't know how to record "
- "%08x at %08lx, 59-%d.\n", insn, addr, ext);
+ fprintf_unfiltered (gdb_stdlog, "Warning: Don't know how to record %08x "
+ "at %s, 59-%d.\n", insn, paddress (gdbarch, addr), ext);
return -1;
}
@@ -5298,8 +5297,8 @@ ppc_process_record (struct gdbarch *gdbarch, struct regcache *regcache,
default:
UNKNOWN_OP:
- fprintf_unfiltered (gdb_stdlog, "Warning: Don't know how to record "
- "%08x at %08lx, %d.\n", insn, addr, op6);
+ fprintf_unfiltered (gdb_stdlog, "Warning: Don't know how to record %08x "
+ "at %s, %d.\n", insn, paddress (gdbarch, addr), op6);
return -1;
}