fix: fix DWARF file indices in the debug_line section#5281
fix: fix DWARF file indices in the debug_line section#5281mergify[bot] merged 22 commits intomasterfrom
debug_line section#5281Conversation
|
hi bro, after clone this repo, and run `sudo nix --extra-experimental-features 'nix-command flakes' develop error: input 'https://github.com/viperproject/viperserver/releases/download/v.22.11-release/viperserver.jar' is unsupported`how can i fix it? |
Sorry for late reply I was on vacation. Here is the link how to do the setup. Did you followed it and still encountered this issue? |
debug_line section
debug_line sectiondebug_line section
|
Maybe the issue is installing and using nix via |
|
Could you share a precompiled Or, if you have already tested it, are there any other issues remaining? |
|
I've tested it and updated my findings in caffeinelabs/motoko-core#327. |
crusso
left a comment
There was a problem hiding this comment.
Looks ok to me. I guess it would be slightly better if this list was populated from the code generators, and not here, but it's fine.
You can grab the precompiled moc from this draft release |


Instructions how to run it and how I've verified it when testing the motoko_debugger:
nix develop(this will put the locally buildmocin the PATH)motoko-corerepo checkout on the branchkamil/experiment-debugger-manual-testnext to this repo, go there:cd ../motoko-core(here we have the test files we would like to debug)motoko_debuggermake -C ../motoko/src moc && moc $(mops sources) -o MoDe.wasm -g --legacy-persistence test/List.test.mo && ~/motoko_debugger/target/release/debugger MoDe.wasm. It builds themoccompiler and then compiles the problematic List test file, and finally runs the debugger on it. It should start and run to the end without problems now.The debug line section in DWARF can be verified with
make -C ../motoko/src moc && moc $(mops sources) -o MoDe.wasm -g --legacy-persistence test/List.test.mo && llvm-dwarfdump --debug-line MoDe.wasm > outFilecolumn, the file indices should not exceed the number of filesThe only relevant changes are in the src/wasm-exts/customModuleEncode.ml file. The other changes (compared with master) are due to an unrelated issue. I'll change the target of the branch to the branch related to that fix to limit the number of changes files in this PR. Do not merge