Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

Splitting debugger in two - specific debugger and common GUI

(1/136) > >>

oBFusCATed:
Hello,

I've played a bit with the GDB plugin trying to increase its speed, but I'm sure that is not possible much.
So I decided to make a new plugin using the GDB/mi interface.
I've done some testing made the thing execute commands and handle the output, but there is one major problem of C::B in that regard:
I've to reimplement all the GUI - watch, threads, call stack, register windows and menu.
I've reimplemented the menu, so I can play with it and now in my CB there are two menus one is Debug and the other Debug/MI.
And that is with only two debuggers, the mess will be massive if someone implements Lua (I would do it if we get the common interface), Python, etc debuggers.

My idea is to split the debugger plugin in two parts: a plugin that communicates with the actual debugger and a plugin/sdk that implements the GUI.
I would do the whole thing, I just need guidance, little help and a green light, so I know that this change is desired.

Best regards,
Teodor

ollydbg:
Great!
But what does "GDB/mi interface" means?

By the way: I found that the current GDB may add some python add-on, I'm not sure you can use them.

oBFusCATed:
ollydbg: see here http://sources.redhat.com/gdb/current/onlinedocs/gdb_26.html#SEC270 about gdb/mi ...
I don't care about python at the moment or ever will, what I want is to make extending debugging in CB easier.
Python/Lua were just examples what could be done in the future.

MortenMacFly:

--- Quote from: oBFusCATed on July 26, 2009, 01:27:44 pm ---My idea is to split the debugger plugin in two parts: a plugin that communicates with the actual debugger and a plugin/sdk that implements the GUI.

--- End quote ---
I understand why you want to do this, but isn't it possible (with the current code) to derive those UI parts from existing code and override the "incompatible" parts? If not I think it should be done careful, meaning taking other debuggers into account, too. That is if we do a general UI for GDB and GDB/MI the question is does it work with CDB and others, too? (Not saying it's not doable.)

oBFusCATed:
Morten how could I (in the GDB/mi plugin) derive from classes in GDB plugin? Or I have understood you incorrectly?

I don't think CDB is a concern because the current implementation works for both (only the drivers are different).
The hardest thing to abstract in the debugger part of CB is the watch window, the others would be straight forward.

For example the call stack window usage could look like this:

--- Code: ---
void MyDBG::OnUpdateCallStack()
{
    cbCallStackWindow *window = Manager::Get()->GetDebuggerUI(CB_DBG_UI_CALL_STACK);

    if(!window || !window->IsVisible())
        return;

    window->StartUpdating();

    foreach(frame in m_call_stack_frames)
    {
        window->AddFrame(cbCallStackFrame(frame.path, frame.addr, frame.symbol));
    }
    window->FinishUpdating();
}

--- End code ---

Navigation

[0] Message Index

[#] Next page

Go to full version