[fpc-pascal] Re: GDB issues with the latest unstable FPC...

m utku m.utku.k at gmail.com
Fri Mar 2 10:36:18 CET 2007


Jonas Maebe <jonas.maebe-3RqwKoEL1alVsUKGZV2E3Q at public.gmane.org> wrote
in news:3251D316-0EED-4D6E-BF5F-FBCCFE74AE81 at elis.ugent.be:

 >
 > On 02 Mar 2007, at 08:56, m utku wrote:
 >
 >> I am using an unstable fpc version(2.1.1 -- snapshot from last  
 >> week). While debugging my specific project, GDB(6.4 - Debian Sarge)  
 >> seems to be wrong about the function locations so I cannot use  
 >> breakpoints.
 >
 > Do line numbers work?

Yes, indeed I can use dump_stack without problems but still no luck with 
breakpoints. I can always reproduce this case:

(1) declare a test function like:
procedure foobar;
begin
// some code to avoid smart link elimination, just in case.
end;

(2) when I set a breakpoint in gdb, the filename and line of this 
breakpoint points to a wrong unit and lineno.

(3) interestingly, the map file generated by the linker doesn't even 
contain the foobar entry. (no optimization commands passed to compiler 
so it shouldn't be eliminated.)

ps. currently I was cross-linking from Windows, I will try a native 
build next...

Regards,
Utku.



More information about the fpc-pascal mailing list