Prepare for lldb plugin: move code from gdb debugger plugin to common one.
ClosedPublic

Authored by qi437103 on Jun 22 2016, 3:41 PM.

Details

Summary
  • New MIDebuggerPlugin, which GDB::CppDebuggerPlugin now inherits from
  • Solve old TODOs in GDB::CppDebuggerPlugin
  • Move debuggers/gdb/debugjob.* to debuggers/common/midebugjobs.*
  • New MIExamineCoreJob and MIAttachProcessJob
  • Move process selection dialog and select core dialog to common
Test Plan

unit tests under gdb folder

Diff Detail

Repository
R32 KDevelop
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
qi437103 updated this revision to Diff 4677.Jun 22 2016, 3:41 PM
qi437103 retitled this revision from to Prepare for lldb plugin: move code from gdb debugger plugin to common one..
qi437103 updated this object.
qi437103 edited the test plan for this revision. (Show Details)
qi437103 added a reviewer: apol.
Restricted Application added a subscriber: kdevelop-devel. · View Herald TranscriptJun 22 2016, 3:41 PM
apol edited edge metadata.Jun 22 2016, 4:16 PM

I'm a bit afraid you might be trying to abstract things out a bit too much. it's ok if GDB and LLDB have some similar code...

debuggers/common/midebuggerplugin.cpp
75

What's with the commented code?

But the logic is exactly the same for gdb and lldb to setup drkonqi and menu actions. Most difference between gdb and lldb is handled in their own DebugSession.

debuggers/common/midebuggerplugin.cpp
75

It's handled in GDB::CppDebuggerPlugin right now. As it's mostly UI code and I don't want to touch it before lldb plugin is feature complete to some extent.

And most tool views requires a pointer to the plugin. A common base class can avoid have different ui class for gdb and lldb.

apol accepted this revision.Jun 23 2016, 10:59 AM
apol edited edge metadata.

But the logic is exactly the same for gdb and lldb to setup drkonqi and menu actions. Most difference between gdb and lldb is handled in their own DebugSession.

Let's get this in. Still, I wouldn't add the commented code.

This revision is now accepted and ready to land.Jun 23 2016, 10:59 AM
This revision was automatically updated to reflect the committed changes.

Sure, I'll think about it again. Actually I also have the feeling that I might be sharing too much code between lldb and gdb.