Effect of 'register' keyword on debug info
Ian Lance Taylor
iant@google.com
Fri May 25 13:12:00 GMT 2012
Rohit Arul Raj <rohitarulraj@gmail.com> writes:
> Further, by default the debug info for variables 'd1' and 'f1' are
> generated as location expressions. Where as with '-fvar-tracking', the
> debug info is generated as location lists.
>
> 1) Is it possible to generate location expressions to identify that
> the variable has been optimized out?
I don't know.
> 2) If (1) is not possible and if '-fvar-tracking' gives accurate info
> on live variables, why isn't it turned ON by default at '-O0'?
That is a good question. Right now -fvar-tracking is turned on by
default at -O1. I guess the assumption was that at -O0 variables
wouldn't wind up in the same register.
> Since the code is compiled at '-O0' should correct debug info be generated?
Yes.
Ian
More information about the Gcc-help
mailing list