Re: Effect of 'register' keyword on debug info

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, May 24, 2012 at 3:40 AM, Ian Lance Taylor <iant@xxxxxxxxxx> wrote:
> Rohit Arul Raj <rohitarulraj@xxxxxxxxx> 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@xxxxxxxxxxx, which is for the development of GCC itself.  This
> question would be appropriate for gcc-help@xxxxxxxxxxx.  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.
>

Thanks Ian.
I tried with gcc v4.6.3 and get the same behavior.
Should this be considered as a bug with debug info generation then?

>
>> Also, using -fvar-tracking, i get this output while debugging the same
>> code.
>
> That looks like better output to me.
>
> Ian



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux