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: Designs for better debug info in GCC


Alexandre Oliva <aoliva@redhat.com> writes:

> On Dec 20, 2007, Ian Lance Taylor <iant@google.com> wrote:
> 
> > It is technically feasible but problematic for other reasons.
> >     i = i * m + ((i / j) + k) / n;
> > On a two register machine like the x86 i will change several times
> > during that calculation.
> 
> No.  The register used to hold its initial value will.  Keep in mind
> the separation between user variables and implementation locations.
> The user variable 'i' is only supposed to change when assignment
> operation is performed, (even if only in a theoretical level), when
> the final value of the RHS is available and stored in the location
> then assigned to hold the value of variable 'i'.

OK, fair enough.

> Now, it is possible that the previous value of 'i' becomes unavailable
> while the expression is evaluated.  Then, in order to represent this
> correctly, we just have to note that 'i' is no longer available as
> soon as all locations holding its original value are clobbered, and
> that it's available again when its new location holds the assigned
> value.

Right, which will significantly increase debugging size as you add two
more notes around many lines.

Ian


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