bytecodealliance / bytecodealliance/wasmtime
Cranelift: Debugging JIT dwarf data is missing global variables.
- Dominant language
- Rust
- Stars
- 18.6k
- Forks
- 1.8k
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 126
Description
test.cpp
```
int my_global = 4;
class Thing
{
public:
Thing(int i)
{
m_i = i + my_global;
}
int m_i;
};
int main() {
auto thing = new Thing(5);
return thing->m_i == 9;
}
```
### Steps to Reproduce
Compile above, debug mode.
Under lldb, open in wasmtime -g
Breakpoint in constructor.
Run
Show globals: (lldb) fr v -g
### Expected Results
Expected to see my_global
### Actual Results
Just locals observed.
### Versions and Environment
Linux & Windows wasmtime trunk used. lldb trunk & 12.0.1 tried.
Architecture: x86/64
----------------------------------------------------------------------------------------------------
Repro:
(lldb) settings set -- target.run-args "-g" ".\\test.wasm"
(lldb) b test.cpp:7
Breakpoint 1: no locations (pending).
WARNING: Unable to resolve breakpoint to any actual locations.
(lldb) r
Process 8700 launched: 'z:\dev\wasm\wasmtime\target\release\wasmtime.exe' (x86_64)
frame #0: 0x00000220c62214a7 JIT(0x220c8093010)`Thing::Thing(this=(__ptr = 131088), i=5) at test.cpp:9:13
6 public:
7 Thing(int i)
8 {
-> 9 m_i = i + my_global;
10 }
11
12 int m_i;
(lldb) fr v -g
(WasmtimeVMContext *) __vmctx = 0x00000220c62ed950
(WebAssemblyPtrWrapper) this = (__ptr = 131088)
(int) i = 5
Contributor guide
Assessment
This issue has not been assessed yet.