forked from qt-creator/qt-creator
Debugger: Remove traces of outdated attempt at combined stepping
Has not been usable for a while and will be superseded by "native" mixed stepping. Change-Id: I2902a98b7ad4e4b29e389e54fb6488bf711840dd Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
This commit is contained in:
@@ -1924,20 +1924,4 @@ registerCommand("stackListFrames", stackListFrames)
|
||||
#
|
||||
#######################################################################
|
||||
|
||||
def qmlb(args):
|
||||
# executeCommand(command, to_string=True).split("\n")
|
||||
warn("RUNNING: break -f QScript::FunctionWrapper::proxyCall")
|
||||
output = gdb.execute("rbreak -f QScript::FunctionWrapper::proxyCall", to_string=True).split("\n")
|
||||
warn("OUTPUT: %s " % output)
|
||||
bp = output[0]
|
||||
warn("BP: %s " % bp)
|
||||
# BP: ['Breakpoint 3 at 0xf166e7: file .../qscriptfunction.cpp, line 75.\\n'] \n"
|
||||
pos = bp.find(' ') + 1
|
||||
warn("POS: %s " % pos)
|
||||
nr = bp[bp.find(' ') + 1 : bp.find(' at ')]
|
||||
warn("NR: %s " % nr)
|
||||
return bp
|
||||
|
||||
registerCommand("qmlb", qmlb)
|
||||
|
||||
bbsetup()
|
||||
|
||||
@@ -263,9 +263,6 @@ public:
|
||||
bool isMasterEngine() const;
|
||||
DebuggerEngine *masterEngine() const;
|
||||
|
||||
virtual bool setupQmlStep(bool /*on*/) { return false; }
|
||||
virtual void readyToExecuteQmlStep() {}
|
||||
|
||||
virtual bool canDisplayTooltip() const { return state() == InferiorStopOk; }
|
||||
|
||||
virtual void notifyInferiorIll();
|
||||
|
||||
@@ -222,7 +222,6 @@ GdbEngine::GdbEngine(const DebuggerStartParameters &startParameters)
|
||||
m_pendingBreakpointRequests = 0;
|
||||
m_commandsDoneCallback = 0;
|
||||
m_stackNeeded = false;
|
||||
m_preparedForQmlBreak = false;
|
||||
m_terminalTrap = startParameters.useTerminal;
|
||||
m_fullStartDone = false;
|
||||
m_systemDumpersLoaded = false;
|
||||
@@ -642,15 +641,6 @@ void GdbEngine::handleResponse(const QByteArray &buff)
|
||||
const Task::TaskType type = isFatalWinException(exCode) ? Task::Error : Task::Warning;
|
||||
TaskHub::addTask(type, m_lastWinException, Constants::TASK_CATEGORY_DEBUGGER_RUNTIME);
|
||||
}
|
||||
|
||||
if (data.startsWith("QMLBP:")) {
|
||||
int pos1 = 6;
|
||||
int pos2 = data.indexOf(' ', pos1);
|
||||
m_qmlBreakpointResponseId2 = BreakpointResponseId(data.mid(pos1, pos2 - pos1));
|
||||
//qDebug() << "FOUND QMLBP: " << m_qmlBreakpointNumbers[2];
|
||||
//qDebug() << "CURRENT: " << m_qmlBreakpointNumbers;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1404,9 +1394,7 @@ void GdbEngine::handleStopResponse(const GdbMi &data)
|
||||
showMessage(_("INVALID STOPPED REASON"), LogWarning);
|
||||
}
|
||||
|
||||
if (rid.isValid() && frame.isValid()
|
||||
&& !isQmlStepBreakpoint(rid)
|
||||
&& !isQFatalBreakpoint(rid)) {
|
||||
if (rid.isValid() && frame.isValid() && !isQFatalBreakpoint(rid)) {
|
||||
// Use opportunity to update the breakpoint marker position.
|
||||
BreakHandler *handler = breakHandler();
|
||||
//qDebug() << " PROBLEM: " << m_qmlBreakpointNumbers << rid
|
||||
@@ -1427,7 +1415,6 @@ void GdbEngine::handleStopResponse(const GdbMi &data)
|
||||
// Quickly set the location marker.
|
||||
if (lineNumber && !boolSetting(OperateByInstruction)
|
||||
&& QFileInfo::exists(fullName)
|
||||
&& !isQmlStepBreakpoint(rid)
|
||||
&& !isQFatalBreakpoint(rid))
|
||||
gotoLocation(Location(fullName, lineNumber));
|
||||
|
||||
@@ -1470,8 +1457,6 @@ void GdbEngine::handleStopResponse(const GdbMi &data)
|
||||
|
||||
QTC_ASSERT(state() == InferiorStopOk, qDebug() << state());
|
||||
|
||||
if (isQmlStepBreakpoint1(rid))
|
||||
return;
|
||||
|
||||
if (gotoHandleStop1)
|
||||
handleStop1(data);
|
||||
@@ -4591,54 +4576,6 @@ void GdbEngine::resetCommandQueue()
|
||||
}
|
||||
}
|
||||
|
||||
bool GdbEngine::setupQmlStep(bool on)
|
||||
{
|
||||
QTC_ASSERT(isSlaveEngine(), return false);
|
||||
m_qmlBreakpointResponseId1 = BreakpointResponseId();
|
||||
m_qmlBreakpointResponseId2 = BreakpointResponseId();
|
||||
//qDebug() << "CLEAR: " << m_qmlBreakpointNumbers;
|
||||
postCommand("tbreak '" + qtNamespace() + "QScript::FunctionWrapper::proxyCall'\n"
|
||||
"commands\n"
|
||||
"set $d=(void*)((FunctionWrapper*)callee)->data->function\n"
|
||||
"tbreak *$d\nprintf \"QMLBP:%d \\n\",$bpnum\ncontinue\nend",
|
||||
NeedsStop, CB(handleSetQmlStepBreakpoint));
|
||||
m_preparedForQmlBreak = on;
|
||||
return true;
|
||||
}
|
||||
|
||||
void GdbEngine::handleSetQmlStepBreakpoint(const GdbResponse &response)
|
||||
{
|
||||
//QTC_ASSERT(state() == EngineRunRequested, qDebug() << state());
|
||||
if (response.resultClass == GdbResultDone) {
|
||||
// logStreamOutput: "tbreak 'myns::QScript::FunctionWrapper::proxyCall'\n"
|
||||
// consoleStreamOutput: "Temporary breakpoint 1 at 0xf166e7:
|
||||
// file bridge/qscriptfunction.cpp, line 75.\n"}
|
||||
QByteArray ba = parsePlainConsoleStream(response);
|
||||
const int pos2 = ba.indexOf(" at 0x");
|
||||
const int pos1 = ba.lastIndexOf(" ", pos2 - 1) + 1;
|
||||
QByteArray mid = ba.mid(pos1, pos2 - pos1);
|
||||
m_qmlBreakpointResponseId1 = BreakpointResponseId(mid);
|
||||
//qDebug() << "SET: " << m_qmlBreakpointResponseId1;
|
||||
}
|
||||
QTC_ASSERT(masterEngine(), return);
|
||||
masterEngine()->readyToExecuteQmlStep();
|
||||
}
|
||||
|
||||
bool GdbEngine::isQmlStepBreakpoint(const BreakpointResponseId &id) const
|
||||
{
|
||||
return isQmlStepBreakpoint1(id) || isQmlStepBreakpoint2(id);
|
||||
}
|
||||
|
||||
bool GdbEngine::isQmlStepBreakpoint1(const BreakpointResponseId &id) const
|
||||
{
|
||||
return id.isValid() && m_qmlBreakpointResponseId1 == id;
|
||||
}
|
||||
|
||||
bool GdbEngine::isQmlStepBreakpoint2(const BreakpointResponseId &id) const
|
||||
{
|
||||
return id.isValid() && m_qmlBreakpointResponseId2 == id;
|
||||
}
|
||||
|
||||
bool GdbEngine::isQFatalBreakpoint(const BreakpointResponseId &id) const
|
||||
{
|
||||
return id.isValid() && m_qFatalBreakpointResponseId == id;
|
||||
@@ -4646,7 +4583,7 @@ bool GdbEngine::isQFatalBreakpoint(const BreakpointResponseId &id) const
|
||||
|
||||
bool GdbEngine::isHiddenBreakpoint(const BreakpointResponseId &id) const
|
||||
{
|
||||
return isQFatalBreakpoint(id) || isQmlStepBreakpoint(id);
|
||||
return isQFatalBreakpoint(id);
|
||||
}
|
||||
|
||||
bool GdbEngine::usesExecInterrupt() const
|
||||
|
||||
@@ -472,17 +472,6 @@ protected:
|
||||
// For short-circuiting stack and thread list evaluation.
|
||||
bool m_stackNeeded;
|
||||
|
||||
//
|
||||
// Qml
|
||||
//
|
||||
BreakpointResponseId m_qmlBreakpointResponseId1;
|
||||
BreakpointResponseId m_qmlBreakpointResponseId2;
|
||||
bool m_preparedForQmlBreak;
|
||||
bool setupQmlStep(bool on);
|
||||
void handleSetQmlStepBreakpoint(const GdbResponse &response);
|
||||
bool isQmlStepBreakpoint(const BreakpointResponseId &id) const;
|
||||
bool isQmlStepBreakpoint1(const BreakpointResponseId &id) const;
|
||||
bool isQmlStepBreakpoint2(const BreakpointResponseId &id) const;
|
||||
bool isQFatalBreakpoint(const BreakpointResponseId &id) const;
|
||||
bool isHiddenBreakpoint(const BreakpointResponseId &id) const;
|
||||
|
||||
|
||||
@@ -285,26 +285,10 @@ void QmlCppEngine::detachDebugger()
|
||||
|
||||
void QmlCppEngine::executeStep()
|
||||
{
|
||||
// TODO: stepping from qml -> cpp requires more thought
|
||||
// if (m_activeEngine == m_qmlEngine) {
|
||||
// QTC_CHECK(m_cppEngine->state() == InferiorRunOk);
|
||||
// if (m_cppEngine->setupQmlStep(true))
|
||||
// return; // Wait for callback to readyToExecuteQmlStep()
|
||||
// } else {
|
||||
// notifyInferiorRunRequested();
|
||||
// m_cppEngine->executeStep();
|
||||
// }
|
||||
|
||||
notifyInferiorRunRequested();
|
||||
m_activeEngine->executeStep();
|
||||
}
|
||||
|
||||
void QmlCppEngine::readyToExecuteQmlStep()
|
||||
{
|
||||
notifyInferiorRunRequested();
|
||||
m_qmlEngine->executeStep();
|
||||
}
|
||||
|
||||
void QmlCppEngine::executeStepOut()
|
||||
{
|
||||
notifyInferiorRunRequested();
|
||||
|
||||
@@ -138,7 +138,6 @@ private:
|
||||
void setState(DebuggerState newState, bool forced = false);
|
||||
void slaveEngineStateChanged(DebuggerEngine *slaveEngine, DebuggerState state);
|
||||
|
||||
void readyToExecuteQmlStep();
|
||||
void setActiveEngine(DebuggerEngine *engine);
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user