JDevlieghere wrote:

> > I'll be adding the other features in separate PRs to make reviewing easier.
> 
> Just for good faith purposes, can you give me a list of the parts you've got 
> it split into at the moment and what state they are in? Done, WIP, whatever. 
> I assume from what you've said, that it's all basically done, just want to 
> get a clear idea.

I have two patches, which I'll upload later today:

1. Implement a RegisterContextWasm which exposes virtual registers locals, 
globals and stack values. 
2. Support DW_OP_WASM_location in the DWARF expression evaluator, which uses 
the virtual registers.

With those two patches, you can see locals: 

```
* thread #1, name = 'nobody', stop reason = breakpoint 1.1
    frame #0: 0x400000000000019c wasm32_args.wasm`add(a=1, b=2) at test.c:4:12
   1    int
   2    add(int a, int b)
   3    {
-> 4        return a + b;
   5    }
   6
   7    int
(lldb) bt
* thread #1, name = 'nobody', stop reason = breakpoint 1.1
  * frame #0: 0x400000000000019c wasm32_args.wasm`add(a=1, b=2) at test.c:4:12
    frame #1: 0x40000000000001e5 wasm32_args.wasm`main at test.c:12:12
    frame #2: 0x40000000000001fe wasm32_args.wasm
(lldb) frame var
(int) a = 1
(int) b = 2
```



https://github.com/llvm/llvm-project/pull/150143
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to