[fpc-devel] RTL StackTrace patch

Bogusław Brandys brandys at o2.pl
Thu Jan 17 10:49:13 CET 2008


Fabio Dell'Aria wrote:
> Hi,
> 
> 2008/1/17, Michael Van Canneyt <michael at freepascal.org>:
>>
>> On Thu, 17 Jan 2008, Fabio Dell'Aria wrote:
>>
>>> Hi to all,
>>>
>>> I'm writing a patch to can use an external .dbg file during the
>>> debugging process.
>>>
>>> All works fine but when an unhandled exception is raised the RTL show
>>> stacktrace without debug info (no sources line).
>>>
>>> How I can instruct the RTL to search the debug symbols in a
>>> project.dbg file (if not found in the executable)?
>> See function openstabs in lineinfo:
>>
>> function OpenStabs:boolean;
>> var
>>   ofm : word;
>> begin
>>   OpenStabs:=false;
>>   assign(f,paramstr(0));
>>
>> and for dwarf in lnfodwarf there is OpenDwarf:
>>
>> function OpenDwarf() : Boolean;
>> var
>>   oldfilemode : Word;
>> begin
>>   OpenDwarf := false;
>>   { open input file }
>>   assign(infile, paramstr(0));
>>   {$I-}
> 
> Thank you very much! :)
> 
> I'm working on. ;)
> 


I think it should by default look for program.dbg file , and then if not 
exists for paramstr(0). Is that enough ? If so,please explain how to 
check if file exists , which function could be used here.


Regards
Boguslaw



More information about the fpc-devel mailing list