Endilll wrote:
@clayborg Thank you for extensive feedback! Can you clarify where do you want
me to put the changes?
---
You expected the following:
> v.SetFormat(lldb.eFormatDecimal)
v.GetValue()
`1(1)`
But my patch doesn't seem to alter the behavior of `eFormatDecimal`. The code
and LLDB output with this PR applied are below.
```cpp
enum E {
E1 = 0
};
int main()
{
E e;
return 0;
}
```
```
* thread #1, name = 'enum_test', stop reason = breakpoint 1.1
frame #0: 0x000055555555513b enum_test`main at test.cxx:8:5
5 int main()
6 {
7 E e;
-> 8 return 0;
9 }
(lldb) script
Python Interactive Interpreter. To exit, type 'quit()', 'exit()' or Ctrl-D.
>>> lldb.frame.FindVariable("e")
(E) e = E1(0)
>>> e = lldb.frame.FindVariable("e")
>>> e.SetFormat(lldb.eFormatDecimal)
>>> e
(E) e = 0
>>> e.GetValue()
'0'
>>> e.GetSummary()
>>>
```
---
I'm also wondering if refactoring this patch to use summaries is going to
affect the way we dump enum *types* (with enumerators included). Apparently,
this is covered by `TestRustEnumStructs.py` test that I change in this PR.
https://github.com/llvm/llvm-project/pull/69815
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits