Stream: general

Topic: debugging of JIT'ed code


view this post on Zulip Steve Williams (Jun 08 2020 at 16:00):

lldb requires python36.dll on windows. python 3.6 is only available as source & I can't be bothered building it. if anyone has a trusted python36.dll it should be up somewhere to smooth the flow around wasmtime toolchain. llvm guys should ship it, but they don't.

view this post on Zulip Steve Williams (Jun 08 2020 at 16:08):

I've just grabbed a random download off the interweb for now, which isn't ideal, but it'll have to do. would prefer to use/ship something a little more trusted.

view this post on Zulip Steve Williams (Jun 08 2020 at 16:08):

yuri, why go backwards. its one dll to fix this problem.

view this post on Zulip Steve Williams (Jun 08 2020 at 16:09):

I have it running, but with a dodgy dll I downloaded. might be fine, might not :)

view this post on Zulip Steve Williams (Jun 08 2020 at 16:09):

& therein lies a security issue so this gap should be patched properly.

view this post on Zulip Steve Williams (Jun 08 2020 at 16:13):

our entire distribution needs building from scratch on a clean system at some point. right now, its just make it work mode. you have been warned. virus check our stuff if you run it. think I'm clean, but who knows what's lurking.

view this post on Zulip Steve Williams (Jun 08 2020 at 16:27):

"lldb was not built with gui support" using standard download from : https://releases.llvm.org/download.html#10.0.0

view this post on Zulip Steve Williams (Jun 08 2020 at 16:27):

we all love having to build each others stuff every 5 minutes :)

view this post on Zulip Steve Williams (Jun 08 2020 at 16:28):

so ... looks like a hop straight to one of the visual studio code thingies as not in the mood for building llvm from scratch either.

view this post on Zulip Steve Williams (Jun 08 2020 at 16:30):

if anyone knows which is the best wasmtime compatible visual studio code addon, recommendations welcome.

view this post on Zulip Steve Williams (Jun 08 2020 at 16:32):

post above says CodeLLDB just works, so lets try that.

view this post on Zulip Steve Williams (Jun 08 2020 at 16:39):

new to vs code, so will take me a while to get head around it.

view this post on Zulip Steve Williams (Jun 08 2020 at 16:40):

if any llvm devs around please build lldb with gui and ship whatever python dll you need with your windows binaries, thanks.

view this post on Zulip Steve Williams (Jun 08 2020 at 17:19):

no joy yet. got lldb to execute our app from visual studio code but it won't set breakpoints. seems to want to debug our binary rather than the wasm code.

view this post on Zulip Steve Williams (Jun 08 2020 at 17:20):

configuring lldb in vscode as follows : https://pastebin.com/xZJH5x6h

unsure how to tell it please debug wasm rather than app binaries.

view this post on Zulip Yury Delendik (Jun 08 2020 at 17:24):

if you have app callbacks that called from wasm, can you set breakpoints there?

view this post on Zulip Yury Delendik (Jun 08 2020 at 17:27):

so major question here is to check if GDB JIT interface is working on Windows LLDB. if you can break at any code that was called from wasm and you can inspect call stack, it is a good news

view this post on Zulip Steve Williams (Jun 08 2020 at 17:29):

I could in our debug build but that's not what I want to do. I want our app in release mode with wasm stuff in debug.

view this post on Zulip Yury Delendik (Jun 08 2020 at 17:31):

sure. can you still confirm the above though?

view this post on Zulip Steve Williams (Jun 08 2020 at 17:31):

yup

view this post on Zulip Yury Delendik (Jun 08 2020 at 17:35):

if you break in the running code (+wasm) and type image list in the debugger terminal, you shall see a module with "JIT" in its name

view this post on Zulip Yury Delendik (Jun 08 2020 at 17:37):

if it is there then you are almost done -- you just need to enable breakpoints on all files in vscode

view this post on Zulip Steve Williams (Jun 08 2020 at 17:40):

noob at lldb. gui doesn't want to let me break. seems like I have an lldb console.
what's the command to break ?

view this post on Zulip Steve Williams (Jun 08 2020 at 17:40):

sorry, I usually just visual studio & go :)

view this post on Zulip Yury Delendik (Jun 08 2020 at 17:40):

b file.c:34 or b foo_function

view this post on Zulip Steve Williams (Jun 08 2020 at 17:41):

not set a breakpoint, just halt wherever it is so we can do that 'image list'

view this post on Zulip Yury Delendik (Jun 08 2020 at 17:41):

hmmm, is there pause button?

view this post on Zulip Steve Williams (Jun 08 2020 at 17:42):

yeah, its ignored but I have a console

view this post on Zulip Steve Williams (Jun 08 2020 at 17:42):

can't we do it from there ?

view this post on Zulip Yury Delendik (Jun 08 2020 at 17:42):

ctrl-c normally do the job in cli

view this post on Zulip Steve Williams (Jun 08 2020 at 17:44):

maybe I get you a linux build & we do this over there first.

view this post on Zulip Yury Delendik (Jun 08 2020 at 17:45):

it will save some time, yes

view this post on Zulip Steve Williams (Jun 08 2020 at 17:46):

leave this with me for a while. I can't drive vscode properly yet. need to mess with it a bit more. linux version in due course if we need that. it doesn't have everything yet but should have enough to fire up & debug our wasm examples.

view this post on Zulip Yury Delendik (Jun 08 2020 at 17:47):

also you may try smaller example such as https://github.com/bytecodealliance/wasmtime/blob/master/examples/fib-debug/main.c

Standalone JIT-style runtime for WebAssembly, using Cranelift - bytecodealliance/wasmtime

view this post on Zulip Steve Williams (Jun 08 2020 at 17:47):

can also ship an infinity version with debug mode. this is mostly likely an I can't drive lldb/vscode issue. so maybe I need to hop out of the way.

view this post on Zulip Yury Delendik (Jun 08 2020 at 17:48):

there are also https://github.com/bytecodealliance/wasmtime/tree/master/tests/all/debug/testsuite

Standalone JIT-style runtime for WebAssembly, using Cranelift - bytecodealliance/wasmtime

view this post on Zulip Steve Williams (Jun 08 2020 at 17:48):

yeah, think you're right. lets get a simple example running under the debugger first.

view this post on Zulip Steve Williams (Jun 08 2020 at 17:56):

k, back up a step. lets drop vscode & work from lldb command line

view this post on Zulip Steve Williams (Jun 08 2020 at 18:21):

sorry for the delay, here's "image list" output

https://pastebin.com/vVSuba8G

view this post on Zulip Steve Williams (Jun 08 2020 at 18:25):

sorry, that wasn't during a run. this one is though. ctrl-c from cmd line as advised.

https://pastebin.com/i0WhxfRC

view this post on Zulip Steve Williams (Jun 08 2020 at 18:27):

not seeing anything with jit. maybe I messed up adding your debug support. will go back over that.

view this post on Zulip Yury Delendik (Jun 08 2020 at 18:27):

yeah, that's missing "JIT" module, means debugger did not get any info about JIT code

view this post on Zulip Steve Williams (Jun 08 2020 at 18:28):

good news is vstudio code was doing as it should. can't break on anything it doesn't understand.

view this post on Zulip Yury Delendik (Jun 08 2020 at 18:28):

it can be that windows support for lldb is not on the par with other OS

view this post on Zulip Yury Delendik (Jun 08 2020 at 18:29):

vscode can be configured to set breakpoints on everything

view this post on Zulip Steve Williams (Jun 08 2020 at 18:29):

or it could be I've goofed. others have got wasmtime debugging on windows.

view this post on Zulip Yury Delendik (Jun 08 2020 at 18:30):

can you try simple code on linux?

view this post on Zulip Steve Williams (Jun 08 2020 at 18:30):

yeah but I haven't given up here yet.

view this post on Zulip Steve Williams (Jun 08 2020 at 18:31):

leave it with me. you've told me what to look for when its working. will let you know when I get there.

view this post on Zulip Steve Williams (Jun 08 2020 at 18:32):

& I will try linux if no joy windows

view this post on Zulip Steve Williams (Jun 08 2020 at 18:42):

got this to enable debug stuff, with an audio cue so I know I hit it.
https://pastebin.com/rqNqkTAP

view this post on Zulip Steve Williams (Jun 08 2020 at 18:42):

did I miss something. its just that & compile with -g

view this post on Zulip Steve Williams (Jun 08 2020 at 18:42):

missing a linker flag ?

view this post on Zulip Yury Delendik (Jun 08 2020 at 18:43):

checked wasm with llvm-dwarfdump?

view this post on Zulip Steve Williams (Jun 08 2020 at 18:45):

not yet, that's next I guess.

view this post on Zulip Steve Williams (Jun 08 2020 at 18:46):

build script as follows : https://pastebin.com/rfUWxrd8

view this post on Zulip Steve Williams (Jun 08 2020 at 18:50):

http://advance-software.com/misc/app.wasm

view this post on Zulip Steve Williams (Jun 08 2020 at 18:50):

don't seem to have llvm-dwarfdump windows. might have to boot linux after all :)

view this post on Zulip Steve Williams (Jun 08 2020 at 18:52):

nope. don't have it. llvm 10 standard binary distribution, windows is rubbish :)

view this post on Zulip Steve Williams (Jun 08 2020 at 19:29):

got llvm-dwarfdump linux, so ran that. don't know what I'm doing with it yet. didn't seem to spot anything interesting so perhaps entry level fail & no debug info in the wasm. just compiled with -g as requested. maybe that's not enough.

view this post on Zulip Yury Delendik (Jun 08 2020 at 19:35):

Line 27 , no “-g”

view this post on Zulip Steve Williams (Jun 08 2020 at 19:38):

there is, it expands from COMPILE_OPTIONS, which gets it from EXTRA_COMPILE_OPTIONS

view this post on Zulip Steve Williams (Jun 08 2020 at 19:38):

expands as follows :

https://pastebin.com/Bt06aMTq

view this post on Zulip Steve Williams (Jun 08 2020 at 19:39):

on line 36, we have the actual compilation, which includes -g flag

view this post on Zulip Steve Williams (Jun 08 2020 at 19:41):

as I have no clue how to use llvm-dwarfdump can I get a minimal command line or output to look for please

view this post on Zulip Steve Williams (Jun 08 2020 at 19:41):

I can experiment with other flags into the compiler to hopefully generate some debug.

view this post on Zulip Steve Williams (Jun 08 2020 at 19:42):

this is almost comp sci 101 fail territory :)

view this post on Zulip Steve Williams (Jun 08 2020 at 19:47):

this bit doesn't require running any of our binaries, just running llvm 10.0 distribution out of the box, with make script above instead of the release script shipped in our sdk above.

view this post on Zulip Steve Williams (Jun 08 2020 at 19:48):

realise its my problem, just saying its safe for others to help identify why we're compiling without debug info if you wanted to.

view this post on Zulip Steve Williams (Jun 08 2020 at 19:49):

am I missing an obvious link flag I need ?

view this post on Zulip Steve Williams (Jun 08 2020 at 19:52):

maybe clang is weird & the position of the flag on the command line matters ?

view this post on Zulip Yury Delendik (Jun 08 2020 at 19:56):

llvm-dwarfdump just prints entire dwarf sections, so if nothing then it’s empty

view this post on Zulip Yury Delendik (Jun 08 2020 at 19:57):

I place -g before files but it shall not matter

view this post on Zulip Steve Williams (Jun 08 2020 at 19:57):

k, so I got nothing. so we're at bottom of the class here. how embarassing :)

view this post on Zulip Yury Delendik (Jun 08 2020 at 19:57):

wasm-ld just combines these sections

view this post on Zulip Yury Delendik (Jun 08 2020 at 19:59):

Do llvmdwarfdump for obj file

view this post on Zulip Steve Williams (Jun 08 2020 at 20:02):

llvm-dwarfdump app.o
app.o: Invalid data was encountered while parsing the file

view this post on Zulip Yury Delendik (Jun 08 2020 at 20:02):

Is dwarfdump new e.g. from wadi-sdk

view this post on Zulip Steve Williams (Jun 08 2020 at 20:03):

nope. I have no idea what version., should update it.

view this post on Zulip Steve Williams (Jun 08 2020 at 20:03):

however, whichever version I have says this :

llvm-dwarfdump app.wasm
app.wasm: No available targets are compatible with this triple.
app.wasm: file format WASM

.debug_info contents:

view this post on Zulip Yury Delendik (Jun 08 2020 at 20:04):

Right. Use one from wadi-sdk

view this post on Zulip Steve Williams (Jun 08 2020 at 20:04):

link to wadi-sdk please. jfgi but not obvious

view this post on Zulip Yury Delendik (Jun 08 2020 at 20:04):

The one you have probably from 10 years ago :p

view this post on Zulip Yury Delendik (Jun 08 2020 at 20:05):

Wasi-sdk it is

view this post on Zulip Steve Williams (Jun 08 2020 at 20:05):

