[Differential] [Request, 8,278 lines] D1693: KDevelop LLDB support - GDB plugin refactor
qi437103 (Aetf)
noreply at phabricator.kde.org
Thu May 26 16:21:54 UTC 2016
qi437103 created this revision.
qi437103 added a reviewer: apol.
Restricted Application added a subscriber: kdevelop-devel.
REVISION SUMMARY
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.
TEST PLAN
Use existing unit tests, which should all pass, except 4-5 tests that are failing before these change.
REPOSITORY
rKDEVELOP KDevelop
BRANCH
peifeng/lldb
REVISION DETAIL
https://phabricator.kde.org/D1693
AFFECTED FILES
debuggers/CMakeLists.txt
debuggers/common/CMakeLists.txt
debuggers/common/breakpointcontrollerbase.cpp
debuggers/common/breakpointcontrollerbase.h
debuggers/common/dbgglobal.h
debuggers/common/debuggerbase.cpp
debuggers/common/debuggerbase.h
debuggers/common/debuglog.cpp
debuggers/common/debuglog.h
debuggers/common/debugsessionbase.cpp
debuggers/common/debugsessionbase.h
debuggers/common/mi/mi.cpp
debuggers/common/mi/mi.h
debuggers/common/mi/micommand.cpp
debuggers/common/mi/micommand.h
debuggers/common/mi/micommandqueue.cpp
debuggers/common/mi/micommandqueue.h
debuggers/common/mi/milexer.cpp
debuggers/common/mi/milexer.h
debuggers/common/mi/miparser.cpp
debuggers/common/mi/miparser.h
debuggers/common/mi/tokens.h
debuggers/common/miframestackmodel.cpp
debuggers/common/miframestackmodel.h
debuggers/common/mivariable.cpp
debuggers/common/mivariable.h
debuggers/common/stringhelpers.cpp
debuggers/common/stringhelpers.h
debuggers/common/stty.cpp
debuggers/common/stty.h
debuggers/common/variablecontrollerbase.cpp
debuggers/common/variablecontrollerbase.h
debuggers/gdb/CMakeLists.txt
debuggers/gdb/breakpointcontroller.cpp
debuggers/gdb/breakpointcontroller.h
debuggers/gdb/debug.h
debuggers/gdb/debuggerplugin.cpp
debuggers/gdb/debuggerplugin.h
debuggers/gdb/debuggertracingdialog.cpp
debuggers/gdb/debuggertracingdialog.h
debuggers/gdb/debugjob.cpp
debuggers/gdb/debugjob.h
debuggers/gdb/debugsession.cpp
debuggers/gdb/debugsession.h
debuggers/gdb/disassemblewidget.cpp
debuggers/gdb/disassemblewidget.h
debuggers/gdb/gdb.cpp
debuggers/gdb/gdb.h
debuggers/gdb/gdbbreakpointcontroller.cpp
debuggers/gdb/gdbbreakpointcontroller.h
debuggers/gdb/gdbcommand.cpp
debuggers/gdb/gdbcommand.h
debuggers/gdb/gdbcommandqueue.cpp
debuggers/gdb/gdbcommandqueue.h
debuggers/gdb/gdbconfigpage.cpp
debuggers/gdb/gdbconfigpage.h
debuggers/gdb/gdbframestackmodel.cpp
debuggers/gdb/gdbframestackmodel.h
debuggers/gdb/gdbglobal.h
debuggers/gdb/gdboutputwidget.cpp
debuggers/gdb/gdboutputwidget.h
debuggers/gdb/gdbvariable.cpp
debuggers/gdb/gdbvariable.h
debuggers/gdb/memviewdlg.cpp
debuggers/gdb/memviewdlg.h
debuggers/gdb/mi/Makefile.am
debuggers/gdb/mi/gdbmi.cpp
debuggers/gdb/mi/gdbmi.h
debuggers/gdb/mi/milexer.cpp
debuggers/gdb/mi/milexer.h
debuggers/gdb/mi/miparser.cpp
debuggers/gdb/mi/miparser.h
debuggers/gdb/mi/tokens.h
debuggers/gdb/printers/tests/qtprinters.cpp
debuggers/gdb/printers/tests/qtprinters.h
debuggers/gdb/processselection.cpp
debuggers/gdb/processselection.h
debuggers/gdb/registers/converters.cpp
debuggers/gdb/registers/converters.h
debuggers/gdb/registers/modelsmanager.cpp
debuggers/gdb/registers/modelsmanager.h
debuggers/gdb/registers/registercontroller.cpp
debuggers/gdb/registers/registercontroller.h
debuggers/gdb/registers/registercontroller_arm.cpp
debuggers/gdb/registers/registercontroller_arm.h
debuggers/gdb/registers/registercontroller_x86.cpp
debuggers/gdb/registers/registercontroller_x86.h
debuggers/gdb/registers/registersmanager.cpp
debuggers/gdb/registers/registersmanager.h
debuggers/gdb/registers/registersview.cpp
debuggers/gdb/registers/registersview.h
debuggers/gdb/selectcoredialog.cpp
debuggers/gdb/selectcoredialog.h
debuggers/gdb/stringhelpers.cpp
debuggers/gdb/stringhelpers.h
debuggers/gdb/stty.cpp
debuggers/gdb/stty.h
debuggers/gdb/unittests/test_gdb.cpp
debuggers/gdb/unittests/test_gdb.h
debuggers/gdb/variablecontroller.cpp
debuggers/gdb/variablecontroller.h
EMAIL PREFERENCES
https://phabricator.kde.org/settings/panel/emailpreferences/
To: qi437103, apol
Cc: kdevelop-devel
More information about the KDevelop-devel
mailing list