Thread View: comp.sys.next.programmer
2 messages
2 total messages
Started by Dick Silbar
Tue, 10 Nov 1992 18:49
What does -DDEBUG actually do?
Author: Dick Silbar
Date: Tue, 10 Nov 1992 18:49
Date: Tue, 10 Nov 1992 18:49
9 lines
1019 bytes
1019 bytes
I suspect this is very naive, but I looked all through the on-line manuals and found no answer to the subject question. The symbol table seems to be made by the -g option to cc. So what does -DDEBUG buy me? One answer MIGHT be (I am guessing) the ability to denote some lines in my C code (with 'DEBUG'?), such as my favorite printf statements, so that they are compiled when -DDEBUG is declared, but not when it is not. Dick Silbar (NeXTMail:silbar@whistler.lanl.gov)
Re: What does -DDEBUG actually do?
Author: Bruce F. Webster
Date: Wed, 11 Nov 1992 15:13
Date: Wed, 11 Nov 1992 15:13
29 lines
1770 bytes
1770 bytes
In article <10NOV199211495062@mpx2.lampf.lanl.gov> silbar@mpx2.lampf.lanl.gov (Dick Silbar) writes: > I suspect this is very naive, but I looked all through the on-line manuals and > found no answer to the subject question. The symbol table seems to be made > by the -g option to cc. So what does -DDEBUG buy me? > > One answer MIGHT be (I am guessing) the ability to denote some lines in my > C code (with 'DEBUG'?), such as my favorite printf statements, so that they > are compiled when -DDEBUG is declared, but not when it is not. > Exactly. Among other things, this allows you to insert conditional code into your program, bracketed as follows: #ifdef DEBUG <debugging code here> #endif ..bruce.. ------------------------------------------------------------------------------- Bruce F. Webster | Am a flamer, goateed, pallid, overweight, Chief Technical Officer | Willing to pull two shifts, then (hell) a third, Pages Software Inc | To save a session from a deadlocked state; bwebster@pages.com | At times, (to put it mildly) unrestrained-- #import <pages/disclaimer.h> | Almost, at times, a nerd. -- Jeff Duntemann -------------------------------------------------------------------------------
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads