Stream: git-wasmtime

Topic: wasmtime / issue #3439 Cranelift: Debugging JIT dwarf dat...


view this post on Zulip Wasmtime GitHub notifications bot (Oct 11 2021 at 09:31):

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 -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.

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

view this post on Zulip Wasmtime GitHub notifications bot (Oct 11 2021 at 09:31):

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 -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.

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

view this post on Zulip Wasmtime GitHub notifications bot (Oct 11 2021 at 09:31):

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 -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.

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

view this post on Zulip Wasmtime GitHub notifications bot (Oct 11 2021 at 09:32):

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 -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.

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

view this post on Zulip Wasmtime GitHub notifications bot (Oct 11 2021 at 09:33):

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 -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.

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

view this post on Zulip Wasmtime GitHub notifications bot (Oct 11 2021 at 10:36):

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.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 11 2021 at 10:46):

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 -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<Thing>) this = (__ptr = 131088)
(int) i = 5


Last updated: Nov 22 2024 at 16:03 UTC