On Fri, Jan 31, 2020 at 8:41 AM Walt Tucker <[email protected]> wrote:

> Are there any gotchas or extra flags needed when using tot and
> -gforce_dwarf? I think I've been able to build with dwarf info (at least
> the wasm has custom .debug_* headers when viewing with wasm-objdump), yet
> when in chrome/firefox I don't see my c source files available for
> debugging. Is this not enabled with the llvm-wasm backend, similar to
> emscripten .wat output?
>
>
It should just work, but it does need a very new Chrome, in the dev channel
(not stable or even beta). I believe Firefox lacks DWARF support currently,
so that's not an option.

There are a few other potential gotchas here, as this is bleeding edge,
like if you build with an absolute path (emcc /home/username/../foo.cpp) vs
relative (emcc foo.cpp), as the devtools used to care about the difference,
but that might be fixed by now.

This is quite new and still a work in progress - when it's more stable and
useful we'll probably have a blogpost out etc. and announce that.

- Alon



> On Wednesday, January 29, 2020 at 6:35:45 PM UTC-5, Derek Schuff wrote:
>>
>> For now you also need to use the temporary flag -gforce_dwarf to actually
>> get the dwarf output. Beware that you are on the bleeding edge if you do
>> this. The Chrome devtools debugger is still missing things like inspecting
>> variable values as well. Eventually that flag will go away and we'll have
>> some reasonable behavior for the regular -g flag and a couple of related
>> flags.
>>
>> On Wed, Jan 29, 2020 at 3:21 PM Alon Zakai <[email protected]> wrote:
>>
>>> 1. Yes, if you just use clang, then it can emit DWARF, and that will be
>>> valid, if you don't yourself manually run another tool after clang.
>>>
>>> 2. However, as of last night there *is* support for DWARF in binaryen,
>>> so using emscripten will work, at least in debug builds (binaryen will
>>> update the DWARF in every optimization it performs). Only in a tip of tree
>>> build for now (emsdk install tot).
>>>
>>> --
>>> 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 [email protected].
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/emscripten-discuss/CAEX4NpQtZ1xM56%2BSN1dtnNBvB%2B3vyWQwXkTO%2B84ubtPmZmb1Kw%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/emscripten-discuss/CAEX4NpQtZ1xM56%2BSN1dtnNBvB%2B3vyWQwXkTO%2B84ubtPmZmb1Kw%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>> --
> 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 [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/emscripten-discuss/1156b20b-c2c2-4563-932a-a6be8779ec66%40googlegroups.com
> <https://groups.google.com/d/msgid/emscripten-discuss/1156b20b-c2c2-4563-932a-a6be8779ec66%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/emscripten-discuss/CAEX4NpTDo-rWFzWAyU4ud6ikc2WAOBJxsNeomsNU43wSu0ou%3Dg%40mail.gmail.com.

Reply via email to