[Lldb-commits] [lldb] [lldb] Add support for displaying `__float128` variables (PR #98369)

via lldb-commits lldb-commits at lists.llvm.org
Thu Jul 11 19:06:30 PDT 2024


================
@@ -46,6 +46,7 @@ static constexpr FormatInfo g_format_infos[] = {
     {eFormatHex, 'x', "hex"},
     {eFormatHexUppercase, 'X', "uppercase hex"},
     {eFormatFloat, 'f', "float"},
+    {eFormatFloat128, '\0', "float128"},
----------------
beetrees wrote:

There's a static assert just below the array which states `"All formats must have a corresponding info entry."`, and will cause compilation to fail otherwise. Commands such as `type format add -f <format> <type>` can take either the single letter code or the long name to identify the format (`'\0'` is used to represent the format not having a single letter code).

On platforms with a 16-byte `long double`, the `f` format code will continue to map to `eFormatFloat` and therefore use `long double` for 16-byte values, just like in GDB.

https://github.com/llvm/llvm-project/pull/98369


More information about the lldb-commits mailing list