Sign in Join

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

Mailing lists / lazarus / 2008-06

DEBUG=1

4 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

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

Adriaan van Os

I normally build Lazarus from svn with make ... DEBUG=1 ... This is on Mac OS X with a Carbon back-end. However, this results in an IDE and also in application software unuseable due to a number of runtime range check errors. These errors go unnoticed when DEBUG=1 is not passed.

The workaround is to also pass OPT="-Cr-" but that doesn't remove range checking problems in the code, of course.

May I suggest that Lazarus developers routinely set DEBUG=1 during their development builds ?

Regards,

Adriaan van Os

Reply by email

Vincent Snijders
to Adriaan van Os
Adriaan van Os wrote 8 lines
I normally build Lazarus from svn with make ... DEBUG=1 ... This is on Mac OS X with a Carbon back-end. However, this results in an IDE and also in application software unuseable due to a number of runtime range check errors. These errors go unnoticed when DEBUG=1 is not passed. The workaround is to also pass OPT="-Cr-" but that doesn't remove range checking problems in the code, of course. May I suggest that Lazarus developers routinely set DEBUG=1 during their development builds ?

I hardly use the makefiles directly during development, but only the Build Lazarus tool in the IDE, so I cannot pass this DEBUG=1. What does it actually do? What are the corresponding compiler flags?

Vincent

Reply by email

Henry Vermaak
to Vincent Snijders

2008/6/17 Vincent Snijders :

Show quoted text 5 lines
I hardly use the makefiles directly during development, but only the Build Lazarus tool in the IDE, so I cannot pass this DEBUG=1. What does it actually do? What are the corresponding compiler flags?

this is in the Makefile:

ifdef DEBUG
override FPCOPT+=-gl
override FPCOPTDEF+=DEBUG
endif

which causes -dDEBUG to be passed to the compiler.

this is in my fpc.cfg:

#IFDEF DEBUG
-gl
-Crtoi
#WRITE Compiling Debug Version
#ENDIF

henry

Reply by email

Adriaan van Os
to Henry Vermaak
Henry Vermaak wrote 12 lines
2008/6/17 Vincent Snijders : > I hardly use the makefiles directly during development, but only the Build Lazarus > tool in the IDE, so I cannot pass this DEBUG=1. What does it actually do? What are > the corresponding compiler flags? > this is in the Makefile: ifdef DEBUG override FPCOPT+=-gl override FPCOPTDEF+=DEBUG endif

Note that on Mac OS X 10.5, due to bugs in the Apple linker, it may be advisable to pass -gw2l instead of -gl (which is why I also pass OPT="-gw2l" during Make builds, apart from the DEBUG=1).

Regards,

Adriaan van Os

Reply by email