llvm-dwarfdump --version
LLVM (http://llvm.org/):
LLVM version 6.0.0

Optimized build.
Default target: x86_64-pc-linux-gnu
Host CPU: skylake

view this post on Zulip Steve Williams (Jun 08 2020 at 20:06):

so yeah, my linux box needs an update

view this post on Zulip Steve Williams (Jun 08 2020 at 20:06):

ah, it is wasi sdk & so a typo

view this post on Zulip Yury Delendik (Jun 08 2020 at 20:09):

Right. You have wasm-ld so you may have dwarfdump near it

view this post on Zulip Steve Williams (Jun 08 2020 at 20:12):

nope. gonna do that linux. upgrading my llvm to 10.0 ubuntu

view this post on Zulip Steve Williams (Jun 08 2020 at 20:14):

yup, 10 linux has it, 10 windoze doesn't :)

view this post on Zulip Steve Williams (Jun 08 2020 at 20:15):

pre-built binary distributions

view this post on Zulip Steve Williams (Jun 08 2020 at 20:16):

then as no installer ubuntu, looks like I just drop the directories into the file system

view this post on Zulip Steve Williams (Jun 08 2020 at 20:19):

LLVM (http://llvm.org/):
LLVM version 10.0.0
Optimized build.
Default target: x86_64-unknown-linux-gnu
Host CPU: skylake

view this post on Zulip Steve Williams (Jun 08 2020 at 20:20):

from : llvm-dwarfdump --version

view this post on Zulip Steve Williams (Jun 08 2020 at 20:20):

so think that's how you install it :)

view this post on Zulip Steve Williams (Jun 08 2020 at 20:21):

tired. simple obvious things aren't working so gonna stop there for today & get something simple compiling with debug info in the morning.
cheers all.

view this post on Zulip Steve Williams (Jun 09 2020 at 07:27):

k, progress. ported my make script to bash, compiled our thing ubuntu, llvm 10. ran llvm-dwarfdump app.wasm got a ton out output, unlike yesterday :)

view this post on Zulip Steve Williams (Jun 09 2020 at 07:29):

apparent bug llvm 10 wasm win64 : debug info not generated when requested, though need to verify.

view this post on Zulip Steve Williams (Jun 09 2020 at 09:43):

image list from llvm on windows not showing anything jit related, unless I'm blind. this is with the wasm with debug in it compiled on linux.
still running on windows, next step is perhaps run linux. which wouldn't hurt anyway.
https://pastebin.com/fL3TpAqn

view this post on Zulip Steve Williams (Jun 09 2020 at 09:44):

however confidence low that lldb 10 precompiled binary version on windows is solid anyway.

view this post on Zulip Steve Williams (Jun 09 2020 at 09:45):

from wasm. for standard compilation, it gets exercised plenty.

view this post on Zulip Steve Williams (Jun 09 2020 at 09:47):

so, back to basics until standard stuff is working as expected. maybe a wasmtime.exe example next, rather than our stuff.

view this post on Zulip Steve Williams (Jun 09 2020 at 10:59):

looking at debug example posted above. we have differences. its not just this :
https://github.com/bytecodealliance/wasmtime/blob/master/examples/fib-debug/main.c#L18

most of the entrypoints in that example are wasmtime methods, whereas I assumed wasm_c_api would be sufficient.

seems I assumed wrong :)

Standalone JIT-style runtime for WebAssembly, using Cranelift - bytecodealliance/wasmtime

view this post on Zulip Steve Williams (Jun 09 2020 at 11:02):

as of 0.16 you have a regression, yury

./main.c:74:68: error: too many arguments to function call, expected 5, have 6
error = wasmtime_instance_new(store, module, NULL, 0, &instance, &trap);

view this post on Zulip Steve Williams (Jun 09 2020 at 11:04):

store parameter needs removing from that call.

view this post on Zulip Steve Williams (Jun 09 2020 at 12:25):

no cargo.toml so instructions in main.rs cannot be completed.

view this post on Zulip Steve Williams (Jun 09 2020 at 12:25):

for fib-debug

view this post on Zulip Steve Williams (Jun 09 2020 at 12:26):

if I could have that missing file, please, I should be able to run your example as-is to see if I can reproduce expected behaviour :)

view this post on Zulip Steve Williams (Jun 09 2020 at 12:31):

sorry misunderstood - main.rs is equivalent of main.c which I don't need. the wasm is in wasm :) with its toml :)

view this post on Zulip Steve Williams (Jun 09 2020 at 12:38):

cargo build -p example-fib-debug-wasm --target wasm32-unknown-unknown

should be in make.sh in the wasm directory, not referenced in main.rs which I'm not using :)

view this post on Zulip Steve Williams (Jun 09 2020 at 12:40):

a make script so all of that just works would be nice :)

note how my stuff has that :P

view this post on Zulip Yury Delendik (Jun 09 2020 at 12:41):

welcome back... so you are on linux today?

view this post on Zulip Steve Williams (Jun 09 2020 at 12:42):

for right now, yup.

view this post on Zulip Yury Delendik (Jun 09 2020 at 12:42):

"too many arguments to function call" means you are trying to use old version of wasmtime with new example

view this post on Zulip Yury Delendik (Jun 09 2020 at 12:42):

API changed after my PR

view this post on Zulip Steve Williams (Jun 09 2020 at 12:43):

I'm using latest shipped version :) 0.16

view this post on Zulip Steve Williams (Jun 09 2020 at 12:43):

0.17 is source only.

view this post on Zulip Steve Williams (Jun 09 2020 at 12:43):

but if its the runtime that's too old, can compile 0.17 myself.

view this post on Zulip Yury Delendik (Jun 09 2020 at 12:44):

I thought 0.17 is released

view this post on Zulip Steve Williams (Jun 09 2020 at 12:45):

it is, but only as source & I was keeping workload to the minimum.

view this post on Zulip Yury Delendik (Jun 09 2020 at 12:45):

yep, https://crates.io/crates/wasmtime

view this post on Zulip Steve Williams (Jun 09 2020 at 12:45):

but if that's a requirement, then it is :)

view this post on Zulip Steve Williams (Jun 09 2020 at 12:45):

got fib_debug running using main.c 0.16

view this post on Zulip Steve Williams (Jun 09 2020 at 12:46):

next job, drop in 0.17

view this post on Zulip Steve Williams (Jun 09 2020 at 12:46):

no debugging yet, just got my head around your build process.

view this post on Zulip Steve Williams (Jun 09 2020 at 12:52):

here's that start of a make script - compiles main.c & installs wasmtime runtime. I'm a bit crap on linux, so could possibly be done better, but it works.
https://pastebin.com/hKznEJRC

