<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">+lldb-dev<br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On 26. Aug 2019, at 12:57, Raphael “Teemperor” Isemann <<a href="mailto:teemperor@gmail.com" class="">teemperor@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html; charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">If I understand correctly your VM is your own custom wasm interpreter/JIT? If yes, then I don’t think it is realistic that LLDB can ever support it out of the box. But you can write a LLDB plugin that calls your own interpreter-implementations of functions such as stepping/continue/settings breakpoints, etc. Quick google search shows this example of doing the same for the Ruby interpreter that hopefully illustrates what I mean: <a href="https://christoph.luppri.ch/articles/ruby/debugging-ruby-programs-on-osx-with-lldb/" class="">https://christoph.luppri.ch/articles/ruby/debugging-ruby-programs-on-osx-with-lldb/</a><div class=""><br class=""></div><div class="">- Raphael<br class=""><div class=""><br class=""><blockquote type="cite" class=""><div class="">On 26. Aug 2019, at 12:37, Terry Guo <<a href="mailto:flameroc@gmail.com" class="">flameroc@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="">Hi Raphael,</div><div class=""><br class=""></div><div class="">Thanks. I mean the first case, attaching to my vm and then debugging via LLDB like setting breakpoint, single step or viewing the memory of wasm application.</div><div class=""><br class=""></div><div class="">BR,</div><div class="">Terry </div><br class=""><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Aug 26, 2019 at 5:59 PM Raphael “Teemperor” Isemann <<a href="mailto:teemperor@gmail.com" class="">teemperor@gmail.com</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I’m not sure I understand what the question is. Do you want that LLDB attachs to the wasm program running inside your VM and then debug the wasm program via LLDB? Or that LLDB can run the wasm module itself like an executable and then run it/step through it/inspect it/etc.?<br class="">
<br class="">
Cheers,<br class="">
- Raphael<br class="">
<br class="">
> On 26. Aug 2019, at 11:47, Terry Guo via lldb-dev <<a href="mailto:lldb-dev@lists.llvm.org" target="_blank" class="">lldb-dev@lists.llvm.org</a>> wrote:<br class="">
> <br class="">
> Hi there,<br class="">
> <br class="">
> I am working on a project which involves compiling C++ source file to Webassembly byte code file with LLVM. The LLVM works well and can generate wasm byte code file with DWARF debug sections like .debug_line. I can run the generated wasm file with my wasm virtual machine. However I find LLDB doesn't support debugging wasm file. Do we have plan to enable LLDB debugging wasm file? Thanks for any information.<br class="">
> <br class="">
> BR,<br class="">
> Terry<br class="">
> _______________________________________________<br class="">
> lldb-dev mailing list<br class="">
> <a href="mailto:lldb-dev@lists.llvm.org" target="_blank" class="">lldb-dev@lists.llvm.org</a><br class="">
> <a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev" rel="noreferrer" target="_blank" class="">https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev</a><br class="">
<br class="">
</blockquote></div></div>
</div></blockquote></div><br class=""></div></div></div></blockquote></div><br class=""></body></html>