On Mon, Nov 9, 2009 at 11:00 AM, Andrew Hood <[email protected]> wrote:
> TK Soh wrote:
>> For a long time I had to rely on custom make sure to generate the
>> debugging version of nedit binary. I am now thinking maybe the support
>> should be build into the standard makefile.
>>
>> This is what I have for Linux:
>>
>> diff --git a/makefiles/Makefile.linux b/makefiles/Makefile.linux
>> --- a/makefiles/Makefile.linux
>> +++ b/makefiles/Makefile.linux
>> @@ -19,6 +19,10 @@
>>  #
>>  CFLAGS=-O -I/usr/X11R6/include -DUSE_DIRENT -DUSE_LPR_PRINT_CMD
>>
>> +ifeq ($(DEBUG),1)
>> +CFLAGS+=-g
>> +endif
>> +
>>  ARFLAGS=-urs
>>
>>  LIBS=-L/usr/X11R6/lib -lXm -lXt -lX11 -lm
>>
>> So that I can do this to build with debugging symbol:
>>
>>    $ DEBUG=1 make linux
>>
>> Any better ideas?
>
> I've never noticed '-g' caused the resulting NEdit to run significantly
> slower, so I just use it all the time. You could always do a "strip -g"
> to reduce the size if you were short of space.
>
> Some levels of optimisation make debug harder to work with. "-O" should
> be OK.

Yes, debugging is best done without optimization, else it can be
confusing when tracing the source code. Not sure if -O0 will override
-O though.

> --
> There's no point in being grown up if you can't be childish sometimes.
>                -- Dr. Who
> --
> NEdit Develop mailing list - [email protected]
> http://www.nedit.org/mailman/listinfo/develop
>
--
NEdit Develop mailing list - [email protected]
http://www.nedit.org/mailman/listinfo/develop

Reply via email to