Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2010-10

Building FPC with debug information

9 messages · 5 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Andrew Brunner

I was reading on building FPC with debug enabled so I can trace into a unit and found that it was way too difficult to find the parameters. I know I had at one time edited the wiki page once I learned how to do it but to my surprise that info was either lost/moved or too hard to navigate and the search engines came up with too much information.

The build faq as a PDF on building FPC with the options and it never mentioned anything about adding DEBUG=1 to the make command. Presently I see -dDEBUG and -dRELEASE messages as fpc compiles itself. What is the propper way to take out the RELEASE directive?

Thanks

Reply by email

Graeme Geldenhuys
to Jonas Maebe

Op 2010-10-20 20:36, Jonas Maebe het geskryf:

Show quoted text 9 lines
On 20 Oct 2010, at 19:54, Brian Winfrey wrote: >> make OPT="-O-" DEBUG=1 all > > When I ran this I see that both -dDEBUG and -dRELEASE are passed on > the fpc command line. Is that correct? Yes.

Mind explaining why? DEBUG and RELEASE is known to be opposites, so what do you end up with when both defines are specified, a debug build (debug info includes) or a release build (stripped version - no debug info)?

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://opensoft.homeip.net:8080/fpgui/

Reply by email

Henry Vermaak
to Graeme Geldenhuys
Graeme Geldenhuys wrote 14 lines
Op 2010-10-20 20:36, Jonas Maebe het geskryf: > > On 20 Oct 2010, at 19:54, Brian Winfrey wrote: > >>> make OPT="-O-" DEBUG=1 all >> >> When I ran this I see that both -dDEBUG and -dRELEASE are passed on >> the fpc command line. Is that correct? > > Yes. Mind explaining why? DEBUG and RELEASE is known to be opposites, so what do you end up with when both defines are specified, a debug build (debug info includes) or a release build (stripped version - no debug info)?

The makefiles always pass RELEASE=1 (iirc). The later options on the command line will override the earlier ones, so OPT gets put somewhere at the end.

Henry

Reply by email

Jonas Maebe
to Graeme Geldenhuys: Op 2010-10-20 20:36, Jonas Maebe het geskryf: Mind explaining why? DEBUG and RELEASE is…
Graeme Geldenhuys wrote 14 lines
Op 2010-10-20 20:36, Jonas Maebe het geskryf: > > On 20 Oct 2010, at 19:54, Brian Winfrey wrote: > >>> make OPT="-O-" DEBUG=1 all >> >> When I ran this I see that both -dDEBUG and -dRELEASE are passed on >> the fpc command line. Is that correct? > > Yes. Mind explaining why? DEBUG and RELEASE is known to be opposites, so what do you end up with when both defines are specified, a debug build (debug info includes) or a release build (stripped version - no debug info)?

A debug build compiled for releasing (e.g., with all units compiled so that the compiler will not try recompiling them when it finds a source file with same name).

Jonas

Reply by email