This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: bug disappears if compiled with -O0


> Date: Mon, 26 Jul 2004 00:38:33 +0200
> From: Baurjan Ismagulov <ibr@ata.cs.hun.edu.tr>
> 
> I'm trying to track down a problem in a dynamic library. However, the
> bug doesn't show up if the code is compiled with -O0 (it is normally
> compiled with -O2). Any pointers or tips on how to proceed (except
> printf)?

Just debug as usual, GDB can debug optimized code.

In fact, I suggest to do that always, since if you debug a program
compiled without optimizations, then ship a binary compiled with -O2,
you in effect debugged and tested a similar, but quite different code.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]