Page 1 of 1

Hello World clang C++ Builder10.3.2 Rio-no call stack traces

Posted: Sat Nov 02, 2019 7:42 pm
by theproper
I created a new project in C++ Builder Rio 10.3.2 (second Rio release):
screenshot code.PNG
screenshot code.PNG (85.71 KiB) Viewed 5303 times
When I use the classic compiler I get the stack traces as usual:
screenshot bug report classic.PNG
screenshot bug report classic.PNG (140.39 KiB) Viewed 5303 times
When I use the clang compiler I don't get the line numbers and unit name:
screenshot bug report clang.PNG
screenshot bug report clang.PNG (148.63 KiB) Viewed 5303 times
Line numbers and unit names also work for the Delphi compiler, so only clang is the problem.

Changing link with dynamic RTL and link with runtime packages doesn't help.

How can this be fixed, could it be that the problem is the second Rio release?

I apologize if this has been posted already but I couldn't find it.

Re: Hello World clang C++ Builder10.3.2 Rio-no call stack tr

Posted: Wed Nov 13, 2019 9:37 pm
by madshi
I think that probably the compiler & linker settings are not adjusted automatically by madExcept. Could you please make sure that you have the debug options (like line numbers, function names, whatever) enabled for the compiler, but disabled for the linker. However, the linker needs to create either a detailed map file or a TDS file.

Re: Hello World clang C++ Builder10.3.2 Rio-no call stack tr

Posted: Sun Feb 02, 2020 1:58 pm
by theproper
Sorry for the late reply, I finally had a chance to test this:

C++ Compiler->Debugging->Debug line information = true, the default
C++ Linker->Output->Map file type = "Detailed segment map", the default "Map file with segments" seems to produce the same results

C++ Linker->Full debug information - the default is true, this setting produces the results from my first post.
When I set C++ Linker->Full debug information to false:

Clang compiler: no changes, the same output as in my first post
Classic compiler: a change for the worse, now madexcept produces a similar output as with clang from the first post, that is without the line numbers.

All this can be easily reproduced with a hello world project that throws an exception. Does anyone have a sample C++ builder project for which madexcept shows the line numbers correctly when using clang?

Re: Hello World clang C++ Builder10.3.2 Rio-no call stack tr

Posted: Mon Feb 03, 2020 11:50 am
by madshi
I'll give this a try. Is it urgent? Or can it wait a couple of days?

Re: Hello World clang C++ Builder10.3.2 Rio-no call stack tr

Posted: Wed Feb 05, 2020 10:59 am
by theproper
It's not urgent of course :)
Basically I just need a sample c++ builder clang project that shows the line numbers correctly when an exception happens.
I will then apply the same settings to my project, and other could do the same as well.