GDB and debugging techniques

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Alan Dayley
Date:  
Subject: GDB and debugging techniques
At 11:08 PM 2/9/01 -0700, you wrote:

>I've seen some people do
>
>if ( 0 == foo )
>{
>     ...
>}

>
>in C to try to avoid this particular "dumb error."
>(Just try compiling using "if ( 0 = foo )" )


I know that tip but after all the math classes it is so natural to me to
put the variable first that I still make the stupid mistake on
occasion. It is hard to learn new tricks sometimes!

Alan