Blame SOURCES/gdb-rhbz1218710-reverse-debugging-ppc-6of7.patch

7b26da
  Message-ID: <54BB676B.2090101@gmail.com>
7b26da
  Date: Sun, 18 Jan 2015 15:57:31 +0800
7b26da
  From: Wei-cheng Wang <cole945 at gmail dot com>
7b26da
  To: Jan Kratochvil <jan dot kratochvil at redhat dot com>
7b26da
  CC: Ulrich Weigand <uweigand at de dot ibm dot com>, gdb-patches at sourceware dot org,  Joel Brobecker <brobecker at adacore dot com>
7b26da
  Subject: Re: Broken build: rs6000-tdep.c: 32-bit host --enable-targets=all --enable-64-bit-bfd  [Re: [PATCH 2/3 v4] Process record support for PowerPC]
7b26da
7b26da
  On 2015/1/18 下午 02:59, Jan Kratochvil wrote:
7b26da
  > GDB has paddress(), core_addr_to_string() and hex_string() instead while the
7b26da
  > codebase uses these three interchangeably.  But the codebase uses even the
7b26da
  > %lx+long form.
7b26da
7b26da
  Using %s+paddress instead of %lx+long in this patch.
7b26da
7b26da
  Thanks,
7b26da
  Wei-cheng
7b26da
7b26da
7b26da
commit 810c102655475827a3174fb64b5e14beaa57ec3f
7b26da
Author: Wei-cheng Wang <cole945@gmail.com>
7b26da
Date:   Sun Jan 18 15:20:46 2015 +0800
7b26da
7b26da
    Fix format warning in rs6000t-dep.c
7b26da
7b26da
Index: gdb-7.6.1/gdb/rs6000-tdep.c
7b26da
===================================================================
7b26da
--- gdb-7.6.1.orig/gdb/rs6000-tdep.c
7b26da
+++ gdb-7.6.1/gdb/rs6000-tdep.c
7b26da
@@ -3405,7 +3405,6 @@ rs6000_epilogue_frame_cache (struct fram
7b26da
   struct rs6000_frame_cache *cache;
7b26da
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
7b26da
   struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
7b26da
-  CORE_ADDR sp;
7b26da
 
7b26da
   if (*this_cache)
7b26da
     return *this_cache;
7b26da
@@ -4006,8 +4005,8 @@ ppc_process_record_op4 (struct gdbarch *
7b26da
       return 0;
7b26da
     }
7b26da
 
7b26da
-  fprintf_unfiltered (gdb_stdlog, "Warning: Don't know how to record "
7b26da
-		      "%08x at %08lx, 4-%d.\n", insn, addr, ext);
7b26da
+  fprintf_unfiltered (gdb_stdlog, "Warning: Don't know how to record %08x "
7b26da
+		      "at %s, 4-%d.\n", insn, paddress (gdbarch, addr), ext);
7b26da
   return -1;
7b26da
 }
7b26da
 
7b26da
@@ -4049,8 +4048,8 @@ ppc_process_record_op19 (struct gdbarch
7b26da
       return 0;
7b26da
     }
7b26da
 
7b26da
-  fprintf_unfiltered (gdb_stdlog, "Warning: Don't know how to record "
7b26da
-		      "%08x at %08lx, 19-%d.\n", insn, addr, ext);
7b26da
+  fprintf_unfiltered (gdb_stdlog, "Warning: Don't know how to record %08x "
7b26da
+		      "at %s, 19-%d.\n", insn, paddress (gdbarch, addr), ext);
7b26da
   return -1;
7b26da
 }
7b26da
 
7b26da
@@ -4507,7 +4506,8 @@ ppc_process_record_op31 (struct gdbarch
7b26da
     case 878:		/* Transaction Abort Doubleword Conditional Immediate */
7b26da
     case 910:		/* Transaction Abort */
7b26da
       fprintf_unfiltered (gdb_stdlog, "Cannot record Transaction instructions. "
7b26da
-			  "%08x at %08lx, 31-%d.\n", insn, addr, ext);
7b26da
+			  "%08x at %s, 31-%d.\n",
7b26da
+			  insn, paddress (gdbarch, addr), ext);
7b26da
       return -1;
