Add a DWARF expression evaluator to LLDB
- Dominant language
- LLVM
- Stars
- 40.5k
- Forks
- 18.7k
- PR merge metrics
- PR metrics pending
Description
At the [FOSDEM 2026 GCC (GNU Toolchain) Devroom](https://fosdem.org/2026/schedule/track/gcc-gnu-toolchain/), Baris Aktemur presented [an evaluator and a web playground for DWARF-6 expressions](https://fosdem.org/2026/schedule/event/99DLGQ-dwarf-evaluator/). There's an [online playground](https://intel.github.io/dwarf-evaluator/).
While watching the talk, I thought to myself that it could be interesting to have something similar in LLDB, where you can execute an arbitrary DWARF expression in the context of the current stack frame, instead of conjuring up a context to evaluate an expression. I imagine something like:
```
(lldb) dwarf expression evaluate -- DW_OP_reg0 DW_OP_deref DW_OP_deref DW_OP_stack_value
```
I'm making up a command structure here, there might be a better place for it. Regardless, I think we have all the building blocks to make something like this and therefore it should be pretty straightforward and may come in handy when adding support for DWARF 6 locations on the stack.
Contributor guide
Research direction
Start by reviewing LLDB's existing DWARF expression evaluation facilities and command entry points; the issue does not identify specific files or tests. Determine the command shape, how it obtains the current stack-frame context, and the expected behavior for arbitrary DWARF expressions before implementation.
Written by the indexing model from the issue text.
Assessment
- Domain
- compilers, devtools
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100