Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
Splitting debugger in two - specific debugger and common GUI
oBFusCATed:
In the case for GDB I use them only for internal memory management I think. I don't want to bother with calling
"for each(it in breakpoints) delete *it;". I think this is the only purpose of the shared_ptr here.
dmoore:
--- Quote from: oBFusCATed on February 10, 2011, 09:02:49 pm ---In the case for GDB I use them only for internal memory management I think. I don't want to bother with calling
"for each(it in breakpoints) delete *it;". I think this is the only purpose of the shared_ptr here.
--- End quote ---
Wasn't sure if you were worried about the plugin deleting cbBreakpoint instances while the framework was still using them. I notice that I don't have the tr1 stuff in my current MinGW isntall, which is maybe a small argument for not using shared_ptr. If the framework provides the breakpoint container and manages all of the "delete *it" etc, then probably not a big deal to just use regular pointers... (hides in corner from C++ faithful).
oBFusCATed:
You're using gcc/g++ < 4?
How did you manage to compile the branch, it uses shared_ptr extensively?
dmoore:
--- Quote from: oBFusCATed on February 10, 2011, 10:11:14 pm ---You're using gcc/g++ < 4?
How did you manage to compile the branch, it uses shared_ptr extensively?
--- End quote ---
Well I didn't on this machine, but I have more than one machine (and regularly use both linux and windows). I guess I'm a bit out of date on this windows box. :?
dmoore:
More questions...
1/ It looks like providing editor tooltips (to instantly "watch" a value) is left completely to the plugin at the moment. Is that right?
2/ Why is const cbStackFrame& GetStackFrame(...) ok, but const cbBreakpoint& GetBreakpoint(...) not? (pointer vs reference consistency issue)
3/ If a debugger doesn't support threads, what should "const cbThread& GetThread(...)" return? Should there be default implementations that do nothing for those?
4/ Likewise, are AttachToProcess, DetachFromProcess, IsAttachedToProcess optional and if so, shouldn't they have default implemetations?
5/ How should a Debugger signal the framework to update the watch and call frame?
6/ Does each debugger use its own debugger log or do they all share one?
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version