On 02 Mar 2007, at 10:36, m utku wrote:
> 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;
Smartlinking happens depending on whether or not the procedure is
reachable from the entry point of the program, not depending on
whether or not it contains code.
(2) when I set a breakpoint in gdb, the filename and line of this
breakpoint points to a wrong unit and lineno.
How do you try to set the breakpoint? You can either use:
a) b FOOBAR
b) b sourcefile.pas:linenr
I guess you are using a) (of course that should work as well)
(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.)
Your default configuration file may contain -CX -XX. Alternatively,
you may be looking for the wrong symbol name. It will be called
something like P$PROGRAM_FOOBAR
Jonas
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal