Extract common code from the GDB debugger plugin, which potentially can be reused by LLDB debugger plugin.
This refactor only touches the low-level plugin part. The UI related and other things (namely launch configuration and configpages) will be done in a separate RR later.
Changes done:
- Rename namespace GDBMI to KDevDebugger::MI
- Move MI parser code to common folder
- Rename namespace GDBDebugger to KDevDebugger::GDB
- Move code from GDBDebugger::DebugSession to KDevDebugger::DebugSessionBase and make KDevDebugger::GDB::DebugSession inherits from it
- Move code from GDBDebugger::GDB to KDevDebugger::DebuggerBase and make KDevDebugger::GDB::GDB inherits from it
- Move code from GDBDebugger::GdbFrameStackModel to KDevDebugger::MIFrameStackModel and make KDevDebugger::GDB::GdbFrameStackModel inherits from it
- Move code from GDBDebugger::BreakpointController to KDevDebugger::BreakpointControllerBase and make KDevDebugger::GDB::BreakpointController inherits from it
- Move code from GDBDebugger::VariableController to KDevDebugger::VariableControllerBase and make KDevDebugger::GDB::VariableController inherits from it
- Move code from GDBDebugger::GdbVariable to KDevDebugger::MIVariable and make KDevDebugger::GDB::GdbVariable inherits from it
- Move stty and stringhelper to common code
It's still unknown how much LLDB-MI comforms to the MI specification, so I might be moving too much code to common code, but I try to reuse as many code as possible when implementing LLDB support, and will move some GDB-specific code back when it's suitable.
Note: unit test requires protected access to several class in KDevPlatform, due to namespace changes, the friend class declaration in KDevPlatform are invalid now. You will need to change that in KDevPlatform:debugger/variable/variablecollection.h to get the unit test compile. Anyway, I don't it's a good idea to have friend class declaration in KDevPlatform, and I'm looking into fix that later.