This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC]: remove inconsistency in printcmd.c: print_scalar_formatted


> Date: Tue, 20 Jan 2004 14:33:49 -0500
> From: Daniel Jacobowitz <drow@mvista.com>
> 
> I'll respond to these all together, since there's really the same
> answer to all of them: I think there is a general unimplemented feature
> here, not just the specific "show me the hex representation of this
> double".  Examples I have in mind:
>   - Displaying an integer to a sequence of characters
>       p/s 0x6263 -> "ab"
>   - Displaying a double-precision value in hex:
>       p/x 2.0 -> 0x4000000000000000
>   - Displaying a double-precision value in binary:
>       p/t 2.0 -> 01000000000000000000000000000000
>                  00000000000000000000000000000000
>   - Displaying an integer (hex or otherwise) value as a double
>     p/f 0x4000000000000000LL -> 2.0
>   - Displaying an integer (hex or otherwise) value as a long
>     double - this one is trickier, since we don't normally have an
>     integer type that is big enough, but if we did:
>     p/gf 0x400000000000000000000000LLL -> 2.0

Sounds like there's a place for a new command, since what we want here
is a command that would interpret a value as some different type.  Do
you agree?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]