Re: Name conflict in Expressions window
Re: Name conflict in Expressions window
- Subject: Re: Name conflict in Expressions window
- From: Jim Ingham <email@hidden>
- Date: Thu, 7 Oct 2004 11:00:08 -0700
The expressions window records the scope in which the variable was
originally created, and continues to evaluate the variable in that
scope (so long as it exists).
This is confusing because right now we have no way to show you the
scope of the variable. But I think it is useful behavior. The other
option is that when you change scopes (like moving around on the stack)
the variable value would change, which is ALSO confusing... It's
particularly odd when the variable of that name changes type from frame
to frame.
The way it is done now, you can create an expression in one frame, go
up on the stack, and create an expression with the same name in another
frame, and then compare the two. This is useful for recursive
routines, for instance.
The needed bit to make this work well is a column in the Expressions
window giving the scope (i.e. stack level, and maybe file:lineno) for a
given expression. I filed a radar on the Xcode Debugger asking for
this.
Jim
On Oct 5, 2004, at 2:03 PM, Jan E. Schotsman wrote:
Hello all,
I think I found a minor bug in the expressions window.
If a variable in a subroutine has the same name as a variable in the
caller, the Expressions window keeps showing the values that pertain
to the
caller.
I had a pointer that was passed at an offset to the subroutine and was
surprised to see the array values remain the same.
Nothing serious of course, but if you stare a lot at arrays like I do
it's
worth keeping in mind.
Jan.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden