From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10884 invoked by alias); 4 May 2008 00:15:48 -0000 Received: (qmail 10876 invoked by uid 22791); 4 May 2008 00:15:47 -0000 X-Spam-Check-By: sourceware.org Received: from mail3.caviumnetworks.com (HELO mail3.caviumnetworks.com) (12.108.191.235) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sun, 04 May 2008 00:15:28 +0000 Received: from exch4.caveonetworks.com (Not Verified[192.168.16.23]) by mail3.caviumnetworks.com with MailMarshal (v6,2,2,3503) id ; Sat, 03 May 2008 20:15:29 -0400 Received: from exch4.caveonetworks.com ([192.168.16.23]) by exch4.caveonetworks.com with Microsoft SMTPSVC(6.0.3790.3959); Sat, 3 May 2008 17:15:26 -0700 Received: from localhost.localdomain ([64.169.86.201]) by exch4.caveonetworks.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.3959); Sat, 3 May 2008 17:15:26 -0700 Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by localhost.localdomain (8.14.2/8.13.7/Debian-2) with ESMTP id m440FOwA017789; Sat, 3 May 2008 17:15:24 -0700 Received: (from anemet@localhost) by localhost.localdomain (8.14.2/8.13.7/Submit) id m440FFN6017786; Sat, 3 May 2008 17:15:15 -0700 From: Adam Nemet MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <18461.19.864624.156635@localhost.localdomain> Date: Sun, 04 May 2008 00:43:00 -0000 To: Pedro Alves Cc: gdb-patches@sourceware.org Subject: Re: [PATCH] add-symbol-file not to print address truncated In-Reply-To: <200805040053.27168.pedro@codesourcery.com> References: <18460.63329.752236.534872@localhost.localdomain> <200805040043.26994.pedro@codesourcery.com> <18460.63955.147821.776423@localhost.localdomain> <200805040053.27168.pedro@codesourcery.com> X-Mailer: VM 7.17 under 21.4 (patch 20) "Double Solitaire" XEmacs Lucid 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: 2008-05/txt/msg00156.txt.bz2 Pedro Alves writes: > Ah, that looks like paddress then, except for the width. Right, I missed that. Thanks. I really don't care about width except that that was what allowed me to reuse this function. I can retest the patch without those bits then (which is pretty much an obvious patch now) like: * symfile.c (add_symbol_file_command): Use paddress rather than hex_string to print the address. Index: symfile.c =================================================================== RCS file: /cvs/src/src/gdb/symfile.c,v retrieving revision 1.199 diff -F^\([(a-zA-Z0-9_]\|#define\) -u -p -u -r1.199 symfile.c --- symfile.c 21 Apr 2008 14:25:16 -0000 1.199 +++ symfile.c 4 May 2008 00:11:11 -0000 @@ -2239,8 +2239,7 @@ add_symbol_file_command (char *args, int entered on the command line. */ section_addrs->other[sec_num].name = sec; section_addrs->other[sec_num].addr = addr; - printf_unfiltered ("\t%s_addr = %s\n", - sec, hex_string ((unsigned long)addr)); + printf_unfiltered ("\t%s_addr = %s\n", sec, paddress (addr)); sec_num++; /* The object's sections are initialized when a