Building FPC with debug information

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Building FPC with debug information

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
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Building FPC with debug information

Jonas Maebe-2

On 14 Oct 2010, at 02:58, Andrew Brunner wrote:

> I was reading on building FPC with debug enabled so I can trace into a
> unit

make OPT="-O-" DEBUG=1 all


Jonas
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Building FPC with debug information

Andrew Brunner
Thanks, Jonas.

On Thu, Oct 14, 2010 at 6:43 AM, Jonas Maebe <[hidden email]> wrote:

>
> On 14 Oct 2010, at 02:58, Andrew Brunner wrote:
>
>> I was reading on building FPC with debug enabled so I can trace into a
>> unit
>
> make OPT="-O-" DEBUG=1 all
>
>
> Jonas
> _______________________________________________
> fpc-pascal maillist  -  [hidden email]
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Building FPC with debug information

bsquared
In reply to this post by Jonas Maebe-2
> 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?
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Building FPC with debug information

Andrew Brunner
Yes.  It's what I saw. I was still able to trace database components
line by line using Lazarus and GDB though.

On Wed, Oct 20, 2010 at 12:54 PM, Brian Winfrey <[hidden email]> 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?
> _______________________________________________
> fpc-pascal maillist  -  [hidden email]
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Building FPC with debug information

Jonas Maebe-2
In reply to this post by bsquared

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.


Jonas
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Building FPC with debug information

Graeme Geldenhuys-2
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)?


Regards,
  - Graeme -

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

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Building FPC with debug information

Henry Vermaak
On 21/10/10 07:24, Graeme Geldenhuys wrote:

> 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
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Building FPC with debug information

Jonas Maebe-2
In reply to this post by Graeme Geldenhuys-2

On 21 Oct 2010, at 08:24, Graeme Geldenhuys wrote:

> 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_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal