Mark Duckworth wrote:
I didn't even manage to trace it into the mintlib.
It is actually easy. Follow the following rules while compiling the buggy software:- do not use -O2 : a.out debug information is not accurate when optimization is turned on - do not use -fomit-frame-pointer : gdb is lost between functions if this one is used - use -g with the compiler (for generating debug information) and with the linker (for including the debug information inside the executable AND linking with libc_g.a, the debug version of the MiNTLib)
Then in gdb, use the "directory" command in order to add the correct directories for finding the MiNTLib sources.
I had compiled gmp with the default options, so it was optimized and undebuggable. I didn't want to recompile everything. So I went to the directory of that obstack stuff, I manually edited CFLAGS, and I deleted only the .o I wanted to rebuild, then I typed make (some steps forgotten) and I got the debug test executable.
-- Vincent Rivière