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


Daniel, do you object to having the feature you wanted in `x', rather
than in `print'?  If you do, could you please explain why?

If having this on `x' is not something we agree to, how about a
`maint' command, or a new format letter for `print' that would
specifically be designed to reveal the bit pattern of the value as it
would be stored in memory?

Try:


	(gdb) x 1.0
	0x000001: 0x12345678
	(gdb) x/v 1.0
	0x000000: 0xc0000000

or more notably:

(gdb) print struct_val
{ i = 1, j = 2, k = 1.0 }
(gdb) info location struct_val
struct_val is a dwarf2 location expression, its value is scattered across memory and registers
(gdb) x/v struct_val
0x00000000: 0x00010002 0xc0000000


Andrew



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