Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-debug-dev] ICDIThreadGroup.getCurrentThread()

Your model can use ICDIThreadGroup.getCurrentThread to inform the upper level what is the current context in your backend, or return null. There is no need to propogate the context to the model - all context-dependent calls to the model include the context as an argument. We used to it in the earlier versions of CDT, but we had too many problems.

----- Original Message ----- From: "Alexiev, Dobrin" <dalexiev@xxxxxx>
To: <cdt-debug-dev@xxxxxxxxxxx>
Sent: Monday, October 24, 2005 2:27 PM
Subject: [cdt-debug-dev] ICDIThreadGroup.getCurrentThread()


I am implementing a CDT debugger and I am wandering what is the meaning
of ICDIThreadGroup.getCurrentThread in terms of Debug Model.



The documentation says "Returns the currently selected thread." but it
is not clear what "selected" means.

Is it implied that when a thread is halted it automatically changes the
current thread in the model? What happens if few threads are halted at
the same time?

May be it is clear for GDB experts but I want to make sure I implement
it properly for our debugger too.



I see how it is used in CDT but I was wandering if that context should
only be kept in the presentation layer.

Or on the other side we could propagate the context to the model - then
we probably need also a method ICDIThreadGroup.setCurrentThread. Also we
may need similar IThread.setCurrentStackFrame, getCurrentStackFrame. And
may be notifications when that context changes.



Any thoughts....

May be I am missing something...



Thanks

Dobrin















Back to the top