7b26da
 
7b26da
     case 1014:		/* Data Cache Block set to Zero */
7b26da
@@ -4526,8 +4526,8 @@ ppc_process_record_op31 (struct gdbarch
7b26da
     }
7b26da
 
7b26da
 UNKNOWN_OP:
7b26da
-  fprintf_unfiltered (gdb_stdlog, "Warning: Don't know how to record "
7b26da
-		      "%08x at %08lx, 31-%d.\n", insn, addr, ext);
7b26da
+  fprintf_unfiltered (gdb_stdlog, "Warning: Don't know how to record %08x "
7b26da
+		      "at %s, 31-%d.\n", insn, paddress (gdbarch, addr), ext);
7b26da
   return -1;
7b26da
 }
7b26da
 
7b26da
@@ -4618,8 +4618,8 @@ ppc_process_record_op59 (struct gdbarch
7b26da
       return 0;
7b26da
     }
7b26da
 
7b26da
-  fprintf_unfiltered (gdb_stdlog, "Warning: Don't know how to record "
7b26da
-		      "%08x at %08lx, 59-%d.\n", insn, addr, ext);
7b26da
+  fprintf_unfiltered (gdb_stdlog, "Warning: Don't know how to record %08x "
7b26da
+		      "at %s, 59-%d.\n", insn, paddress (gdbarch, addr), ext);
7b26da
   return -1;
7b26da
 }
7b26da
 
7b26da
@@ -4631,7 +4631,6 @@ ppc_process_record_op60 (struct gdbarch
7b26da
 {
7b26da
   struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
7b26da
   int ext = PPC_EXTOP (insn);
7b26da
-  int tmp;
7b26da
 
7b26da
   switch (ext >> 2)
7b26da
     {
7b26da
@@ -4901,8 +4900,8 @@ ppc_process_record_op60 (struct gdbarch
7b26da
       return 0;
7b26da
     }
7b26da
 
7b26da
-  fprintf_unfiltered (gdb_stdlog, "Warning: Don't know how to record "
7b26da
-		      "%08x at %08lx, 60-%d.\n", insn, addr, ext);
7b26da
+  fprintf_unfiltered (gdb_stdlog, "Warning: Don't know how to record %08x "
7b26da
+		      "at %s, 60-%d.\n", insn, paddress (gdbarch, addr), ext);
7b26da
   return -1;
7b26da
 }
7b26da
 
7b26da
@@ -5067,8 +5066,8 @@ ppc_process_record_op63 (struct gdbarch
7b26da
 
7b26da
     }
7b26da
 
7b26da
-  fprintf_unfiltered (gdb_stdlog, "Warning: Don't know how to record "
7b26da
-		      "%08x at %08lx, 59-%d.\n", insn, addr, ext);
7b26da
+  fprintf_unfiltered (gdb_stdlog, "Warning: Don't know how to record %08x "
7b26da
+		      "at %s, 59-%d.\n", insn, paddress (gdbarch, addr), ext);
7b26da
   return -1;
7b26da
 }
7b26da
 
7b26da
@@ -5347,8 +5346,8 @@ ppc_process_record (struct gdbarch *gdba
7b26da
 
7b26da
     default:
7b26da
 UNKNOWN_OP:
7b26da
-      fprintf_unfiltered (gdb_stdlog, "Warning: Don't know how to record "
7b26da
-			  "%08x at %08lx, %d.\n", insn, addr, op6);
7b26da
+      fprintf_unfiltered (gdb_stdlog, "Warning: Don't know how to record %08x "
7b26da
+			  "at %s, %d.\n", insn, paddress (gdbarch, addr), op6);
7b26da
       return -1;
7b26da
     }
7b26da