Debugging and other changes in 1.39.11

148 views
Skip to first unread message

Alon Zakai

unread,
Mar 20, 2020, 1:29:03 PM3/20/20
to emscripte...@googlegroups.com
1.39.11 was just released, see the changelog for notes,


One specific thing you might notice is that we now have DWARF support. There isn't yet full browser support, so you can't see everything working yet. But on the emscripten side we are basically ready for when browsers do have that support, as of this release.

The way you might notice this for now is that -g will emit DWARF, the same as a normal compiler would. Specifically, compiling source files with -g will emit full DWARF in object files, and linking with -g will preserve full DWARF in the final wasm executable (it will also update it properly through binaryen optimizations).

* If you *don't* build or link with -g, you will see no change.

* If you build object files *with* -g but link *without* -g, then you may notice a small change in compile times, as the object files are larger with the DWARF info (that then gets removed at link).

* If you *do* link with -g, you will see an increase in the final wasm file, due to the DWARF info.

Again, this brings us closer to how compilers normally work, so there shouldn't be anything that surprising here, but it is a change compared to before, where we didn't bother emitting DWARF as browsers didn't support it (which they hopefully soon will, but again, not yet).

Note btw that you can use --profiling or --profiling-funcs for a lot of basic debugging, as those preserve function names so stack traces are meaningful (and the former flag also preserves whitespace in JS so that part of the stack trace makes sense too). That is, it's always been true that you don't need -g if all you want are function names and stack traces, and that's still true.

- Alon

Brian Gavin

unread,
Apr 8, 2020, 7:42:22 AM4/8/20
to emscripten-discuss
Finally having debugging would amazing :)


One specific thing you might notice is that we now have DWARF support. There isn't yet full browser support, so you can't see everything working yet. But on the emscripten side we are basically ready for when browsers do have that support, as of this release.
Can someone clarify what this means.   I thought Chrome now supports DWARF?

Brian

Alon Zakai

unread,
Apr 8, 2020, 10:27:10 AM4/8/20
to emscripte...@googlegroups.com
Chrome has had DWARF support for basic debugging for a while - basically just line tables (match source lines with compiled lines). Full DWARF support means all the other DWARF sections, and that will also allow seeing the values of source variables (not just wasm locals) and so forth.

- Alon

 
Brian

--
You received this message because you are subscribed to the Google Groups "emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-disc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/emscripten-discuss/30ac8d1c-19f3-4977-ab06-58aa372cc10f%40googlegroups.com.

Brian Gavin

unread,
Apr 8, 2020, 11:41:48 AM4/8/20
to emscripten-discuss
Thanks for the clarification.

Brian

Brian Gavin

unread,
Apr 12, 2020, 3:55:53 PM4/12/20
to emscripten-discuss
Another detail to add.   This does not work with the fastcomp version only works with upstream version.

Alon Zakai

unread,
Apr 12, 2020, 4:56:12 PM4/12/20
to emscripte...@googlegroups.com
Oh, good point. Perhaps worth clarifying further: all new development is on upstream now. We've changed the default to that and have been recommending everyone use it for a while now. We are still working to keep fastcomp around for now, but we're not adding new features to fastcomp, unless a feature just happens to work there, but stuff like debugging, BigInt, SIMD, wasm exceptions etc etc. will be upstream-only. Upstream is also smaller and faster - worth switching for anyone that hasn't already!

On Sun, Apr 12, 2020 at 12:55 PM Brian Gavin <bgav...@gmail.com> wrote:
Another detail to add.   This does not work with the fastcomp version only works with upstream version.

--
You received this message because you are subscribed to the Google Groups "emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-disc...@googlegroups.com.

Walt Tucker

unread,
Apr 16, 2020, 9:51:43 AM4/16/20
to emscripten-discuss


On Wednesday, April 8, 2020 at 10:27:10 AM UTC-4, Alon Zakai wrote:


Chrome has had DWARF support for basic debugging for a while - basically just line tables (match source lines with compiled lines). Full DWARF support means all the other DWARF sections, and that will also allow seeing the values of source variables (not just wasm locals) and so forth.

- Alon


Does "basic debugging" include setting and hitting breakpoints? I'm still having trouble with that using Chrome dev. 

Alon Zakai

unread,
Apr 16, 2020, 1:38:48 PM4/16/20
to emscripte...@googlegroups.com
That should work AFAIK. If you have a testcase you can share, worth filing a bug on crbug.com

--
You received this message because you are subscribed to the Google Groups "emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-disc...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages