Board index » delphi » Borland Pascal can not find error address?

Borland Pascal can not find error address?

In article <3rv6em$...@n.ruf.uni-freiburg.de> hartn...@sun2.ruf.uni-freiburg.de (Klaus Hartnegg) writes:

Quote
>Borland Pascal often fails to find the position of a runtime error.
>This happens even if the program was started in the IDE.
>It just reports the error but doesn't go to where it occurred.
>Is this a known bug of version 7.0 ?

There are two situations I know of where this happens.  If the runtime error
occurs in code compiled with no debug information, then the IDE won't find it.
You can usually use the Search|Find error to recompile and find these, if it
was in your code; if the error happened in the RTL, you're out of luck.

The other situation where BP can't find errors is with the 20x coprocessor
errors.  There's a bug which makes it almost always fail.  You have to use the
command line compiler /F option to find these sorts of errors.  (Make sure you
compile with the same options as the IDE used, or the code might move.)

Duncan Murdoch

 

Re:Borland Pascal can not find error address?


I believe this one also happens if the error is generated in a UNIT you
are compiling into the code. This will result in an error address which
is not in the code in the IDE, but in a separate app - so it can't be
found. This is usually caused by cunning little errors which prove
impossible to find. Examples such as using WRITELN(), having forgotten
WINCRT or WINDOS are easy examples. Check you've declared all the
relevant units, then start the long "trial and error" slog.....

-- Alistair Galbraith

Re:Borland Pascal can not find error address?


Quote
dmurd...@mast.queensu.ca (Duncan Murdoch) writes:
>In article <3rv6em$...@n.ruf.uni-freiburg.de> hartn...@sun2.ruf.uni-freiburg.de (Klaus Hartnegg) writes:
>>Borland Pascal often fails to find the position of a runtime error.
>>This happens even if the program was started in the IDE.
>>It just reports the error but doesn't go to where it occurred.
>>Is this a known bug of version 7.0 ?
>There are two situations I know of where this happens.  If the runtime error
>occurs in code compiled with no debug information, then the IDE won't find it.
>You can usually use the Search|Find error to recompile and find these, if it
>was in your code; if the error happened in the RTL, you're out of luck.
>The other situation where BP can't find errors is with the 20x coprocessor
>errors.  There's a bug which makes it almost always fail.  You have to use the
>command line compiler /F option to find these sorts of errors.  (Make sure you
>compile with the same options as the IDE used, or the code might move.)

The simplest way I have found that this happens is if you get an error
in a DLL that is bein executed:

SPONG.EXE caused a GPF in module FOO.DLL

You just have to realised that the error is actually in FOO.DLL, not
SPONG.EXE.  Try looking for the error in that library.

If your app causes a GPF in one of the Windows libraries you are
stumped of course, and will have to go back to more traditional and
long-winded ways of finding your error!  :-)

Tim.

Re:Borland Pascal can not find error address?


In article <3s39u2$...@lyra.csx.cam.ac.uk>, tj...@mole.bio.cam.ac.uk (Tim

Quote
Cutts (Zoology)) writes:
>>>Borland Pascal often fails to find the position of a runtime error.
>>>This happens even if the program was started in the IDE.
>>>It just reports the error but doesn't go to where it occurred.
>>>Is this a known bug of version 7.0 ?

I have to deal with this one all the time. Set Options|Compiler|Debug
information ON &
set Options|Linker|Map file to Detailed. Compile your program and then
check out the map file (<PROGNAME>.MAP). Search for the first 6 hex digits
of the error address (ie. if the error address is 1234:5678, look for
1234:56, this will get you close to the right line number). When you find
the first line-number address greater than the error address, back up one
line. You're there.
                                                  Hope this helps
                                                                       BK

Other Threads