[Lldb-commits] [lldb] [lldb] Add value to enumerator dump (PR #69815)

Greg Clayton via lldb-commits lldb-commits at lists.llvm.org
Mon Oct 23 10:55:18 PDT 2023


clayborg wrote:

To clarify a bit: each value (SBValue in our public API, and ValueObject in our private API) has the ability to supply a value string and a summary string. The value string can depend on what the current format is set to. For an enum value, the format defaults to `lldb::eFormatEnum`, but this can be changed to `lldb::eFormatHex`, `lldb::eFormatDecimal` or `lldb::eFormatUnsigned` and then the `const char *SBValue::GetValue()` would return an number instead of an enumeration. The summary of a value (`const char *SBValue::GetSummary()`) could changed for enum values to return the signed or unsigned value if desired. This will make the value always be correct and obey the format and the summary can always display the signed or unsigned value.

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


More information about the lldb-commits mailing list