how to examine data with compiler optimization option set?

Robert Dewar
Thu Sep 4 10:53:00 GMT 2008

Andreas Schwab wrote:
> Robert Dewar <> writes:
>> Well you always had local variables disappearing in earlier versions
>> but enough worked so you could debug, in particular parameters were
>> always available and reliable.
> If parameters are passed in registers they are very likely to get lost.
> Even on i386 parameters sometimes get passed in registers, eg. when
> calling local functions.

Yes, indeed parameters do get lost and I find it impossible in
practice to debug at -O1 (whereas this was ny normal practice
for many years).

What I am saying is that if an effort is put in to improve
the debugging information, for me this would be the primary
> Andreas.

More information about the Gdb mailing list