This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Effect of 'register' keyword on debug info


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]