OK, thanks. You did note my comment that even a deliberate memory leak in my code, project1, does not get line numbers ? As simple as
procedure TForm1.Button2Click(Sender: TObject);
var
Ptr : ^longint;
begin
new(Ptr);
new(Ptr);
end;
Similarly, a simple divide by zero exception does not get a line number...
Anyway, I must admit I am struggling here, I would be very grateful if you could comment on what I understand I need do.
I do have fpcsrc installed, its in /usr/local/share/ so, I need recompile with -gl, find the problem (yeah, sure) and then recompile again without that switch so that my normally resulting binaries are not bloated. Or should I compile a different tree, one with debug symbols and switch between ?
https://freepascal.org/docs-html/current/prog/progsu219.html#x331-347000F.4.1 says I need to compile -
System Unit - /usr/local/share/fpcsrc/rtl/macos/system.pp
Strings Unit - /usr/local/share/fpcsrc/rtl/inc/strings.pp
Doc unit - /local/share/fpcsrc/rtl/macos/dos.pp
Objects Unit - /usr/local/share/fpcsrc/packages/rtl-extra/src/inc/objects.pp
Same document suggests a command line using ppc386, as I’m using cocoa, thats all I’d need.
Or can I use -
/local/share/fpcsrc/rtl/darwin/Makefile.fpc and define DEBUG as per
https://freepascal.org/docs-html/current/prog/progsu206.html#x311-327000E.6.2