This is the mail archive of the gdb@sourceware.org mailing list for the GDB 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] |
On Wed, Apr 12, 2006 at 04:04:36PM +0400, Vladimir Prus wrote:I'm running into what looks like a bug in -var-update. Basically, I create a
varobj with "&variable", then I enter a function that has a variable with
the same name, and -var-update does not report anything.
I think we've concluded that this is a feature, not a bug...
The value of "&i" changes, but -var-update does not report this. This can be
explained by the fact that varobjs are "bound" to the stack frame where
they were created, but that "binding" is not mentioned in documentation.
... and adding this to the manual would be welcome.
The frame under which the expression should be evaluated can be specified by @var{frame-addr}. A @samp{*} indicates that the current frame should be used.
The problem I'm trying to solve is this:
1. In some frame, I create varobj for 'i'.
2. After continue, I see that there's local variable 'i', and I want to find
out if previously-created varobj can be used to show this local 'i', or if
I should create new 'i'.
OK, so, you need to map this to a frame. Apple outputs the frame
address. I think this is pretty nasty; frame IDs ought to be opaque in
the interface (e.g. in case we change their contents again)... Jim,
what does your front end do with the frame IDs? Is there anything
besides testing for equality? If there is, we can use unique opaque
identifiers instead; personally I'm much happier with that. The
best unique identifier might in fact be the contents of the frame
ID; I'm just trying to define how clients are allowed to interpret
it, hopefully not at all.
Can somebody suggest the right fix? So far, I think that the simplest
approach is to make gdb print stack address of current frame, like is done
on the Apple branch:
553^done,stack=[frame= {level="0",addr="0x00003db0",fp="0xbffff2c0",......
That way, frontend can deal with the issue of frame stacks themself, and
-var-update will be only used when single-stepping inside a given frame.
Will patches to implement this be welcome?
I guess. It seems reasonable.
The MI working group list is now open; should we move this sort of conversation there?
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |