Stream: general

Topic: Eager DWARF, breakpoint presence


view this post on Zulip Gabor Greif (May 14 2020 at 09:50):

I have a minor problem with VSCode IDE (as described by colleague) with our new language. When loading source into a pane it is not possible to immediately set breakpoints graphically. Instead we need to set the BP in the configuration. I suspect this is due to the JIT nature of DWARF generation. If so, how can this be worked around, e.g. by passing some option to wasmtime? Anybody knows how this is handled for e.g. Rust?

My other theory is that we don't emit DW_AT_main_subprogram attribute yet, but I doubt that wasmtime handles that at all.

Maybe we just have to declare the file type .mo of our language in the IDE as _debuggable_? (Not that I know where to even look for such a setting...)

Thanks in advance for any hints,

cheers,

Gabor

view this post on Zulip Till Schneidereit (May 14 2020 at 09:57):

CC @Yury Delendik

view this post on Zulip Yury Delendik (May 14 2020 at 14:06):

@Gabor Greif Yeah, JIT breakpoints are picked up when wasmtime is running. VSCode can be configured to set breakpoint anywhere. See "Allow setting breakpoints in any file" setting. Such breakpoints will "materialize" as soon as JIT code is generated.

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

Theoretically it is possible to pause at the end of module instantiation and before wasm start function is run, e.g. by adding some breakpoint (at wasm file or wasmtime symbol) definition in ".lldbinit" or in debugger params.


Last updated: Nov 22 2024 at 16:03 UTC