This is the mail archive of the gdb@sourceware.org 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: -var-update using formatted value


I think you are referring to the code that uses "%.9g"
The format "%#.9g" could be used instead...
But trailing zeros will not be removed at all, so 1.0 will be 1.000000000 instead of 1
but this will also be true for numbers like 1.11 which would not be 1.110000000
That is probably not a good thing


-----Original Message-----
From: Nick Roberts [mailto:nickrob@snap.net.nz]
Sent: Thu 1/17/2008 7:53 PM
To: Marc Khouzam
Cc: gdb@sources.redhat.com
Subject: RE: -var-update using formatted value
 
 > I noticed that GDB prints floating point numbers such as "1.0" as
 > "1".

This seems to be an unfortunate consequence of the g conversion specifier.


-- 
Nick                                           http://www.inet.net.nz/~nickrob



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