view this post on Zulip Steve Williams (Jun 09 2020 at 13:01):

that's right, I gave up on building 0.17 when I hit this :)
cargo build -p wasmtime-c-api --release

view this post on Zulip Steve Williams (Jun 09 2020 at 13:01):

error: failed to parse manifest at /home/x/dev/wasm/wasmtime-0.17.0/Cargo.toml

Caused by:
feature profile-overrides is required

this Cargo does not support nightly features, but if you
switch to nightly channel you can add
cargo-features = ["profile-overrides"] to enable this feature

view this post on Zulip Steve Williams (Jun 09 2020 at 13:02):

is it really necessary to use absolutely bleeding edge functionality on everything ?
:)

view this post on Zulip Yury Delendik (Jun 09 2020 at 13:03):

$ rustc --version
rustc 1.43.1 (8d69840ab 2020-05-04)

view this post on Zulip Steve Williams (Jun 09 2020 at 13:03):

rustc 1.36.0 (a53f9df32 2019-07-03)

view this post on Zulip Steve Williams (Jun 09 2020 at 13:03):

k, so how do I update that plz :)

view this post on Zulip Yury Delendik (Jun 09 2020 at 13:04):

rustup update?

view this post on Zulip Steve Williams (Jun 09 2020 at 13:04):

apparently, I avoid the horrid thing as much as possible as it lacks elegant c/c++ syntax :P

view this post on Zulip Yury Delendik (Jun 09 2020 at 13:04):

did you install via rustup ?

view this post on Zulip Steve Williams (Jun 09 2020 at 13:05):

at some stage I suppose.

view this post on Zulip Steve Williams (Jun 09 2020 at 13:05):

running an update

view this post on Zulip Steve Williams (Jun 09 2020 at 13:06):

its like the pascal people showed up & told us how its gonna be & the c++ guys when, ummm ... no ... but I digress :)

view this post on Zulip Steve Williams (Jun 09 2020 at 13:06):

1.44

view this post on Zulip Yury Delendik (Jun 09 2020 at 13:06):

alright, bleeding edge

view this post on Zulip Steve Williams (Jun 09 2020 at 13:07):

x@dev:~/dev/wasm/wasmtime-0.17.0$ cargo build -p wasmtime-c-api --release
error: failed to read /home/x/dev/wasm/wasmtime-0.17.0/crates/wasi-common/WASI/tools/witx/Cargo.toml

Caused by:
No such file or directory (os error 2)

view this post on Zulip Steve Williams (Jun 09 2020 at 13:07):

this is why we have binary distributions of things - so everyone doesn't have to go through dependency nightmares :)

view this post on Zulip Steve Williams (Jun 09 2020 at 13:08):

how do I install that wasi crate thingy please.

view this post on Zulip Yury Delendik (Jun 09 2020 at 13:08):

let's cleanup: cargo clean and git submodule update --init ?

view this post on Zulip Steve Williams (Jun 09 2020 at 13:08):

its unhappy doing a cargo clean, same error.

view this post on Zulip Yury Delendik (Jun 09 2020 at 13:09):

what about submodules?

view this post on Zulip Steve Williams (Jun 09 2020 at 13:09):

I don't need to do this. can you just build 0.17 & post it, no is cool if you can't be bothered

view this post on Zulip Steve Williams (Jun 09 2020 at 13:10):

not a git repository. I downloaded 0.17 from releases, not from git.

view this post on Zulip Yury Delendik (Jun 09 2020 at 13:10):

probably glitch in matrix, did you report it?

view this post on Zulip Steve Williams (Jun 09 2020 at 13:10):

how do I pull that branch from git please

view this post on Zulip Steve Williams (Jun 09 2020 at 13:10):

yeah, but then these guys with dark glasses showed up & I ended up here :)

view this post on Zulip Yury Delendik (Jun 09 2020 at 13:11):

git fetch upstream && git checkout upstream/master normally works for me

view this post on Zulip Steve Williams (Jun 09 2020 at 13:11):

guess I just pull wasmtime git trunk on linux, as I did on windows. cross fingers & hope its solid.
which is what you just said.

view this post on Zulip Yury Delendik (Jun 09 2020 at 13:13):

if I'm angry with what I see in git status, I just nuking that with git checkout -f --recurse-submodules

view this post on Zulip Steve Williams (Jun 09 2020 at 13:15):

pulled fresh trunk

view this post on Zulip Steve Williams (Jun 09 2020 at 13:16):

x@dev:~/dev/wasm/wasmtime$ cargo build -p wasmtime-c-api --release
error: failed to read /home/x/dev/wasm/wasmtime/crates/wasi-common/WASI/tools/witx/Cargo.toml

view this post on Zulip Steve Williams (Jun 09 2020 at 13:16):

can we have a binary build of 0.17 please.

view this post on Zulip Yury Delendik (Jun 09 2020 at 13:18):

https://github.com/bytecodealliance/wasmtime/releases/tag/dev ?

Standalone JIT-style runtime for WebAssembly, using Cranelift - bytecodealliance/wasmtime

view this post on Zulip Steve Williams (Jun 09 2020 at 13:18):

ah, that's new :)

view this post on Zulip Steve Williams (Jun 09 2020 at 13:19):

when you go this way, it just shows source : https://github.com/bytecodealliance/wasmtime/releases

Standalone JIT-style runtime for WebAssembly, using Cranelift - bytecodealliance/wasmtime

view this post on Zulip Steve Williams (Jun 09 2020 at 13:19):

thanks.

view this post on Zulip Yury Delendik (Jun 09 2020 at 13:19):

There was a build problem on CI, so exact 0.17 might be missing -- the issue needs to be opened

view this post on Zulip Steve Williams (Jun 09 2020 at 13:20):

well, we can hop past this. if there's a binary 0.17 which you've linked, thanks. I can just use this & the matrix can resolve itself :)

view this post on Zulip Yury Delendik (Jun 09 2020 at 13:20):

the Assets is what you are looking for

view this post on Zulip Steve Williams (Jun 09 2020 at 13:21):

? I'm just wanting to link 0.17 to main.c from fibdebug so I have the same API you have in your example & as close to edge as possible without losing my mind :)

view this post on Zulip Yury Delendik (Jun 09 2020 at 13:22):

@Dan Gohman can we release 0.18 sinse 0.17 did not publish any assets?

view this post on Zulip Dan Gohman (Jun 09 2020 at 13:22):

Sure

view this post on Zulip Yury Delendik (Jun 09 2020 at 13:23):

I wonder if 0.17.1 is a thing for us

view this post on Zulip Steve Williams (Jun 09 2020 at 13:23):

whatever works :)

view this post on Zulip Steve Williams (Jun 09 2020 at 13:31):

k, 0.17 build, runs ubuntu. no debugging yet but works

view this post on Zulip Steve Williams (Jun 09 2020 at 13:50):

building lldb 10 from source as seems to be a requirement :)

view this post on Zulip Steve Williams (Jun 09 2020 at 14:20):

lldb version 10 installed, ubuntu

view this post on Zulip Yury Delendik (Jun 09 2020 at 14:23):

alright, alright, alright... let me know if I shall pull mine from the closet

view this post on Zulip Steve Williams (Jun 09 2020 at 14:24):

think that's a private matter :)

view this post on Zulip Steve Williams (Jun 09 2020 at 14:24):

ran fib debug thingy.

view this post on Zulip Steve Williams (Jun 09 2020 at 14:24):

https://pastebin.com/iueXJuGj

view this post on Zulip Steve Williams (Jun 09 2020 at 14:25):

just let it run all the way through. not sure if that's what you wanted.

view this post on Zulip Steve Williams (Jun 09 2020 at 14:26):

so, not seeing anything jit there. to be clear I ran that after a run of the app. didn't break inside it.

view this post on Zulip Yury Delendik (Jun 09 2020 at 14:28):

sure if store is cleaned up -- there is no JIT'ed code

view this post on Zulip Yury Delendik (Jun 09 2020 at 14:28):

place a breakpoint in your app just before/after the wasm function invocation.

view this post on Zulip Steve Williams (Jun 09 2020 at 14:31):

k, so that's expected. I have no clue how to use lldb from command line yet :) and of course compiled without gui :)

view this post on Zulip Steve Williams (Jun 09 2020 at 14:31):

is there the equivalent of DebugBreak() on windows I can just compile in ?

view this post on Zulip Yury Delendik (Jun 09 2020 at 14:31):

https://www.nesono.com/sites/default/files/lldb%20cheat%20sheet.pdf ?
]

view this post on Zulip Steve Williams (Jun 09 2020 at 14:32):

thanks

view this post on Zulip Yury Delendik (Jun 09 2020 at 14:32):

normally you type b main.c:234 to set a breakpoint at specific line, r to run/restart, c to continue, q to quit

view this post on Zulip Yury Delendik (Jun 09 2020 at 14:35):

you don't need to know much to drive debugging session, but it will be useful to see what you did hen you post terminal in the pastebin

view this post on Zulip Yury Delendik (Jun 09 2020 at 14:35):

it is impossible to paste your mouse clicks

view this post on Zulip Steve Williams (Jun 09 2020 at 14:36):

k, so to keep this simple, how do I single source line step please

view this post on Zulip Yury Delendik (Jun 09 2020 at 14:37):

s or n

view this post on Zulip Steve Williams (Jun 09 2020 at 14:37):

tried that - invalid process

view this post on Zulip Steve Williams (Jun 09 2020 at 14:37):

so I have to start it somehow first ?

view this post on Zulip Yury Delendik (Jun 09 2020 at 14:37):

r?

view this post on Zulip Steve Williams (Jun 09 2020 at 14:38):

that runs the whole thing

view this post on Zulip Steve Williams (Jun 09 2020 at 14:38):

so I have to put a breakpoint. I can't just step in a line at a time.

view this post on Zulip Steve Williams (Jun 09 2020 at 14:38):

so breakpoint at main

view this post on Zulip Steve Williams (Jun 09 2020 at 14:39):

god I hate this - we've moved on. its like hanging out with the vi is great crowd :)

view this post on Zulip Yury Delendik (Jun 09 2020 at 14:39):

right, it will break on set breakpoint though, see e.g. tests https://github.com/bytecodealliance/wasmtime/blob/master/tests/all/debug/lldb.rs#L71-L74

Standalone JIT-style runtime for WebAssembly, using Cranelift - bytecodealliance/wasmtime

view this post on Zulip Steve Williams (Jun 09 2020 at 14:40):

I don't have a set breakpoint. I just want to do like visual studio. f10, first line, next line, next line.

view this post on Zulip Yury Delendik (Jun 09 2020 at 14:40):

but you do set a breakpoint at first line, no?

view this post on Zulip Steve Williams (Jun 09 2020 at 14:41):

in visual studio, no. turns out you can step and it figures out you wanted to start at the first line of the program :)

view this post on Zulip Steve Williams (Jun 09 2020 at 14:41):

but that's not important. this toolchain works how it does.

view this post on Zulip Yury Delendik (Jun 09 2020 at 14:41):

yeah, usually hello world programs are debugged this way

view this post on Zulip Steve Williams (Jun 09 2020 at 14:42):

this pretty much is hello world. its only about 50 lines

view this post on Zulip Steve Williams (Jun 09 2020 at 14:42):

breakpoint set --name main

view this post on Zulip Steve Williams (Jun 09 2020 at 14:43):

apparently

view this post on Zulip Yury Delendik (Jun 09 2020 at 14:43):

or b main

view this post on Zulip Steve Williams (Jun 09 2020 at 14:43):

which should be implict if you step from an unstarted program, but anyhow :)

view this post on Zulip Steve Williams (Jun 09 2020 at 14:44):

omg its working :)

view this post on Zulip Steve Williams (Jun 09 2020 at 14:45):

s steps in, not wanting to dive deep n is next high level instruction ?

view this post on Zulip Yury Delendik (Jun 09 2020 at 14:47):

yeah, but I'm interested in image list

view this post on Zulip Steve Williams (Jun 09 2020 at 14:47):

at

wasm_extern_vec_delete(&exports);

view this post on Zulip Steve Williams (Jun 09 2020 at 14:47):

so image list here

view this post on Zulip Steve Williams (Jun 09 2020 at 14:47):

you're not gonna like this :)

view this post on Zulip Steve Williams (Jun 09 2020 at 14:48):

https://pastebin.com/uithP4MY

view this post on Zulip Yury Delendik (Jun 09 2020 at 14:48):

I spy [ 11] 54F9EC54 0x00007ffff7fc7000 JIT(0x737b80) (0x0000000000737b80)

view this post on Zulip Steve Williams (Jun 09 2020 at 14:49):

ah, so it is :)

view this post on Zulip Steve Williams (Jun 09 2020 at 14:49):

so, we've got the basics working. next step hop back to windows & see if I can get it doing the same thing.

view this post on Zulip Steve Williams (Jun 09 2020 at 14:49):

thanks for your assistance & patience :)

view this post on Zulip Yury Delendik (Jun 09 2020 at 14:50):

hold on, set breakpoint in wasm code

view this post on Zulip Steve Williams (Jun 09 2020 at 14:50):

how plz

view this post on Zulip Yury Delendik (Jun 09 2020 at 14:50):

use source file name and line number

view this post on Zulip Yury Delendik (Jun 09 2020 at 14:51):

just like you use mouse, but using the keyboard :P

view this post on Zulip Steve Williams (Jun 09 2020 at 14:52):

yeah, mouse was invented so you didn't have to search through cheat sheets :)

view this post on Zulip Steve Williams (Jun 09 2020 at 14:52):

this is like arguing with blender artists who love their key combos when I prefer 3dsmax gui but anyways :)

view this post on Zulip Yury Delendik (Jun 09 2020 at 14:53):

repeatable is a key here, mouse is an art

view this post on Zulip Steve Williams (Jun 09 2020 at 14:54):

mouse triggers events that can be captured & logged, but we digress. you want to stay with 60s tech, we'll stay with 60s tech.

view this post on Zulip Steve Williams (Jun 09 2020 at 14:56):

(lldb) b fib.rs:4
Breakpoint 1: no locations (pending).
WARNING: Unable to resolve breakpoint to any actual locations.

view this post on Zulip Steve Williams (Jun 09 2020 at 14:56):

that's from a fresh start. guessing that's too early. hasn't loaded yet so knows nothing about it.

view this post on Zulip Steve Williams (Jun 09 2020 at 14:57):

b main

view this post on Zulip Yury Delendik (Jun 09 2020 at 14:57):

or just b fib

view this post on Zulip Steve Williams (Jun 09 2020 at 14:59):

when the c code is reading imports/exports you should have enough info for wasm breakpoints ?

view this post on Zulip Steve Williams (Jun 09 2020 at 14:59):

apparently so

view this post on Zulip Yury Delendik (Jun 09 2020 at 14:59):

yeah, if wasm code has valid DWARF info

view this post on Zulip Steve Williams (Jun 09 2020 at 15:00):

seems happy.

view this post on Zulip Steve Williams (Jun 09 2020 at 15:00):

looking for continue command

view this post on Zulip Yury Delendik (Jun 09 2020 at 15:00):

c?

view this post on Zulip Steve Williams (Jun 09 2020 at 15:01):

https://pastebin.com/5fAGJQdU

view this post on Zulip Steve Williams (Jun 09 2020 at 15:01):

seems happy :)

view this post on Zulip Yury Delendik (Jun 09 2020 at 15:01):

is it good?

view this post on Zulip Steve Williams (Jun 09 2020 at 15:01):

nah

view this post on Zulip Yury Delendik (Jun 09 2020 at 15:02):

try bt

view this post on Zulip Steve Williams (Jun 09 2020 at 15:02):

should say var, not let mut

view this post on Zulip Steve Williams (Jun 09 2020 at 15:02):

it works, the syntax is horrid :P

view this post on Zulip Yury Delendik (Jun 09 2020 at 15:02):

you are using wrong examples, did you see https://github.com/bytecodealliance/wasmtime/blob/master/tests/all/debug/testsuite/reverse-str.c ?

Standalone JIT-style runtime for WebAssembly, using Cranelift - bytecodealliance/wasmtime

view this post on Zulip Steve Williams (Jun 09 2020 at 15:03):

to be clear. system is functioning as expected. thank you. I have a syntax quibble but that's an issue for another day.

view this post on Zulip Steve Williams (Jun 09 2020 at 15:03):

I used the fib example you linked above. think my whine about rust syntax has confused you.

view this post on Zulip Yury Delendik (Jun 09 2020 at 15:03):

install vscode on ubuntu and try to drive debugging via GUI

view this post on Zulip Steve Williams (Jun 09 2020 at 15:04):

that sounds crazy

view this post on Zulip Yury Delendik (Jun 09 2020 at 15:04):

nope, vscode is using LLDB

view this post on Zulip Steve Williams (Jun 09 2020 at 15:04):

yup, might even work :)

view this post on Zulip Steve Williams (Jun 09 2020 at 15:05):

if so, screw up is bcoz I was using wasm-c-api entrypoints but you require wasmtime api calls ?

view this post on Zulip Yury Delendik (Jun 09 2020 at 15:07):

not sure

view this post on Zulip Yury Delendik (Jun 09 2020 at 15:13):

generating of DWARF is an overhead, the engine needs to do be configured to spend CPU/memory for debug info

view this post on Zulip Yury Delendik (Jun 09 2020 at 15:14):

c api "outsourced" this type of operation to implementers

view this post on Zulip Steve Williams (Jun 09 2020 at 15:14):

vscode, linux refusing to start, but I had that working windows & not concerned linux right now other than diagnostics, which we've just completed.

view this post on Zulip Steve Williams (Jun 09 2020 at 15:16):

so, let me head back to windows & repeat the above somehow. might have to compile llvm trunk or 11 candidate as 10 wasn't behaving.

view this post on Zulip Steve Williams (Jun 09 2020 at 15:16):

cheers. leave that with me for now. I can see we can debug lldb, regardless of what vscode's doing.

view this post on Zulip Steve Williams (Jun 09 2020 at 16:25):

building llvm trunk, windows, gonna be a while.

view this post on Zulip Steve Williams (Jun 09 2020 at 17:45):

c api "outsourced" this type of operation to implementers

which is why I don't understand why you have so many wasmtime calls in fib-debug. surely just the first call to set debugging info as that's not present in wasm-c-api is enough. then standard api.

view this post on Zulip Steve Williams (Jun 09 2020 at 18:06):

& even that, surely an environment variable would be better, then you can override & enable debug from any wasmtime runtime without anyone having to modify anything.

view this post on Zulip Yury Delendik (Jun 09 2020 at 18:08):

right, but the main question is does it work on windows?

view this post on Zulip Yury Delendik (Jun 09 2020 at 18:09):

the environment feature is good, but irrelevant

view this post on Zulip Steve Williams (Jun 09 2020 at 18:09):

fighting with llvm build system. their latest windows snapshot is 20th feb. 10 released in march.

view this post on Zulip Steve Williams (Jun 09 2020 at 18:09):

its not irrelevent, its a refinement once we're working.

view this post on Zulip Steve Williams (Jun 09 2020 at 18:10):

this is what I hate about open source. everyone's like "but you can build it yourself". I. don't. want. to.

view this post on Zulip Steve Williams (Jun 09 2020 at 18:10):

I'd like a beer please. sure sir, there's a field, go plant yourself some hops ...

view this post on Zulip Steve Williams (Jun 09 2020 at 18:10):

:)

view this post on Zulip Yury Delendik (Jun 09 2020 at 18:11):

which version of LLDB is included in vscode plugins?

view this post on Zulip Steve Williams (Jun 09 2020 at 18:11):

right now it doesn't matter bcoz clang doesn't generate debug info and I can't ship a toolchain that requires our users to switch to linux to compile their scripts.

view this post on Zulip Steve Williams (Jun 09 2020 at 18:12):

just built llvm windows using standard cmake environment, which built everything except what I want, so going through more slowly, second pass to see if I can get thing to do what I want.

view this post on Zulip Steve Williams (Jun 09 2020 at 18:17):

this "windows snapshot build" is older than the current release : https://llvm.org/builds

realise it's not your project, just sayin' :)

view this post on Zulip Steve Williams (Jun 09 2020 at 18:43):

going with this as a llvm configure script :

cmake ../llvm -G Ninja -DLLVM_ENABLE_PROJECTS="clang;lldb;lld" -DCMAKE_BUILD_TYPE="Release" -DLLVM_TARGETS_TO_BUILD="WebAssembly" -DLLVM_BUILD_EXAMPLES=0 -DLLVM_INCLUDE_EXAMPLES=0 -DLLVM_INCLUDE_TESTS=0 -DLLVM_INCLUDE_BENCHMARKS=0

view this post on Zulip Steve Williams (Jun 09 2020 at 18:44):

nope, not that :)

view this post on Zulip Yury Delendik (Jun 09 2020 at 18:45):

/me would just use https://github.com/WebAssembly/wasi-sdk/ as a base

WASI-enabled WebAssembly C/C++ toolchain. Contribute to WebAssembly/wasi-sdk development by creating an account on GitHub.

view this post on Zulip Steve Williams (Jun 09 2020 at 18:46):

have you tested windows, coz my understanding was you're linux only.

view this post on Zulip Yury Delendik (Jun 09 2020 at 18:46):

https://github.com/WebAssembly/wasi-sdk/blob/master/Makefile#L7

WASI-enabled WebAssembly C/C++ toolchain. Contribute to WebAssembly/wasi-sdk development by creating an account on GitHub.

view this post on Zulip Steve Williams (Jun 09 2020 at 18:46):

hence going trunk to see if whatever's wrong has been fixed.

view this post on Zulip Steve Williams (Jun 09 2020 at 18:47):

have you used your sdk tools to compile with debug on windows & confirmed you get debug info with dwarf tool thingy who's name I can't remember ?
:)

view this post on Zulip Yury Delendik (Jun 09 2020 at 18:48):

llvm-dwarfdump

view this post on Zulip Steve Williams (Jun 09 2020 at 18:48):

llvm-dwarfdump

view this post on Zulip Steve Williams (Jun 09 2020 at 18:50):

we need to be able to compile wasm with debug on windows or there's no point going further with any of this as our only viable dev platform right this minute is windows. our plan is complete there, then fill in the gaps linux & others.

view this post on Zulip Steve Williams (Jun 09 2020 at 18:52):

that build still going, thought it had failed, but just some warnings.

view this post on Zulip Steve Williams (Jun 09 2020 at 18:55):

again, that's a pull, fight dependency hell & hope rather than a install package. I'll give it a go. thanks.

view this post on Zulip Steve Williams (Jun 09 2020 at 19:04):

completing llvm build I have going first. may as well, its half way thru.

view this post on Zulip Steve Williams (Jun 09 2020 at 19:29):

wasi-sdk : what do I run windows, please. no make, that makefile isn't nmake compatible

view this post on Zulip Steve Williams (Jun 09 2020 at 19:30):

got mozilla build tools which does have make, but it doesn't have cmake :)

view this post on Zulip Yury Delendik (Jun 09 2020 at 19:31):

mozmake?

view this post on Zulip Steve Williams (Jun 09 2020 at 19:32):

dunno, I'll figure something out.

view this post on Zulip Steve Williams (Jun 09 2020 at 19:32):

however all of this is some way from it just works (tm)

view this post on Zulip Steve Williams (Jun 09 2020 at 19:33):

such is free

view this post on Zulip Steve Williams (Jun 09 2020 at 19:42):

k, got cmake in my mozilla tools cmd thingy

view this post on Zulip Steve Williams (Jun 09 2020 at 19:42):

it can't find llvm stuff now.
so must be a step before make that i've skipped

view this post on Zulip Steve Williams (Jun 09 2020 at 19:45):

backing up a step, why am I not just running https://github.com/WebAssembly/wasi-sdk/releases
wasi-sdk-11 mingw ?

WASI-enabled WebAssembly C/C++ toolchain. Contribute to WebAssembly/wasi-sdk development by creating an account on GitHub.

view this post on Zulip Steve Williams (Jun 09 2020 at 19:45):

I'll build if I have to, but surely that's what I want, your most recent built tools. if they work, we're good.

view this post on Zulip Steve Williams (Jun 09 2020 at 19:46):

I was using standard llvm-10 - haven't tried this yet, so maybe that's the hassle free fix.

view this post on Zulip Steve Williams (Jun 09 2020 at 19:47):

its only 6 days old so unless you've fixed something I need more recently than that, think that's where I should be.

view this post on Zulip Steve Williams (Jun 09 2020 at 20:03):

k, progress :) compiles windows with debug & do have llvm-dwarfdump there as its in the mingw distribution.
yay :)

view this post on Zulip Steve Williams (Jun 09 2020 at 20:04):

solution was to use wasi-sdk tools rather than standard llvm-10 equivalent, as advised, thank you :)

view this post on Zulip Steve Williams (Jun 09 2020 at 20:10):

no lldb in that package. I should use standard llvm 10 version ?

view this post on Zulip Steve Williams (Jun 09 2020 at 20:10):

if its missing & you plan to add, please build it with curses so can use gui

view this post on Zulip Steve Williams (Jun 09 2020 at 20:15):

using lldb 10 for now

view this post on Zulip Steve Williams (Jun 09 2020 at 20:15):

ctrl-c to break

view this post on Zulip Steve Williams (Jun 09 2020 at 20:17):

no JIT. as expected, as that's just the same as compiling wasm on linux then running it on windows as yesterday.

view this post on Zulip Steve Williams (Jun 09 2020 at 20:17):

so back up a step, run fib-debug windows, see if can repro behaviour on linux.

view this post on Zulip Steve Williams (Jun 09 2020 at 20:26):

https://pastebin.com/m1X4Matq

test_app is fib_debug compiled with debug info, windows

view this post on Zulip Steve Williams (Jun 09 2020 at 20:26):

so that lldb sucks

