[Lldb-commits] [PATCH] D67001: [lldb] Limit the amount of zeroes we use for padding when printing small floats
Raphael Isemann via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Fri Aug 30 06:00:58 PDT 2019
teemperor created this revision.
teemperor added a reviewer: LLDB.
Herald added subscribers: lldb-commits, JDevlieghere.
Herald added a project: LLDB.
We got a radar that printing small floats is not very user-friendly in LLDB as we print them with up to
100 leading zeroes before starting to use scientific notation. This patch changes this by already using
scientific notation when we hit 6 padding zeroes by default and moves this value into a target setting
so that users can just set this number back to 100 if they for some reason preferred the old behaviour.
This new setting is influencing how we format data, so that's why we have to reset the data visualisation
cache when it is changed.
Note that we have always been using scientific notation for large numbers because it seems that
the LLVM implementation doesn't support printing out the padding zeroes for them. I would have fixed
that if it was trivial, but looking at the LLVM implementation for this it seems that this is not as trivial
as it sounds. I would say we look into this if we ever get a bug report about someone wanting to have
a large amount of trailing zeroes in their numbers instead of using scientific notation.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 11445 bytes
Desc: not available
More information about the lldb-commits