On Mon, Jul 13, 2009 at 05:40:15PM +0200, Enrico Ros wrote:
> Hello, I'm having real fun developing a plugin for Qt Creator (no, I'm not 
> integrating plasmoids ;-)). Now I'm facing some challenges and I'd like to 
> know the best way to proceed:
> 
>  1. [the trickiest] My Plugin has to use the Debugger plugin (for example to 
> execute gdb commands) and the Debugger plugin has to use My Plugin (for 
> example to execute some more gdb commands on debugging startup). How can I 
> untangle this?  a. Should MyPlugin be used by Debugger?  b. Should Debugger 
> expose its internal classes or interfaces (to allow the usage by other 
> plugins)? c. Any other suggestion is welcome.

Is this gdb specific? Or does it work with any debugger?

One option might be to simply put your stuff within the debugger plugin.
But for that to decide it would be nice to have some more information 
about what you are trying to do. 

Another one would be to have your plugin connect to a yet-to-be-invented
signal of the debugger plugin that's called synchroneously at an
'interesting' time. I don't think the debugger should know your plugin
unless I know what your plugin's doing ;-)

>  2. I may have the need to control the (debugging) execution, for example to 
> stop the program, execute a couple of debugger commands and start it back. Is 
> this available via the Debugger plugin internals or is it exposed in some 
> session/application wide way? Are there any callbacks to update My Plugin's 
> actions when the execution state changes? 

There's  DebuggerManager::startChanged(int newstatus), but that's meant
only for purely informational purposes, not to drive higher level
application logic.

>  3. I see that I can have many running executables for the code I'm editing 
> but up to 1 (i think) debugging session. Is the 'single debugger per qt-
> creator' enforced? Where can I look for this 'debugging session' properties? 
> And for the 'running sessions' ?

It currently is basically 'one instance per Creator', but it's not
formally enforced.  There might be some refactoring needed to have more
than one active debugging session, but it should be feasible.

Andre'
_______________________________________________
Qt-creator mailing list
Qt-creator@trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-creator

Reply via email to