[fpc-pascal] How to get to Range Check Error location

Jonas Maebe jonas.maebe at elis.ugent.be
Sat Oct 2 16:44:02 CEST 2010


On 02 Oct 2010, at 16:35, Juha Manninen (gmail) wrote:

> On Saturday 02 October 2010 16:45:51 Jonas Maebe wrote:
>>> Forgot to tell, I compiled with "-gw -gh".
>>> "-gw" should be as good as "-gl".
>> 
>> It has nothing to do with being "as good as", they do different things
>> (just like "-gw" and "-gh" do different things).
> 
> I have used only -gw and debugging works fine.

Of course it works fine, -gl does not change anything about debugging. As I wrote in the part you cut away: "-gl shows the source code lines next to the hexadecimal addresses when a backtrace is printed to the console."

> Maybe I should use both -gl -gw.

If you want line info printed next to backtraces printed to the console when a run time error occurs, then yes.

> Anyway, I made a clean build wirh -gl and still had the problem. I will do 
> some more experiments...

Maybe Lazarus stops the program before the backtrace is printed. In that case you should look at its callstack window once the program is stopped (assuming Lazarus provides one), or let the program continue executing after it has been stopped by Lazarus so that the program can print the backtrace to the console.


Jonas


More information about the fpc-pascal mailing list