How to improve the Call Stack when your program GPFs


As shown on ClarionLive (2014, Sept 19)

When you GPF you’re given a stack trace with several fairly useless addresses
However if you’re in Debug mode and have %Bin%\Debug\ClaRun.dll in place
then in addition to the (fairly useless) addresses,
you also get the ModuleName:LineNumber -Procedure
(note: routines appear with a R$ prepended to their name)

So using the %Bin%\Debug\ClaRun.dll is a great thing.
However, every time you compile, the IDE copies over the ClaRun.dll with the %Bin%\ClaRun.dll version

So… how do you configure the IDE so it gives you the Debug version?
The answer is in your .RED file.

Below is the default %Bin%\ClaRun.dll

-- Directories only used when copying dlls
*.dll = %BIN%;%BIN%\AddIns\BackendBindings\ClarionBinding\Common;%ROOT%\Accessory\bin;%libpath%\bin\%configuration%

Below is the debug version - %Bin%\Debug\ClaRun.dll
basically you’re adding %BIN%\Debug; to the start of the list
%Bin% is the where you’re installed Clarion plus \Bin

-- Directories only used when copying dlls
*.dll = %BIN%\Debug;%BIN%;%BIN%\AddIns\BackendBindings\ClarionBinding\Common;%ROOT%\Accessory\bin;%libpath%\bin\%configuration%

If you’re compiling the RTL into your program LinkMode = Lib
Then alter your .RED to point to the debug version of ClaRunL.lib
APPARENTLY this file ships with PE, but not with EE - go figure.
See PTSS[41095] this was fixed at some point (I don’t recall which builds have this problem)

ClaRunL.lib = %ROOT%\lib\Debug

Now… go fix those GPF’s so you don’t have too look at this anymore.

Check box in eip browse works for me but not on other computer

I have PE here and I see that CLARUNL.LIB has been there since C8 in case that helps anyone.


Note: the original posted was edited after @ttetley pointed out that the [Debug] section for ClaRunL.lib was causing .lib to be created there.