linux-c-programming.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Debugging
@ 2006-01-29  6:21 James Colannino
  2006-01-29 16:21 ` Debugging Steve Graegert
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: James Colannino @ 2006-01-29  6:21 UTC (permalink / raw)
  To: linux-c-programming

Hey everyone.  I have a small program that I had written a while ago in 
C to help me study for my Spanish class.  I decided to rewrite some code 
recently being that I have a little more experience, and found that the 
program does not function properly when I compile with -O2 optimizations 
(I'm using GCC.)  It works as it should, however, when there are no 
optimizations.  How exactly should I go about debugging this and 
figuring out what code is causing the problem?  I could compile it with 
the -g option and feed it to GDB, but then doesn't debugging not work 
very well when you've done optimizations?  Is -O2 a low enough level of 
optimization that I shouldn't have a problem?  Debugging is one of the 
many things I know extremely little about, so I'm very in the dark 
here.  Any input would be greatly appreciated :)  Thanks very much in 
advance.

James

-- 
My blog: http://www.crazydrclaw.com/
My homepage: http://james.colannino.org/

"If Carpenters made houses the way programmers design programs, the first woodpecker to come along would destroy all of civilization." --Computer Proverb


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2006-01-30 19:21 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-29  6:21 Debugging James Colannino
2006-01-29 16:21 ` Debugging Steve Graegert
2006-01-29 18:14 ` Debugging Glynn Clements
2006-01-30 19:09   ` Debugging James Colannino
     [not found] ` <20060129105131.6813f695.leslie.polzer@gmx.net>
2006-01-30 19:13   ` Debugging James Colannino
2006-01-30 19:21     ` Debugging James Colannino

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).