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

delphi package - automated exception handling
Post Reply
theproper
Posts: 3
Joined: Sat Nov 02, 2019 7:21 pm

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

Post 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 5344 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 5344 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 5344 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.
madshi
Site Admin
Posts: 10764
Joined: Sun Mar 21, 2004 5:25 pm

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

Post 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.
theproper
Posts: 3
Joined: Sat Nov 02, 2019 7:21 pm

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

Post 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?
madshi
Site Admin
Posts: 10764
Joined: Sun Mar 21, 2004 5:25 pm

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

Post by madshi »

I'll give this a try. Is it urgent? Or can it wait a couple of days?
theproper
Posts: 3
Joined: Sat Nov 02, 2019 7:21 pm

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

Post 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.
Post Reply