adv-sw labeled issue #3439:
Thanks for filing an issue! Please fill out the TODOs below.
`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;
}` Test Case
Steps to Reproduce
Compile above, debug mode.
Under lldb, open in wasmtime -g
Breakpoint in constructor.
Run
Show globals: (lldb) fr v -gExpected 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.
Cranelift version or commit: TODO
Operating system: TODO
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)
1 location added to breakpoint 1
Process 8700 stopped
- thread #1, stop reason = breakpoint 1.1
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<Thing>) this = (__ptr = 131088)
(int) i = 5
adv-sw opened issue #3439:
Thanks for filing an issue! Please fill out the TODOs below.
`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;
}` Test Case
Steps to Reproduce
Compile above, debug mode.
Under lldb, open in wasmtime -g
Breakpoint in constructor.
Run
Show globals: (lldb) fr v -gExpected 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.
Cranelift version or commit: TODO
Operating system: TODO
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)
1 location added to breakpoint 1
Process 8700 stopped
- thread #1, stop reason = breakpoint 1.1
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<Thing>) this = (__ptr = 131088)
(int) i = 5
adv-sw labeled issue #3439:
Thanks for filing an issue! Please fill out the TODOs below.
`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;
}` Test Case
Steps to Reproduce
Compile above, debug mode.
Under lldb, open in wasmtime -g
Breakpoint in constructor.
Run
Show globals: (lldb) fr v -gExpected 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.
Cranelift version or commit: TODO
Operating system: TODO
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)
1 location added to breakpoint 1
Process 8700 stopped
- thread #1, stop reason = breakpoint 1.1
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<Thing>) this = (__ptr = 131088)
(int) i = 5
adv-sw edited issue #3439:
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 -gExpected 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.
Cranelift version or commit: TODO
Operating system: TODO
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)
1 location added to breakpoint 1
Process 8700 stopped
- thread #1, stop reason = breakpoint 1.1
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<Thing>) this = (__ptr = 131088)
(int) i = 5
adv-sw edited issue #3439:
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 -gExpected 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.
Cranelift version or commit: TODO
Operating system: TODO
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<Thing>) this = (__ptr = 131088)
(int) i = 5
adv-sw commented on issue #3439:
Severity: High. Standard debugging pipeline not complete until this has been resolved.
We've got parse_global_section in wasmtime\cranelift\wasm\src\sections_translator.rs
Perhaps we can work from that.
adv-sw edited issue #3439:
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 -gExpected 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<Thing>) this = (__ptr = 131088)
(int) i = 5
Last updated: Nov 22 2024 at 16:03 UTC