Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Sending GDB command through CDT. What command do I need from CommandFactory?
Sending GDB command through CDT. What command do I need from CommandFactory? [message #109900] Thu, 08 July 2004 21:29 Go to next message
Bruno Vais is currently offline Bruno VaisFriend
Messages: 11
Registered: July 2009
Junior Member
I am trying to send a "set hw-cycles 1" command to GDB, but I can't figure
out what type of command I need from the CommandFactory. I tried MIGDBSet,
but it doesn't work.
Any help would be appreciated.
Re: Sending GDB command through CDT. What command do I need from CommandFactory? [message #109908 is a reply to message #109900] Thu, 08 July 2004 21:39 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: mikhailk.qnx.com

That's what you need. What exactly happens when you use it?

"Bruno" <bvais@ti.com> wrote in message news:cckebp$8gg$1@eclipse.org...
> I am trying to send a "set hw-cycles 1" command to GDB, but I can't figure
> out what type of command I need from the CommandFactory. I tried MIGDBSet,
> but it doesn't work.
> Any help would be appreciated.
>
Re: Sending GDB command through CDT. What command do I need from CommandFactory? [message #110044 is a reply to message #109908] Fri, 09 July 2004 15:00 Go to previous message
Bruno Vais is currently offline Bruno VaisFriend
Messages: 11
Registered: July 2009
Junior Member
Hi Mikhail,
I get the following message in the console window:
"need to have malloc statement in project".
Perhaps I'm not using the right way to get a MISession. Here's what I do
in the plugin's "run" function:

public void run(IAction action) {
IDebugTarget
targets[]=DebugPlugin.getDefault().getLaunchManager().getDeb ugTargets();
ICDebugTarget target=(ICDebugTarget) targets[0].getDebugTarget();
ICDITarget cdiTarget=(ICDITarget)target.getAdapter( ICDITarget.class );

Session session=(Session) cdiTarget.getSession();
MISession mi=session.getMISession();
CommandFactory factory = mi.getCommandFactory();
MIGDBSet gdbSet=factory.createMIGDBSet(new String[] {"hw-cycles 1"});
mi.postCommand(gdbSet);
}
Thanks,
Bruno
Previous Topic:Code browsing...
Next Topic:How to make Code Assist work?
Goto Forum:
  


Current Time: Sat Oct 19 10:03:48 GMT 2024

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

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

Back to the top