Commit e4de4012 authored by hjk's avatar hjk

Debugger: Enable 'native mixed' toogling also for LLDB

Change-Id: I50a026d6af2874aa78db98b0df1fcbe233c88b1b
Reviewed-by: default avatarhjk <hjk@theqtcompany.com>
parent 61388613
......@@ -254,7 +254,6 @@ class Dumper(DumperBase):
self.breakpointsToCheck = set([])
self.qmlBreakpointResolvers = {}
self.qmlTriggeredBreakpoint = None
self.nativeMixed = False
def enterSubItem(self, item):
if isinstance(item.name, lldb.SBValue):
......@@ -834,18 +833,19 @@ class Dumper(DumperBase):
return i
return None
def reportStack(self, args = {}):
def reportStack(self, args):
if not self.process:
self.report('msg="No process"')
return
thread = self.currentThread()
limit = args.get('stacklimit', -1)
if not thread:
self.report('msg="No thread"')
return
(n, isLimited) = (limit, True) if limit > 0 else (thread.GetNumFrames(), False)
isNativeMixed = int(args.get('nativeMixed', 0))
limit = args.get('stacklimit', -1)
(n, isLimited) = (limit, True) if limit > 0 else (thread.GetNumFrames(), False)
self.currentCallContext = None
result = 'stack={current-thread="%s"' % thread.GetThreadID()
result += ',frames=['
......@@ -866,7 +866,7 @@ class Dumper(DumperBase):
usable = None
language = None
if self.nativeMixed:
if isNativeMixed:
if self.isReportableQmlFrame(functionName):
engine = frame.FindVariable("engine")
self.context = engine
......@@ -1727,7 +1727,6 @@ class Dumper(DumperBase):
self.reportVariables()
def createResolvePendingBreakpointsHookBreakpoint(self, args):
self.nativeMixed = True
if self.qmlTriggeredBreakpoint is None:
self.qmlTriggeredBreakpoint = \
self.target.BreakpointCreateByName("qt_v4TriggeredBreakpointHook")
......
......@@ -181,6 +181,9 @@ public:
connect(action(IntelFlavor), SIGNAL(valueChanged(QVariant)),
SLOT(reloadDisassembly()));
connect(action(OperateNativeMixed), &QAction::triggered,
engine, &DebuggerEngine::reloadFullStack);
Utils::globalMacroExpander()->registerFileVariables(PrefixDebugExecutable,
tr("Debugged executable"),
[this]() { return m_startParameters.executable; });
......
......@@ -515,6 +515,7 @@ void LldbEngine::activateFrame(int frameIndex)
const int n = stackHandler()->stackSize();
if (frameIndex == n) {
DebuggerCommand cmd("reportStack");
cmd.arg("nativeMixed", isNativeMixedActive());
cmd.arg("stacklimit", n * 10 + 3);
runCommand(cmd);
return;
......@@ -797,6 +798,7 @@ void LldbEngine::updateAll()
void LldbEngine::reloadFullStack()
{
DebuggerCommand cmd("reportStack");
cmd.arg("nativeMixed", isNativeMixedActive());
cmd.arg("stacklimit", -1);
runCommand(cmd);
}
......@@ -804,6 +806,7 @@ void LldbEngine::reloadFullStack()
void LldbEngine::updateStack()
{
DebuggerCommand cmd("reportStack");
cmd.arg("nativeMixed", isNativeMixedActive());
cmd.arg("stacklimit", action(MaximalStackDepth)->value().toInt());
runCommand(cmd);
}
......@@ -842,6 +845,7 @@ void LldbEngine::doUpdateLocals(UpdateParameters params)
WatchHandler *handler = watchHandler();
DebuggerCommand cmd("updateData");
cmd.arg("nativeMixed", isNativeMixedActive());
cmd.arg("expanded", handler->expansionRequests());
cmd.arg("typeformats", handler->typeFormatRequests());
cmd.arg("formats", handler->individualFormatRequests());
......
......@@ -66,10 +66,6 @@ StackHandler::StackHandler()
m_canExpand = false;
connect(action(OperateByInstruction), &QAction::triggered,
this, &StackHandler::resetModel);
if (isNativeMixedEnabled())
connect(action(OperateNativeMixed), &QAction::triggered,
this, &StackHandler::resetModel);
}
StackHandler::~StackHandler()
......
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