[Bf-committers] gdb and blender
Mon, 13 Oct 2003 23:23:15 -0500
Jacques Guignot wrote:
> I'm not sure this *exactly* the best place for this question, but I
> think it may be a *good* place... :-)
> Does anyone know if it is possible to set a watchpoint for gdb with
> blender? Settings breakpoints is straightforward, but when I set a
> watchpoint on a variable, gdb freezes, and must be killed...
You can do it, but you may need to turn optimization off.
Debuggers tend to act funny with optimized code: variables
disappear, can't set breakpoints, etc.
The 'default' optimization level from running ./configure
is -O2. You can use -O0 ( that's capital O numeric 0 ) for
One way to turn it off is to run configure like
CFLAGS="-g -O0" ./configure
Another is to edit all the Makefiles and remove the -O2 flag.