Page 1 of 1

Call stack from package with line numbers

Posted: Thu Jul 26, 2018 9:12 am
by StephaneGrobety
Hello,

I'm wondering how I can get the detailed line number for the stack trace items concerning functions in packages.

I have an application that uses runtime packages. These packages are built as part of the overall build process and they are then processed with madExceptPatch.exe to integrate their map file. The do NOT include the mad* units, though, that is reserved for the main applications.

When I receive a bug report, only the items located in the main application module (not the package) have line numbers attached.

I understand why I don't get these numbers for the standard packages (RTL, VCL, etc.) but shouldn't I have the line numbers for these packages as well?

Re: Call stack from package with line numbers

Posted: Thu Jul 26, 2018 10:40 am
by madshi
Did you compile your packages with a detailed map file? Please check the contents of the map file to see if line numbers are actually included.

Re: Call stack from package with line numbers

Posted: Tue Jul 31, 2018 8:25 am
by StephaneGrobety
Hello,

The packages are all compiled with the detailed map files (-qd). The line numbers are included but only for a limited number of units. I have no idea why, really.

BTW, something similar happen if I compile without packages, from the IDE: I only get line numbers for a limited number of files.

The command line for the packages is the following:

"C:\Borland\RADStudio\19.0\bin\dcc32.exe" w:\wineur\lib\GITpackages\GITpkgLib.dpk -B -Q -gd /DmadExcept

And for the programs:

"C:\Borland\RADStudio\19.0\bin\dcc32.exe" W:\WINEUR\src\gad\wgamain.dpr -B -Q -LUGITPkgLib -LUGITPkg -LUGITPkg2 /DCRM -gd /DmadExcept

Followed by

w:\wineur\bat\madExceptPatch.exe w:\wineur\bin\wgamain.exe w:\wineur\bat\madExcept\wineur.mes

Re: Call stack from package with line numbers

Posted: Tue Jul 31, 2018 8:35 am
by madshi
So is the issue that the map file doesn't contain the information? Or does the map file contain the information but madExcept doesn't show it?

Re: Call stack from package with line numbers

Posted: Tue Jul 31, 2018 9:56 am
by StephaneGrobety
The map file doesn't contains the information (I would say)

Re: Call stack from package with line numbers

Posted: Tue Jul 31, 2018 10:10 am
by madshi
There are some compiler options which define if line numbers are included or not. Try {$D+}{$L+}.

Re: Call stack from package with line numbers

Posted: Tue Jul 31, 2018 4:12 pm
by StephaneGrobety
These are on by default and we don't disable them in our projects but I'll add them to the command-line nevertheless

Re: Call stack from package with line numbers

Posted: Tue Jul 31, 2018 4:42 pm
by madshi
To sum this up: madExcept can't magically invent line numbers out of thin air. So if the map files are missing the line number information then it's definitely not madExcept's fault. I'm not sure exactly *why* the line number information is missing. If adding {$D+}{$L+} doesn't help, it might be something to ask Embarcadero?