Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Wei-cheng Wang <cole945@gmail.com>
To: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: Ulrich Weigand <uweigand@de.ibm.com>,
	gdb-patches@sourceware.org,
	 Joel Brobecker <brobecker@adacore.com>
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]
Date: Sun, 18 Jan 2015 08:01:00 -0000	[thread overview]
Message-ID: <54BB676B.2090101@gmail.com> (raw)
In-Reply-To: <20150118065908.GA12626@host2.jankratochvil.net>

On 2015/1/18 下午 02:59, Jan Kratochvil wrote:
> GDB has paddress(), core_addr_to_string() and hex_string() instead while the
> codebase uses these three interchangeably.  But the codebase uses even the
> %lx+long form.

Using %s+paddress instead of %lx+long in this patch.

Thanks,
Wei-cheng

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;
      }

--


  reply	other threads:[~2015-01-18  8:01 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-06 18:00 [PATCH 2/3 v2] Process record support for PowerPC Wei-cheng Wang
2014-12-08 19:12 ` Ulrich Weigand
2014-12-17 17:07   ` [PATCH 2/3 v3] " Wei-cheng Wang
2014-12-17 18:41     ` Ulrich Weigand
2014-12-25 17:27       ` [PATCH 2/3 v4] " Wei-cheng Wang
2015-01-01 14:19         ` Ulrich Weigand
2015-01-04 16:27           ` Wei-cheng Wang
2015-01-06 12:42             ` Ulrich Weigand
2015-01-17  6:02               ` Wei-cheng Wang
2015-01-17 11:47                 ` Ulrich Weigand
2015-01-17 18:53                   ` Joel Brobecker
2015-01-17 21:20                     ` 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] Jan Kratochvil
2015-01-18  4:47                       ` Wei-cheng Wang
2015-01-18  7:01                         ` Jan Kratochvil
2015-01-18  8:01                           ` Wei-cheng Wang [this message]
2015-01-19  7:48                             ` Joel Brobecker
2015-01-19 16:10                               ` [PATCH 2/3 v4] Process record support for PowerPC Wei-cheng Wang
2015-01-19 18:05                                 ` Ulrich Weigand
2015-01-20 16:03                                   ` Wei-cheng Wang
2015-01-20 18:14                                     ` Ulrich Weigand
2015-01-26 17:19                                       ` Ulrich Weigand
2015-01-26 17:19                                         ` Wei-cheng Wang
2015-01-26 19:16                                           ` Doug Evans
2015-01-26 20:29                                             ` Doug Evans

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=54BB676B.2090101@gmail.com \
    --to=cole945@gmail.com \
    --cc=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=jan.kratochvil@redhat.com \
    --cc=uweigand@de.ibm.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