Author Topic: SDK events  (Read 6447 times)

Offline electrolot

  • Multiple posting newcomer
  • *
  • Posts: 18
SDK events
« 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.
« Last Edit: November 30, 2008, 05:22:24 pm by electrolot »

Offline martind

  • Multiple posting newcomer
  • *
  • Posts: 47
Re: SDK events
« Reply #1 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.

Offline electrolot

  • Multiple posting newcomer
  • *
  • Posts: 18
Re: SDK events
« Reply #2 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.


Offline martind

  • Multiple posting newcomer
  • *
  • Posts: 47
Re: SDK events
« Reply #3 on: January 12, 2009, 03:19:15 pm »
Hi Electrolot,

MCU / OpenOCD plugin:

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

Martin.