public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: gdb-patches@sourceware.org
Subject: [PATCH] sim: d10v: clean up pointer casts
Date: Mon,  1 Nov 2021 00:05:30 -0400	[thread overview]
Message-ID: <20211101040530.10235-1-vapier@gentoo.org> (raw)

Use %p to print pointers instead of trying to cast them to longs.
---
 sim/d10v/interp.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/sim/d10v/interp.c b/sim/d10v/interp.c
index c48e39a27d6b..228ca3ea6e49 100644
--- a/sim/d10v/interp.c
+++ b/sim/d10v/interp.c
@@ -682,11 +682,11 @@ xfer_mem (SIM_DESC sd,
     {
       sim_io_printf
 	(sd,
-	 "sim_%s %d bytes: 0x%08" PRIxTA " (%s) -> 0x%08lx (%s) -> 0x%08lx (%s)\n",
+	 "sim_%s %d bytes: 0x%08" PRIxTA " (%s) -> 0x%08lx (%s) -> %p (%s)\n",
 	 write_p ? "write" : "read",
 	 phys_size, virt, last_from,
 	 phys, last_to,
-	 (long) memory, last_segname);
+	 memory, last_segname);
     }
 #endif
 
@@ -887,10 +887,10 @@ dmem_addr (SIM_DESC sd, SIM_CPU *cpu, uint16 offset)
     {
       sim_io_printf
 	(sd,
-	 "mem: 0x%08x (%s) -> 0x%08lx %d (%s) -> 0x%08lx (%s)\n",
+	 "mem: 0x%08x (%s) -> 0x%08lx %d (%s) -> %p (%s)\n",
 	 offset, last_from,
 	 phys, phys_size, last_to,
-	 (long) mem, last_segname);
+	 mem, last_segname);
     }
 #endif
   return mem;
@@ -911,10 +911,10 @@ imem_addr (SIM_DESC sd, SIM_CPU *cpu, uint32 offset)
     {
       sim_io_printf
 	(sd,
-	 "mem: 0x%08x (%s) -> 0x%08lx %d (%s) -> 0x%08lx (%s)\n",
+	 "mem: 0x%08x (%s) -> 0x%08lx %d (%s) -> %p (%s)\n",
 	 offset, last_from,
 	 phys, phys_size, last_to,
-	 (long) mem, last_segname);
+	 mem, last_segname);
     }
 #endif
   return mem;
-- 
2.33.0


                 reply	other threads:[~2021-11-01  4:05 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20211101040530.10235-1-vapier@gentoo.org \
    --to=vapier@gentoo.org \
    --cc=gdb-patches@sourceware.org \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).