Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
Splitting debugger in two - specific debugger and common GUI
MortenMacFly:
--- Quote from: oBFusCATed on August 01, 2009, 10:36:13 am ---Where do I put a new header that should not be visible to the users in the sdk, only by the implementation?
--- End quote ---
Huh? What exactly do you mean? Notice that if the SDK needs this header file it had to be available.
oBFusCATed:
I have:
a.h,b.h,a.cpp,b.cpp
in a.cpp I include b.h. b.h is included in no other header, so it should not be visible to the users of the sdk.
Where do I put b.h? At the moment I've put it in src\include.
Another thing:
I want to add the method:
void cbDebuggerPlugin::GetBreakpoints(some_container_type &container);
What should be the some_container_type?
WX_DEFINE_ARRAY(cbBreakPoint*, BreakpointsList); ?
std::vector<cbBreakPoint> ?
or class cbBreakPointList, that I have to define, manually?
The elements in the container should be owned by the container.
MortenMacFly:
--- Quote from: oBFusCATed on August 02, 2009, 10:35:09 am ---in a.cpp I include b.h. b.h is included in no other header, so it should not be visible to the users of the sdk.
--- End quote ---
Just leave it where it is. The SDK docu will take care of not including this file in the documentation. Alternatively (if it's a small helper class) you can also embed it on top of the actual class (so in a.h) and comment it accordingly. There are several SDK classes that do similar (with the embedded classes *not* to be used directly).
--- Quote from: oBFusCATed on August 02, 2009, 10:35:09 am ---WX_DEFINE_ARRAY(cbBreakPoint*, BreakpointsList); ?
std::vector<cbBreakPoint> ?
--- End quote ---
I'd personally prefer the first, but if that would be the only "wx code" and you'd strive for portability sure std::vector is the thing to do.
oBFusCATed:
I've some progress.... :lol: 8)
0. I've added a DebuggerManager, to hold all debugger related stuff
1. I've extracted the Debug menu (should move the resource file thought). The code is moved in the DebuggerMenu class.
1.1. Some of the menu items work (start, stop, step, next, continue)
1.2. I've added submenu Debug->Active Debugger. I've added API calls to register/unregister debuggers. The menu items are radio items, and switching the active debugger works.
2. I've extracted the breakpoints dialog and edit breakpoints
3. I've move the code from DebuggerGDB::SyncEditor to DebuggerManager::SyncEditor
Here is the patch that shows the changes: http://smrt.is-a-geek.org/codeblocks/dbg_refactor/dbg_refactor0001.patch
Parallel to the changes I make to CB, I modify my gdb_mi debugger plugin, so I can test if the changes are working.
The plugin can be found here: svn://smrt.is-a-geek.org/cb_gdb_mi .
The things that work: stepping and setting breakpoints at the beginning (before you have started the debugger).
Next on my TODO:
1. extracting the dbg toolbar
2. rewriting the watches window from scratch, using PropGrid control - if you know about a control that is more suitable for it, please tell me (I'm a beginner in wx programming)
Any feedback is welcome. :lol:
dmoore:
when you get this sufficiently ready, I'll try to make some time to offer myself as guinea pig and write a python debugger.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version