Debug info for 'this' pointer vanished from 3.1.24 to 3.1.26?

27 views
Skip to first unread message

Gregory Propf

unread,
Dec 6, 2022, 7:21:43 PM12/6/22
to emscripten-discuss
I just noticed something while debugging a program. A few days ago I migrated from 3.1.24 to 3.1.26. It now seems that, in Chrome at least, I only see the literal value of the 'this' pointer but can't see the components of the object. My CFLAGS are still the same: -O0 -g -std=c++17. For now I'm fine just setting the toolchain back to 3.1.24 but I was curious as to whether others had noticed this or if it's just that I need some additional CFLAGS settings to get that level of debug detail now.

- Greg

Alon Zakai

unread,
Dec 6, 2022, 7:25:53 PM12/6/22
to emscripte...@googlegroups.com
Bisection might be useful here, as in theory any LLVM change could cause such a difference or a bug. It's pretty simple to bisect using the emsdk:



On Tue, Dec 6, 2022 at 4:22 PM Gregory Propf <gpr...@gmail.com> wrote:
I just noticed something while debugging a program. A few days ago I migrated from 3.1.24 to 3.1.26. It now seems that, in Chrome at least, I only see the literal value of the 'this' pointer but can't see the components of the object. My CFLAGS are still the same: -O0 -g -std=c++17. For now I'm fine just setting the toolchain back to 3.1.24 but I was curious as to whether others had noticed this or if it's just that I need some additional CFLAGS settings to get that level of debug detail now.

- Greg

--
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/4086b3e0-d720-464e-b93f-800adbd514a3n%40googlegroups.com.

Gregory Propf

unread,
Dec 7, 2022, 4:02:03 PM12/7/22
to emscripten-discuss
Interesting. I didn't know about git bisect before so this is a good tool to have. I mainly just wanted to let the devs and users know this was happening. Like I said for now I can just use 3.1.24. It won't be a problem unless it turns out I can never upgrade beyond that. Unfortunately I don't think I'll have time to go through this right now since it sounds like a pretty time consuming iterative process.

Heejin Ahn

unread,
Dec 15, 2022, 2:30:14 PM12/15/22
to emscripte...@googlegroups.com
I think this is likely to be an LLVM upstream problem than wasm-specific problem. If you have a reproducer, that'd be helpful as well.

Gregory Propf

unread,
Dec 15, 2022, 5:14:35 PM12/15/22
to emscripte...@googlegroups.com
Hello Heejin, As far as a reproducer, you can clone my project https://github.com/gpropf/clarity and do 'make showcase'. Set some breakpoints around line 715 in the method setCppValFromJSVal() in the file ClarityNode.hpp and then change some of the values in the text fields or range controls on the page that the app generates. You should see that 'this' is visible but there's nothing in it. Currently I just rolled back to 3.1.24. I plan on trying some of the versions after 3.1.26 today or tomorrow. - Greg

Gregory Propf

unread,
Dec 16, 2022, 4:21:54 AM12/16/22
to emscripten-discuss
I just checked with version 3.1.28 and there's no 'this' pointer there either. I also tried 3.1.25 and it looks like 24 --> 25 is the point where the pointer died so to speak. So right now, 3.1.24 is the latest I can use. I'm using Ubuntu 22.04 on very recent Intel hardware.

Sam Clegg

unread,
Dec 16, 2022, 6:27:46 PM12/16/22
to emscripte...@googlegroups.com
On Fri, Dec 16, 2022 at 1:21 AM Gregory Propf <gpr...@gmail.com> wrote:
I just checked with version 3.1.28 and there's no 'this' pointer there either. I also tried 3.1.25 and it looks like 24 --> 25 is the point where the pointer died so to speak. So right now, 3.1.24 is the latest I can use. I'm using Ubuntu 22.04 on very recent Intel hardware.

If you are curious you could bisect furter to find out which set of llvm changes actually triggered this regression:  https://emscripten.org/docs/contributing/developers_guide.html#bisecting

Reply all
Reply to author
Forward
0 new messages