Commit 465e58fd authored by Peifeng Yu's avatar Peifeng Yu
Browse files

LLDB plugin: make debugger console work and some minor fix

parent 8abf2d0c
......@@ -25,6 +25,9 @@
+ controller
+ tool view
* disassembly widget
* memory view
- Tool views won't showup when start debug session
- Remove duplicate breakpoint: look at breakpointController()->setDeleteDuplicateBreakpoints(true)
......@@ -51,8 +54,13 @@
* can't have space in environment cd
* -inferior-tty-set only has dummy implementation
* 'process launch' doesn't provide thread-group-started notification
* File bug to lldb-mi for other missing commands
* sliently stop when attaching to process, which confuses the controller
* sliently stop when request stop at start
* -data-disassemble start and end address parameter doesn't accept expressions
* -gdb-set not fully implemented
+ environment
+ disassembly-flavor
* File bug to lldb-mi for other missing commands
- Data formatter for lldb
* if this works in MI?
......
......@@ -40,6 +40,8 @@ K_PLUGIN_FACTORY_WITH_JSON(LldbDebuggerFactory, "kdevlldb.json", registerPlugin<
LldbDebuggerPlugin::LldbDebuggerPlugin(QObject *parent, const QVariantList &)
: MIDebuggerPlugin("kdevlldb", parent)
, m_consoleFactory(nullptr)
, m_disassembleFactory(nullptr)
{
setXMLFile("kdevlldbui.rc");
......@@ -58,20 +60,21 @@ LldbDebuggerPlugin::LldbDebuggerPlugin(QObject *parent, const QVariantList &)
void LldbDebuggerPlugin::setupToolviews()
{
m_toolView = new DebuggerToolFactory<DebuggerConsoleView>(this,
"org.kdevelop.debugger.LldbConsole", Qt::BottomDockWidgetArea);
core()->uiController()->addToolView(
i18n("LLDB Console"),
m_toolView);
m_consoleFactory = new DebuggerToolFactory<DebuggerConsoleView>(this,
"org.kdevelop.debugger.LldbConsole", Qt::BottomDockWidgetArea);
core()->uiController()->addToolView(i18n("LLDB Console"), m_consoleFactory);
/*
m_disassembleFactory = new DebuggerToolFactory<DisassembleWidget>(this,
"org.kdevelop.debugger.LldbDisassemble", Qt::BottomDockWidgetArea);
core()->uiController()->addToolView(i18n("LLDB Disassemble/Register"), m_disassembleFactory);
*/
}
void LldbDebuggerPlugin::unload()
{
core()->uiController()->removeToolView(m_toolView);
core()->uiController()->removeToolView(m_consoleFactory);
/*
core()->uiController()->removeToolView(disassemblefactory);
core()->uiController()->removeToolView(lldbfactory);
core()->uiController()->removeToolView(m_disassembleFactory);
core()->uiController()->removeToolView(memoryviewerfactory);
*/
}
......
......@@ -27,6 +27,7 @@
#include "debugsession.h"
#include "widgets/debuggerconsoleview.h"
#include "widgets/disassemblewidget.h"
namespace KDevMI { namespace LLDB {
......@@ -58,7 +59,8 @@ private:
private:
DebuggerToolFactory<DebuggerConsoleView> *m_toolView;
DebuggerToolFactory<DebuggerConsoleView> *m_consoleFactory;
DebuggerToolFactory<DisassembleWidget> *m_disassembleFactory;
};
} // end of namespace LLDB
......
......@@ -169,9 +169,13 @@ QString LldbCommand::cmdToSend()
// -gdb-set is only partially implemented
case GdbSet: {
QString env_name = "environment ";
QString disassembly_flavor = "disassembly-flavor ";
if (command_.startsWith(env_name)) {
command_ = command_.mid(env_name.length());
overrideCmd = "settings set target.env-vars";
} else if (command_.startsWith(disassembly_flavor)) {
command_ = command_.mid(disassembly_flavor.length());
overrideCmd = "settings set target.x86-disassembly-flavor";
}
break;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment