Hi there. I'm Artem from the Kotlin/Wasm team. We started to play around with DWARF generating and the WAMR debug described here: https://github.com/bytecodealliance/wasm-micro-runtime/blob/main/doc/source_debugging_interpreter.md.
I faced the problem of setting a breakpoint by file name and line number on a non-clang-generated DWARF.
I've minimized an example and just tried to use debug information generated by wasm-tools (https://github.com/bytecodealliance/wasm-tools) while parsing a WAT file and still, I have stopped by function name, but not by file name/line number.
Do you use the information provided by the .debug_line section, and (if yes), do you use some heuristics on it?
don't know much about that part.@Jun Xu, @YAMAMOTO Takashi please feel free to jump in.
I think WAMR uses the .debug_line section information to link an address to a line number using some LLVM APIs. For more information, please look at core/iwasm/compilation/debug/.
Last updated: Dec 23 2024 at 12:05 UTC