Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Kevin Buettner <kevinb@redhat.com>
To: gdb-patches@sources.redhat.com
Subject: [PATCH] ui-out.c: Remove some unnecessary casts
Date: Fri, 26 Jul 2002 19:08:00 -0000	[thread overview]
Message-ID: <1020727015827.ZM20926@localhost.localdomain> (raw)

I've just committed the patch below.  The casts in question were causing
the upper bits of addresses to be chopped off when displaying addresses
for a 64-bit target on a 32-bit host.

	* ui-out.c (ui_out_field_core_addr): Remove unnecessary cast in
	calls to local_hex_string_custom().

Index: ui-out.c
===================================================================
RCS file: /cvs/src/src/gdb/ui-out.c,v
retrieving revision 1.22
diff -u -p -r1.22 ui-out.c
--- ui-out.c	5 May 2002 03:17:21 -0000	1.22
+++ ui-out.c	27 Jul 2002 01:49:58 -0000
@@ -497,9 +497,9 @@ ui_out_field_core_addr (struct ui_out *u
      based on TARGET_ADDR_BIT.  */
   /* print_address_numeric (address, 1, local_stream); */
   if (TARGET_ADDR_BIT <= 32)
-    strcpy (addstr, local_hex_string_custom ((unsigned long) address, "08l"));
+    strcpy (addstr, local_hex_string_custom (address, "08l"));
   else
-    strcpy (addstr, local_hex_string_custom ((unsigned long) address, "016l"));
+    strcpy (addstr, local_hex_string_custom (address, "016l"));
 
   ui_out_field_string (uiout, fldname, addstr);
 }


                 reply	other threads:[~2002-07-27  1:58 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=1020727015827.ZM20926@localhost.localdomain \
    --to=kevinb@redhat.com \
    --cc=gdb-patches@sources.redhat.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