This is the mail archive of the gcc@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:

> Looking at the debug info and the generated assembly, the values of
> variables 'f1' and 'd1' are stored in the same register.
> Due to this, while debugging, after setting the break point at (A)
> [line no 8], if we print the value of 'f1' i get the wrong value.


> Q: Is this the side effect of using 'register' keyword? If 'f1' is
> getting optimized out, shouldn't we get that info while debugging?

This question as stated is not really appropriate for the mailing list
gcc@gcc.gnu.org, which is for the development of GCC itself.  This
question would be appropriate for gcc-help@gcc.gnu.org.  Please take any
followups to gcc-help.  Thanks.

This has nothing to do with using the register keyword.

Yes, you should ideally be told when a value is unavailable.  This
specific area of GCC has been much improved since GCC 4.5.2.


> Also, using -fvar-tracking, i get this output while debugging the same
> code.

That looks like better output to me.

Ian


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