Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Adding new commands to debugger
Adding new commands to debugger [message #1410344] Wed, 20 August 2014 13:43 Go to next message
David Wootton is currently offline David WoottonFriend
Messages: 18
Registered: July 2009
Junior Member
I am implementing a set of plugins which extend the CDT debugger and where I need to issue some additional gdb commands.

I am trying to figure out what I need to do to invoke new gdb commands from a user interface class, such as when handling a menu click in the Eclipse main menu or as a result of a button click in a view. In some cases I need to issue the command and just verify success and in others I need to also get command response data.

I found the ResumeAtLine class which looks like it does things similar to what I want to do. The problem I'm having is that the constructor for this class expects a context to be passed to it and I am not sure how I get the context for the active debug session. Once I have that, I think I'm able to issue gdb commands.

Is this a reasonable class to be looking at to do what I want or should I be looking elsewhere? Can you recommend a simple implementation I can use as an example?

Thanks
Re: Adding new commands to debugger [message #1415779 is a reply to message #1410344] Wed, 03 September 2014 15:35 Go to previous message
David Wootton is currently offline David WoottonFriend
Messages: 18
Registered: July 2009
Junior Member
I've found that if I have access to the control service I created for my plugin then I can get access to its context object and can call queueCommand to submit commands and get command responses.

In looking at the implementation of queueCommand in the AbstractMIControl class, I do not see any synchronization logic protecting it and the command queue object is an ArrayList which also has no synchronization.

I'm invoking queueCommand from the Eclipse main UI thread, and will be moving those invocations to a separate thread eventually. Am I going to have problems submitting commands from an arbitrary thread?

I noticed there seems to be a dedicated DSF thread where gdb commands are issued using queueCommand, such as in the gdb startup processing. Do I need to get my invocations of queueCommand to run on that thread, and if so, how do I do it?

Thanks
Previous Topic:Luna / GCC / C++0x: Eclipse cannot resolve array symbol
Next Topic:luna indexer problem that kepler did not have
Goto Forum:
  


Current Time: Fri Oct 11 16:15:08 GMT 2024

Powered by FUDForum. Page generated in 0.07342 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top