[RFC] Re: Proposed fix to gdb for printing 64-bit addresses
Michal Ludvig
mludvig@suse.cz
Tue May 7 08:54:00 GMT 2002
Daniel Jacobowitz wrote:
> On Tue, May 07, 2002 at 03:19:02PM +0200, Michal Ludvig wrote:
>>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
>
> 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.
So what about changing 'strcpy(addstr, local_hex_string_custom((unsigned
long) address, "016l"))' to 'sprintf(addstr, "%010p", address)' ?
This would print _at_least_ 8 digits, but wouldn't cut it down when the
number is longer.
Michal Ludvig
--
* SuSE CR, s.r.o * mludvig@suse.cz
* +420 2 9654 5373 * http://www.suse.cz
More information about the Gdb-patches
mailing list