Call stack from package with line numbers

delphi package - automated exception handling
Post Reply
StephaneGrobety
Posts: 19
Joined: Tue Jul 17, 2018 9:21 am

Call stack from package with line numbers

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

Re: Call stack from package with line numbers

Post 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.
StephaneGrobety
Posts: 19
Joined: Tue Jul 17, 2018 9:21 am

Re: Call stack from package with line numbers

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

Re: Call stack from package with line numbers

Post 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?
StephaneGrobety
Posts: 19
Joined: Tue Jul 17, 2018 9:21 am

Re: Call stack from package with line numbers

Post by StephaneGrobety »

The map file doesn't contains the information (I would say)
madshi
Site Admin
Posts: 10753
Joined: Sun Mar 21, 2004 5:25 pm

Re: Call stack from package with line numbers

Post by madshi »

There are some compiler options which define if line numbers are included or not. Try {$D+}{$L+}.
StephaneGrobety
Posts: 19
Joined: Tue Jul 17, 2018 9:21 am

Re: Call stack from package with line numbers

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

Re: Call stack from package with line numbers

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