[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [cdt-dev] MI behaviour - var-evaluate-expression
|
On Tuesday 02 December 2008 17:45:16 Marc Khouzam wrote:
> Hi,
>
> the command -var-create - * &(x)
> uses a * as the frame, which tells GDB to use the current frame and thread
> for this variableObject, permanently. What that means is that when
> you do a -var-evaluate-expression of that same varObject, GDB will
> evaluate it in the context of the proper thread and frame; no
> need to do a -thread-select.
>
> Don't forget to properly use -var-update if the memory might have changed.
>
> As a note, with var-create, instead of using * for the frame, you can use @;
> this will tell GDB to change the frame (and the thread?) for that variable
> to the current frame at the time of your -var-evaluate-expression. I haven't
> used that form, so I'm not very familiar with it.
FWIW, @-varobjs are documented in the GDB manual, CVS version, since yesterday.
- Volodya