Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [dsdp-dd-dev] local variables view modes

On Fri, Jun 09, 2006 at 02:55:05PM -0500, John Cortell wrote:
> This gets a little confusing as there are two things to consider. Given a
> PC location and a local variable in optimized code:<br><br>
> 1. is the variable out of language scope?<br>
> 2. is its representation (in a register or stack slot) intact?<br><br>
> These are two independent states. Some compilers+symbolics can provide
> neither. Some can provide one but not necessarily the other. Ideally, if
> the answer is YES and YES, the debugger would show the non-live variable
> in the &quot;all&quot; mode as unavailable. But ultimately, the debugger
> can't guarantee this across the board as our debugger ultimately deals
> with many combinations of compiler and symbolics format. So, in one
> scenario, the debugger could be &quot;honest&quot;, but in a second it
> can't be, and there's no practical way to let the user know when it is
> and isn't being honest. <br><br>

I suggest that you are asking the wrong question.

There's no practical way for the debugger to indicate that the value,
as presented by the debug information, might be wrong due to inadequate
debug information.  But it sounds to me like you've written off taking
advantage of compilers which do give you accurate information for both
language scope and storage.  When the debug info says the variable is
unavailable, it really is, and we should be sure to present that to the
user.

Take advantage of everything we have to keep the debugger as honest as
possible!

-- 
Daniel Jacobowitz
CodeSourcery


Back to the top