Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] [DSF] new context with stack frames

ken.ryall@xxxxxxxxx wrote:

Ling has passed this issue off to me so I wanted to follow up with some more
detail and see if you had any other thoughts:

In this use case when we initially launch a debug session there is no OS
running on the device and so there is really just one IExecutionDMContext,
the device itself running the OS startup code. But execution of this code
will eventually get the OS running and then the original IExecutionDMContext
for the startup code will go away and new ones will appear for the Processes
and Threads managed by the OS.
Makes sense.
So our EDC view model needs to support both in the same debug session. To
support this we've added a new kind of DMContext to EDC that has both the
attributes of a process (modules) and a thread (stack frames). It is a
IContainerDMContext that doesn't actually contain any other contexts.
I'm not clear on why this context needs to be a container.  Does this element later become a container once it becomes a process and not a system execution context?
To support this EDC's LaunchVMProvider now adds a stack frame node as a
child of the container node in addition to the thread node. This seems to
work OK but I'm still testing to see if any side effects show up.

Does all this sound like a reasonable approach?
In general yes.  Another option would be to create a dedicated thread node with a stack frame node under it.

Finally, If I'm understanding you correctly, I believe you're running into a problem that others have pointed out wrt DSF data model design.  The context types (IContainerDMContext in this case) are not dynamic since they are interfaces that are baked into the object type.  We may want to try to address this root problem in DSF and give you more flexibility here.

Thanks - Ken

From: ext Pawel Piech <pawel.piech@xxxxxxxxxxxxx>
Reply-To: "CDT General developers list." <cdt-dev@xxxxxxxxxxx>
Date: Fri, 28 May 2010 00:36:08 +0200
To: "CDT General developers list." <cdt-dev@xxxxxxxxxxx>
Subject: Re: [cdt-dev] [DSF] new context with stack frames

If your board doesn't have any threads, I would not have it implement
IContainerDMContext, since it's not a process, I wouldn't make it
implement IProcessDMContext either (no need for IProcesses service).  It
should be enough to have it only implement IExecutionDMContexts.
In the VM you may be able to re-use AbstractThreadsVMNode or you may
need to create a stripped down version of it.


On 05/27/2010 02:25 PM, Ling.5.Wang@xxxxxxxxx wrote:
Hi, Pawel and others,

I'm trying to add a debug context representing a bare board, which is not a
process nor thread. In Debug View I'd like to show the context under launch
with stack frames directly under it, namely it's like a "thread" entry but
without a "process" parent. How can I achieve that ?

I tried creating the context as IProcessDMContext and/or IContainerDMContext,
the conext showed up fine but I haven't found a way to let VM hook stack
frames directly under it.

Thanks for any pointer.

- Ling_______________________________________________
cdt-dev mailing list
cdt-dev mailing list
cdt-dev mailing list

Back to the top