Marc:
Recent versions of gcc have the optimization option -Og, which attempts to optimize the code without optimizing away variables, etc., that might confuse the programmer using gdb.
This option is certainly a lot better than -O0; at any rate, it should probably be set when Gambit is configured with debugging enabled.
Brad