Recent

Author Topic: Saving the "Strip all debug symbols from executable"  (Read 892 times)

spigor

  • New Member
  • *
  • Posts: 13
Saving the "Strip all debug symbols from executable"
« on: June 27, 2025, 06:05:02 am »
Hi
I'm using the FPC 3.2.2. Is there a way to turn on the Options->Debugger->"Strip all debug symbols from executable" option permanently? I'm saving the setup in fp.ini, but this option is no longer on after reloading the FPC.
Thank you in advance for your input.

jamie

  • Hero Member
  • *****
  • Posts: 6988
Re: Saving the "Strip all debug symbols from executable"
« Reply #1 on: June 28, 2025, 01:11:42 am »
You are talking about the -Xs ?
The only true wisdom is knowing you know nothing

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 11443
  • Debugger - SynEdit - and more
    • wiki
Re: Saving the "Strip all debug symbols from executable"
« Reply #2 on: June 28, 2025, 01:49:53 am »
Doesn't the "Set compiler options as default" checkbox work for that? In the lower left corner of the "Project Options" dialog (above the help button).

MarkMLl

  • Hero Member
  • *****
  • Posts: 8453
Re: Saving the "Strip all debug symbols from executable"
« Reply #3 on: June 28, 2025, 09:00:55 am »
I'm using the FPC 3.2.2. Is there a way to turn on the Options->Debugger->"Strip all debug symbols from executable" option permanently? I'm saving the setup in fp.ini, but this option is no longer on after reloading the FPC.

FPC is a compiler, it has a command line rather than menus. What else are you running, what's its version number etc.?

Assuming for a moment (as does Martin) that you're running Lazarus. fp.ini isn't relevant here since that's for the FP character-mode editor/etc. which is intended to be roughly comparable with Turbo Pascal and is read neither by the FPC compiler nor by Lazarus. You should find an fpc.cfg file somewhere which will usually be used, but generally speaking that's best not fooled with and the storage location will vary depending on the OS etc. you're using (which you've not told us).

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Logitech, TopSpeed & FTL Modula-2 on bare metal (Z80, '286 protected mode).
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

MarkMLl

  • Hero Member
  • *****
  • Posts: 8453
Re: Saving the "Strip all debug symbols from executable"
« Reply #4 on: June 28, 2025, 09:49:34 am »
Doesn't the "Set compiler options as default" checkbox work for that? In the lower left corner of the "Project Options" dialog (above the help button).

Assuming that OP is, in fact, using Lazarus.

That will set the defaults for subsequently-created projects, although there are some fields- notably those that usually contain macros- which aren't handled properly (unless that's something that's been fixed recently).

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Logitech, TopSpeed & FTL Modula-2 on bare metal (Z80, '286 protected mode).
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 11443
  • Debugger - SynEdit - and more
    • wiki
Re: Saving the "Strip all debug symbols from executable"
« Reply #5 on: June 28, 2025, 10:32:47 am »
Oh, ouch. I missed that this went into the "Free Pascal" subforum. Then it likely isn't Lazarus. Possible even the FP console IDE.

My bad. And no idea how.

n7800

  • Sr. Member
  • ****
  • Posts: 394
Re: Saving the "Strip all debug symbols from executable"
« Reply #6 on: June 29, 2025, 08:09:18 am »
By the way, there is a separate board for the console IDE ("fp.exe"). However, the author specified the path to the option for the Lazarus, and apparently he means Lazarus?

Is there a way to turn on the Options->Debugger->"Strip all debug symbols from executable" option permanently?

n7800

  • Sr. Member
  • ****
  • Posts: 394
Re: Saving the "Strip all debug symbols from executable"
« Reply #7 on: June 29, 2025, 08:12:26 am »
Doesn't the "Set compiler options as default" checkbox work for that? In the lower left corner of the "Project Options" dialog (above the help button).
That will set the defaults for subsequently-created projects, although there are some fields- notably those that usually contain macros- which aren't handled properly (unless that's something that's been fixed recently).

I also don't recommend using this setup now, as it has issues with project types (see issue #38106).

spigor

  • New Member
  • *
  • Posts: 13
Re: Saving the "Strip all debug symbols from executable"
« Reply #8 on: June 29, 2025, 01:38:37 pm »
Thanks for your input!
I was referring to the Free Pascal IDE (fp.exe).
I will find that IDE forum and post there.

EDIT: I have only found a textmode IDE forum for FP, it looks like this thread belongs here.
« Last Edit: June 29, 2025, 01:43:18 pm by spigor »

spigor

  • New Member
  • *
  • Posts: 13
Re: Saving the "Strip all debug symbols from executable"
« Reply #9 on: July 02, 2025, 05:19:57 am »
The original question has evolved into:
In the FP's Textmode IDE, there is a setting in Options->Debugger->"Strip all debug symbols from executable" which gets reset at program restart. This setting is not saved with the other options, at least in my case. Would that be intentional, or it's just a bug?

mika

  • Full Member
  • ***
  • Posts: 124
Re: Saving the "Strip all debug symbols from executable"
« Reply #10 on: July 02, 2025, 10:35:43 am »
 Options->Enviorment->Destktop (there is something like auto save config).

You can save manually as well.

Thaddy

  • Hero Member
  • *****
  • Posts: 17381
  • Ceterum censeo Trump esse delendam
Re: Saving the "Strip all debug symbols from executable"
« Reply #11 on: July 02, 2025, 01:05:35 pm »
There is also another option: you can store the debug info in a separate file (-Xg option, which is my default)
This does not strip, but can still minimize the executable size considerably.
Due to censorship, I changed this to "Nelly the Elephant". Keeps the message clear.

 

TinyPortal © 2005-2018