This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFC] Re: Proposed fix to gdb for printing 64-bit addresses
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: Michal Ludvig <mludvig at suse dot cz>
- Cc: Brian Taylor <briant at model dot com>, gdb-patches at sources dot redhat dot com,Andrew Cagney <ac131313 at redhat dot com>
- Date: Tue, 7 May 2002 10:55:58 -0400
- Subject: Re: [RFC] Re: Proposed fix to gdb for printing 64-bit addresses
- References: <3CCD8E01.2020500@model.com> <3CD7D446.5020800@suse.cz>
On Tue, May 07, 2002 at 03:19:02PM +0200, Michal Ludvig wrote:
> Hi,
> unfortunately this produces quite ugly output on x86-64 where the
> debugged code usually lives on low addresses and thus the PC is
> prepended with a long string of zeros. Now:
> #0 0x00000000004000d3 in cpyptrs () at dwarf.c:11
> #1 0x00000000004000f8 in func () at dwarf.c:19
>
> I propose to change the format string from "016l" to just "l" so that
> only valid digits will be printed:
> #0 0x4000d3 in cpyptrs () at dwarf.c:11
> #1 0x4000f8 in func () at dwarf.c:19
>
> Than there is no need for different handling of 32/64b archs.
>
> Comments?
I'd rather not do that, actually; I find it very confusing when a
seven-digit hex number is printed (I assume it is an eight-digit one).
It might be appropriate to print just eight digits of low 64-bit
addresses... I don't feel too strongly about this issue, though.
Anyone else have an opinion?
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer