[lldb] [llvm] [lldb] Encode operands and arity in Dwarf.def and use them in LLDB. (PR #94679)

Greg Clayton via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 7 10:10:18 PDT 2024


https://github.com/clayborg commented:

Looks good to me as long as the data is correct. Cleans up the code nicely. 

It would be possible to encode the argument values using DW_FORM enumerations with variadic macros. If we move the `OPERANDS, ARITY` to the end and have ARITY come first:
```
#define HANDLE_DW_OP(ID, NAME, VERSION, VENDOR, ARITY, OPERANDS, , ...)  
```
And then for DW_OP_addr:
```
HANDLE_DW_OP(0x03, addr, 2, DWARF, 0, 1, DW_FORM_addr)
```
Then clients can use the `__VA_ARGS__` if they want this info.



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


More information about the llvm-commits mailing list