From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20298 invoked by alias); 7 Jan 2009 12:27:16 -0000 Received: (qmail 20290 invoked by uid 22791); 7 Jan 2009 12:27:16 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 07 Jan 2009 12:27:10 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id D28CB2A9676 for ; Wed, 7 Jan 2009 07:27:08 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 2NJdh6qZ9UhZ for ; Wed, 7 Jan 2009 07:27:08 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 573362A9675 for ; Wed, 7 Jan 2009 07:27:08 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id 44FC1E7ACD; Wed, 7 Jan 2009 16:27:01 +0400 (RET) Date: Wed, 07 Jan 2009 12:27:00 -0000 From: Joel Brobecker To: gdb-patches@sourceware.org Subject: [RFA/commit] arch-utils.c: Use host_address_to_string when printing function addresses Message-ID: <20090107122701.GJ1751@adacore.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="9Q2l3mYpK16UQ/iv" Content-Disposition: inline User-Agent: Mutt/1.4.2.2i Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-01/txt/msg00091.txt.bz2 --9Q2l3mYpK16UQ/iv Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 451 Similar to what I did in gdbarch.sh/gdbarch.c, this patch uses host_address_to_string to transform addresses into strings, rather than printing them as longs... 2009-01-07 Joel Brobecker * arch-utils.c (gdbarch_update_p): Use host_address_to_string to print the address of the gdbarch pointer. Tested on x86-linux. Will commit at the same time as the gdbarch.sh patch if there are no objections. -- Joel --9Q2l3mYpK16UQ/iv Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="arch-utils.diff" Content-length: 995 diff --git a/gdb/arch-utils.c b/gdb/arch-utils.c index 41c4933..c1ea9da 100644 --- a/gdb/arch-utils.c +++ b/gdb/arch-utils.c @@ -495,8 +495,8 @@ gdbarch_update_p (struct gdbarch_info info) { if (gdbarch_debug) fprintf_unfiltered (gdb_stdlog, "gdbarch_update_p: " - "Architecture 0x%08lx (%s) unchanged\n", - (long) new_gdbarch, + "Architecture %s (%s) unchanged\n", + host_address_to_string (new_gdbarch), gdbarch_bfd_arch_info (new_gdbarch)->printable_name); return 1; } @@ -504,8 +504,8 @@ gdbarch_update_p (struct gdbarch_info info) /* It's a new architecture, swap it in. */ if (gdbarch_debug) fprintf_unfiltered (gdb_stdlog, "gdbarch_update_p: " - "New architecture 0x%08lx (%s) selected\n", - (long) new_gdbarch, + "New architecture %s (%s) selected\n", + host_address_to_string (new_gdbarch), gdbarch_bfd_arch_info (new_gdbarch)->printable_name); deprecated_current_gdbarch_select_hack (new_gdbarch); --9Q2l3mYpK16UQ/iv--