view this post on Zulip Steve Williams (Jun 09 2020 at 20:27):

build trunk lldb ?

view this post on Zulip Steve Williams (Jun 09 2020 at 20:29):

sanity check. standard lldb, standard simple c program. see what happens.

view this post on Zulip Steve Williams (Jun 09 2020 at 20:32):

ummm, losing it - was trying to debug fib debug linux on windows, hadn't actually built it. surprised it got that far. doh :)

view this post on Zulip Steve Williams (Jun 09 2020 at 21:14):

k, built fib_debug using visual studio on windows as clang was giving me weird errors. as our stuff is vstudio, that's probably better as closer to the same thing.

view this post on Zulip Steve Williams (Jun 09 2020 at 21:15):

stepping thru using lldb

view this post on Zulip Steve Williams (Jun 09 2020 at 21:16):

https://pastebin.com/70x2JF35

view this post on Zulip Steve Williams (Jun 09 2020 at 21:17):

that's using wasmtime from here : https://github.com/bytecodealliance/wasmtime/releases/tag/dev released today.

Standalone JIT-style runtime for WebAssembly, using Cranelift - bytecodealliance/wasmtime

view this post on Zulip Steve Williams (Jun 09 2020 at 21:18):

can you guys please confirm your stuff works windows. doesn't seem to for me.

view this post on Zulip Yury Delendik (Jun 09 2020 at 21:19):

Could be that GDB JIT interface does not work on Windows. can you file an issue? maybe someone can weight in before I look at it?

view this post on Zulip Yury Delendik (Jun 09 2020 at 21:20):

long shot: can you try settings set plugin.jit-loader.gdb.enable on before doing r

view this post on Zulip Steve Williams (Jun 09 2020 at 21:21):

sure. let me try that.

view this post on Zulip Steve Williams (Jun 09 2020 at 21:21):

can mozilla get yury a windows box please :)

view this post on Zulip Yury Delendik (Jun 09 2020 at 21:21):

... in the closet

view this post on Zulip Steve Williams (Jun 09 2020 at 21:22):

I gotta be bi-os so have u :)

view this post on Zulip Yury Delendik (Jun 09 2020 at 21:23):

this times, tri-os is acceptable

view this post on Zulip Steve Williams (Jun 09 2020 at 21:25):

yeah, got all that fun ahead. quad os if we're going android and mac stuff

view this post on Zulip Steve Williams (Jun 09 2020 at 21:25):

and then we have ps-5 & xbox next fun & games. but lets keep it simple for now.

view this post on Zulip Steve Williams (Jun 09 2020 at 21:27):

not spotting any difference.
https://pastebin.com/mTxufwp9

view this post on Zulip Steve Williams (Jun 09 2020 at 21:29):

where would you like me to raise a bug

view this post on Zulip Steve Williams (Jun 09 2020 at 21:30):

should be easy enough for anyone else to reproduce. there's a possiblity I've got a weird setup.

view this post on Zulip Steve Williams (Jun 09 2020 at 21:30):

so you might like a confirmation.

view this post on Zulip Yury Delendik (Jun 09 2020 at 21:32):

the wasmtime issue tracker is fine

view this post on Zulip Steve Williams (Jun 09 2020 at 21:33):

here's my fib_debug directory with a visual studio solution in the make subdir & windows binary & the rest of it in bin
http://advance-software.com/misc/fib_debug.zip
can build yourself but that might be a helpful shortcut

view this post on Zulip Steve Williams (Jun 09 2020 at 21:41):

I'm done unless you want me to add anything : https://github.com/bytecodealliance/wasmtime/issues/1850

What are the steps to reproduce the issue? Build fib_debug, windows or use version here : http://advance-software.com/misc/fib_debug.zip Open using lldb from llvm 10.0 release, windows. Step into t...

view this post on Zulip Steve Williams (Jun 09 2020 at 21:46):

right time for some zzzzz for me, have fun :)

view this post on Zulip Steve Williams (Jun 09 2020 at 21:50):

whilst you're at it, if fib_debug can run with standard wasm calls instead of wasmtime calls, I think it should. should only use non standard calls when we have to.

view this post on Zulip Steve Williams (Jun 09 2020 at 21:50):

& reminder of the environment variable enabler to remove need for non-standard api altogether.

view this post on Zulip Steve Williams (Jun 09 2020 at 21:51):

though whatever works :)

view this post on Zulip Steve Williams (Jun 10 2020 at 05:36):

hope going well. let me row back on request to activate debug mode with an environment variable.
reason: that'd be global, but we'll want some scripting under debug control, some running normally. that just occurred.

view this post on Zulip Alexandru Ene (Jun 25 2020 at 12:38):

BTW, i was doing some work on OSX and debugging didn't work. I managed to figure it out why so maybe this can help some people.
The root cause of it is that allowing the Injecting JIT debug information in LLDB has different defaults in windows/osx it would seem.

In the debug console if you run:
settings show plugin.jit-loader.gdb.enable it will say default, but it seems default means different things on different platforms :D. So the fix is quite wasy.

If you're using Code LLDB plugin for vscode, you need to set this option in your settings.json:

    "lldb.launch.preRunCommands": [
        "settings set plugin.jit-loader.gdb.enable on"
    ],

Then, after your module is registered, you can type in DEBUG CONSOLE image list and you should have a JIT(0xADDRESS)... in there as the last entry

view this post on Zulip Jakub Konka (Jun 25 2020 at 12:42):

This is excellent, thanks @Alexandru Ene . I'm wondering, should we add this somewhere in our docs perhaps? It seems like a useful bit of info. @Till Schneidereit what do you think?

view this post on Zulip Alexandru Ene (Jun 25 2020 at 12:43):

We could have a Debugging section and troubleshooting steps in case debugging doesn't work.

view this post on Zulip Alexandru Ene (Jun 25 2020 at 12:55):

I can raise a PR with that as I did a bunch of troubleshooting recently around it.

view this post on Zulip Yury Delendik (Jun 25 2020 at 12:58):

There are also known issues as https://github.com/bytecodealliance/wasmtime/issues/1896 or https://github.com/bytecodealliance/wasmtime/issues/1850 , I think I'll mark them with wasmtime:debugging

Hi, I'm trying to use wasmtime's debug support. I followed the simple demo from #1613, and it works as expected. But when I try to debug a slightly more complex C++ program, there's som...
What are the steps to reproduce the issue? Build fib_debug, windows or use version here : http://advance-software.com/misc/fib_debug.zip Open using lldb from llvm 10.0 release, windows. Step into t...

Last updated: Nov 22 2024 at 16:03 UTC