Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Plugins development => Topic started by: electrolot on November 30, 2008, 05:20:45 pm

Title: SDK events
Post by: electrolot on November 30, 2008, 05:20:45 pm
I try to add new events to debugger in my plugin. I write code like below:

Code
  Manager* pm = Manager::Get();
  pm->RegisterEventSink(cbEVT_DEBUGGER_STARTED, new cbEventFunctor<myplugin, CodeBlocksEvent>(this, &myplugin::testevents));
  pm->RegisterEventSink(cbEVT_DEBUGGER_PAUSED, new cbEventFunctor<myplugin, CodeBlocksEvent>(this, &myplugin::testevents));
  pm->RegisterEventSink(cbEVT_DEBUGGER_FINISHED, new cbEventFunctor<myplugin, CodeBlocksEvent>(this, &myplugin::testevents));

...


void myplugin::testevents(CodeBlocksEvent &event)
{

  Manager::Get()->GetLogManager()->DebugLog(_("text"));
  wxMessageBox(_T("text"), _T("Warning"), wxOK);
}

When I build and install my plugin nothing happen.

Looks like this events are not implemented.

When I write this same code with cbEVT_EDITOR_OPEN. It's works but only partly. MessageBox appear but DebugLog does not works.
Title: Re: SDK events
Post by: martind on January 06, 2009, 03:05:28 am
Hi Electrolot,

Last time I checked, these were not implemented. I have a patched the debugger plugin, and dispatch them from in there.
I am working on an OpenOCD plugin, which is nearly ready for release.

I will send this soon.

Martin.
Title: Re: SDK events
Post by: electrolot on January 06, 2009, 02:24:27 pm
Hi Martin,

It's nice to hear that your plugin is nearly ready. I use OpenOCD too.
I'm waiting for your plugin. Please let know on Embedded forum when you finish.

When will you share your debugger plugin patch? I think that it should be added to C::B source code.

Title: Re: SDK events
Post by: martind on January 12, 2009, 03:19:15 pm
Hi Electrolot,

MCU / OpenOCD plugin:

http://forums.codeblocks.org/index.php/topic,9904.0.html

Martin.