Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-debug-dev] Events and CDI

Okay, I'm still looking at this. I'm trying to make sense out of the various accessor methods related to variables and the way that the GDB/MI integration fires update events...

Attached is a screenshot of what I'm seeing. As far as I can tell, I'm implementing all required methods (stubbed out to keep things simple, but implemented nonetheless). I have trace messages in the methods, so I can see that the 'LocalVariable.getValue()' and  'IntValue.intValue()' methods are being called. Yet, the GUI still displays 'pending'. If I select different elements in the target view (toggle back and forth between stack frames), I can sometimes get a value or two to display.

Here are my two major questions:

- Can I treat methods like StackFrame.createLocalVariable() as a factory method (ie it returns a new object each time it's called)? I notice the GDB/MI integration does not, but I'm not sure if this is required by CDI or by the GDB/MI integration architecture.

- Are there any good rules of thumb for when to fire Changed events and Destroyed events? It's a bit unclear to me, from the GDB/MI source, what things should trigger variable update. In general, should I update Variables? VariableDescriptors? Values?


Thanks in advance!

-Matthew


On 10/19/05, Mikhail Khodjaiants <mikhailk@xxxxxxx> wrote:
You don't need to fire a CreatedEvent for local variables. The rendering of
the Variables view is asynchronous and messages you see are generated by the
label decorators. All you have to do is to implement the "getValue" method
of ICDIVariable.

----- Original Message -----
From: "Matthew Ballance" <matt.ballance@xxxxxxxxx>
To: "cdt-debug-dev" < cdt-debug-dev@xxxxxxxxxxx>
Sent: Wednesday, October 19, 2005 9:45 AM
Subject: [cdt-debug-dev] Events and CDI


> Hi all,
>
>    I'm working on a debugger that uses the win32 and MS-provided
> symbol-access APIs to support debugging of Visual Studio-compiled
> applications. I've run into a problem with supporting variables and
> thought that a CDI developer or a developer of the CDI gdb-mi debugger
> could give me some pointers...
>
>    My first attempt at showing variables was to get method-local
> variables and parameters working. ICDIStackFrame has a method
> getLocalVariableDescriptors() that returns an array of variables
> descriptors. I've implemented this method to return variable descriptors
> for the local parameters of the current stack frame. What I observe in
> Eclipse is that sometimes the <var-name> = <value> item is displayed in
> the Variables view, sometimes "Pending ..." is displayed, and sometimes
> "..." is shown.
>
>    I learned when implemented breakpoints that a CreatedEvent had to be
> posted for each new breakpoint in addition to returning the breakpoint
> object from the set<Type>Breakpoint. I thought that perhaps I needed to
> do something similar for variables. I started by posting CreatedEvent's
> when createLocalVariable() was called, but saw no change in behavior. I
> also tried posting CreateEvent's from getLocalVariableDescriptors().
> Again, no change in behavior.
>
>    Any thoughts on what I may be doing wrong?
>
>    Thanks in advance!
>
> Thanks and Regards,
> Matthew
>
>
>
>

_______________________________________________
cdt-debug-dev mailing list
cdt-debug-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-debug-dev

Attachment: var_update.jpg
Description: JPEG image


Back to the top