| 1 | /**************************************************************************** |
| 2 | ** |
| 3 | ** Copyright (C) 2017 The Qt Company Ltd. |
| 4 | ** Contact: https://www.qt.io/licensing/ |
| 5 | ** |
| 6 | ** This file is part of the examples of the Qt Toolkit. |
| 7 | ** |
| 8 | ** $QT_BEGIN_LICENSE:BSD$ |
| 9 | ** Commercial License Usage |
| 10 | ** Licensees holding valid commercial Qt licenses may use this file in |
| 11 | ** accordance with the commercial license agreement provided with the |
| 12 | ** Software or, alternatively, in accordance with the terms contained in |
| 13 | ** a written agreement between you and The Qt Company. For licensing terms |
| 14 | ** and conditions see https://www.qt.io/terms-conditions. For further |
| 15 | ** information use the contact form at https://www.qt.io/contact-us. |
| 16 | ** |
| 17 | ** BSD License Usage |
| 18 | ** Alternatively, you may use this file under the terms of the BSD license |
| 19 | ** as follows: |
| 20 | ** |
| 21 | ** "Redistribution and use in source and binary forms, with or without |
| 22 | ** modification, are permitted provided that the following conditions are |
| 23 | ** met: |
| 24 | ** * Redistributions of source code must retain the above copyright |
| 25 | ** notice, this list of conditions and the following disclaimer. |
| 26 | ** * Redistributions in binary form must reproduce the above copyright |
| 27 | ** notice, this list of conditions and the following disclaimer in |
| 28 | ** the documentation and/or other materials provided with the |
| 29 | ** distribution. |
| 30 | ** * Neither the name of The Qt Company Ltd nor the names of its |
| 31 | ** contributors may be used to endorse or promote products derived |
| 32 | ** from this software without specific prior written permission. |
| 33 | ** |
| 34 | ** |
| 35 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
| 36 | ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
| 37 | ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
| 38 | ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
| 39 | ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
| 40 | ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
| 41 | ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 42 | ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 43 | ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 44 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 45 | ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." |
| 46 | ** |
| 47 | ** $QT_END_LICENSE$ |
| 48 | ** |
| 49 | ****************************************************************************/ |
| 50 | |
| 51 | #include "scriptdebugger.h"cxx . . $ `<file>/examples/script/qsdbg/scriptdebugger.h`/ |
| 52 | #include "scriptbreakpointmanager.h"cxx . . $ `<file>/examples/script/qsdbg/scriptbreakpointmanager.h`/ |
| 53 | |
| 54 | #include <QtScript/QScriptEngine>cxx . . $ `<file>/include/QtScript/QScriptEngine`/ |
| 55 | #include <QtScript/QScriptEngineAgent>cxx . . $ `<file>/include/QtScript/QScriptEngineAgent`/ |
| 56 | #include <QtScript/QScriptContextInfo>cxx . . $ `<file>/include/QtScript/QScriptContextInfo`/ |
| 57 | #include <QtScript/QScriptValueIterator>cxx . . $ `<file>/include/QtScript/QScriptValueIterator`/ |
| 58 | #include <QtCore/QTextStream> |
| 59 | #include <QtCore/QStack> |
| 60 | |
| 61 | static QStringcxx . . $ QString# safeValueToStringcxx . . $ safeValueToString(d5e99072243b3a5c).(const QScriptValuecxx . . $ QScriptValue# &value) |
| 62 | { |
| 63 | if (value.isObjectcxx . . $ QScriptValue#isObject(50ce9a9e25b4a850).()) |
| 64 | return QLatin1Stringcxx . . $ QString#QString(4641beeb24e75d60).("[object Object]"); |
| 65 | else |
| 66 | return value.toStringcxx . . $ QScriptValue#toString(6ef7b6c27b00b43d).(); |
| 67 | } |
| 68 | |
| 69 | class ScriptInfocxx . . $ ScriptInfo#; |
| 70 | class ScriptBreakpointManagercxx . . $ ScriptBreakpointManager#; |
| 71 | |
| 72 | class ScriptDebuggerPrivatecxx . . $ ScriptDebuggerPrivate# |
| 73 | : public QScriptEngineAgentcxx . . $ QScriptEngineAgent# |
| 74 | { |
| 75 | Q_DECLARE_PUBLICcxx . . $ `<external>/15045578679651060896/qglobal.h:1172:9`!(ScriptDebugger) |
| 76 | public: |
| 77 | enum Modecxx . . $ ScriptDebuggerPrivate#Mode# { |
| 78 | Runcxx . . $ ScriptDebuggerPrivate#Run., |
| 79 | StepIntocxx . . $ ScriptDebuggerPrivate#StepInto., |
| 80 | StepOvercxx . . $ ScriptDebuggerPrivate#StepOver. |
| 81 | }; |
| 82 | |
| 83 | ScriptDebuggerPrivatecxx . . $ ScriptDebuggerPrivate#ScriptDebuggerPrivate(d3e0164fcca5dac6).(QScriptEnginecxx . . $ QScriptEngine# *engine); |
| 84 | ~cxx . . $ ScriptDebuggerPrivate#`~ScriptDebuggerPrivate`(ced63f7c635d850d).ScriptDebuggerPrivatecxx . . $ ScriptDebuggerPrivate#(); |
| 85 | |
| 86 | // QScriptEngineAgent interface |
| 87 | void scriptLoadcxx . . $ ScriptDebuggerPrivate#scriptLoad(a07cc45066a712e1).(qint64cxx . . $ qint64# id, const QStringcxx . . $ QString# &program, |
| 88 | const QStringcxx . . $ QString# &fileName, int lineNumber); |
| 89 | void scriptUnloadcxx . . $ ScriptDebuggerPrivate#scriptUnload(35cb52607f6af42f).(qint64cxx . . $ qint64# id); |
| 90 | |
| 91 | void positionChangecxx . . $ ScriptDebuggerPrivate#positionChange(8340a051bd88fc1d).(qint64cxx . . $ qint64# scriptId, |
| 92 | int lineNumber, int columnNumber); |
| 93 | |
| 94 | void functionEntrycxx . . $ ScriptDebuggerPrivate#functionEntry(35cb52607f6af42f).(qint64cxx . . $ qint64# scriptId); |
| 95 | void functionExitcxx . . $ ScriptDebuggerPrivate#functionExit(ffe3d7c603bb85e5).(qint64cxx . . $ qint64# scriptId, |
| 96 | const QScriptValuecxx . . $ QScriptValue# &returnValue); |
| 97 | |
| 98 | void exceptionThrowcxx . . $ ScriptDebuggerPrivate#exceptionThrow(fb4a237cc3cb37d3).(qint64cxx . . $ qint64# scriptId, |
| 99 | const QScriptValuecxx . . $ QScriptValue# &exception, bool hasHandler); |
| 100 | |
| 101 | |
| 102 | void interactivecxx . . $ ScriptDebuggerPrivate#interactive(49f6e7a06ebc5aa8).(); |
| 103 | bool executeCommandcxx . . $ ScriptDebuggerPrivate#executeCommand(8f660b66a5b7e95a).(const QStringcxx . . $ QString# &command, const QStringListcxx . . $ QStringList# &args); |
| 104 | |
| 105 | void setModecxx . . $ ScriptDebuggerPrivate#setMode(475977749f749da4).(Modecxx . . $ ScriptDebuggerPrivate#Mode# mode); |
| 106 | Modecxx . . $ ScriptDebuggerPrivate#Mode# modecxx . . $ ScriptDebuggerPrivate#mode(16363bca95283531).() const; |
| 107 | |
| 108 | int frameCountcxx . . $ ScriptDebuggerPrivate#frameCount(455f465bc33b4cdf).() const; |
| 109 | void setCurrentFrameIndexcxx . . $ ScriptDebuggerPrivate#setCurrentFrameIndex(d4f767463ce0a6b3).(int index); |
| 110 | int currentFrameIndexcxx . . $ ScriptDebuggerPrivate#currentFrameIndex(455f465bc33b4cdf).() const; |
| 111 | |
| 112 | QScriptContextcxx . . $ QScriptContext# *frameContextcxx . . $ ScriptDebuggerPrivate#frameContext(a9726aae27ee23bc).(int index) const; |
| 113 | QScriptContextcxx . . $ QScriptContext# *currentFrameContextcxx . . $ ScriptDebuggerPrivate#currentFrameContext(3b7b8e48bf7da82e).() const; |
| 114 | |
| 115 | ScriptInfocxx . . $ ScriptInfo# *scriptInfocxx . . $ ScriptDebuggerPrivate#scriptInfo(d4b44431ccbd3233).(QScriptContextcxx . . $ QScriptContext# *context) const; |
| 116 | |
| 117 | int listLineNumbercxx . . $ ScriptDebuggerPrivate#listLineNumber(455f465bc33b4cdf).() const; |
| 118 | void setListLineNumbercxx . . $ ScriptDebuggerPrivate#setListLineNumber(d4f767463ce0a6b3).(int lineNumber); |
| 119 | |
| 120 | QStringcxx . . $ QString# readLinecxx . . $ ScriptDebuggerPrivate#readLine(4365c3963150523e).(); |
| 121 | void outputcxx . . $ ScriptDebuggerPrivate#output(3520e46b33348bf6).(const QStringcxx . . $ QString# &text); |
| 122 | void messagecxx . . $ ScriptDebuggerPrivate#message(3520e46b33348bf6).(const QStringcxx . . $ QString# &text); |
| 123 | void errorMessagecxx . . $ ScriptDebuggerPrivate#errorMessage(3520e46b33348bf6).(const QStringcxx . . $ QString# &text); |
| 124 | |
| 125 | // attributes |
| 126 | QTextStreamcxx . . $ QTextStream# *m_defaultInputStreamcxx . . $ ScriptDebuggerPrivate#m_defaultInputStream.; |
| 127 | QTextStreamcxx . . $ QTextStream# *m_defaultOutputStreamcxx . . $ ScriptDebuggerPrivate#m_defaultOutputStream.; |
| 128 | QTextStreamcxx . . $ QTextStream# *m_defaultErrorStreamcxx . . $ ScriptDebuggerPrivate#m_defaultErrorStream.; |
| 129 | QTextStreamcxx . . $ QTextStream# *m_inputStreamcxx . . $ ScriptDebuggerPrivate#m_inputStream.; |
| 130 | QTextStreamcxx . . $ QTextStream# *m_outputStreamcxx . . $ ScriptDebuggerPrivate#m_outputStream.; |
| 131 | QTextStreamcxx . . $ QTextStream# *m_errorStreamcxx . . $ ScriptDebuggerPrivate#m_errorStream.; |
| 132 | |
| 133 | ScriptBreakpointManagercxx . . $ ScriptBreakpointManager# *m_bpManagercxx . . $ ScriptDebuggerPrivate#m_bpManager.; |
| 134 | Modecxx . . $ ScriptDebuggerPrivate#Mode# m_modecxx . . $ ScriptDebuggerPrivate#m_mode.; |
| 135 | QMapcxx . . $ QMap#<qint64cxx . . $ qint64#, ScriptInfocxx . . $ ScriptInfo#*> m_scriptscxx . . $ ScriptDebuggerPrivate#m_scripts.; |
| 136 | QMapcxx . . $ QMap#<QScriptContextcxx . . $ QScriptContext#*, QStackcxx . . $ QStack#<qint64cxx . . $ qint64#> > m_contextProgramIdscxx . . $ ScriptDebuggerPrivate#m_contextProgramIds.; |
| 137 | |
| 138 | QStringcxx . . $ QString# m_lastInteractiveCommandcxx . . $ ScriptDebuggerPrivate#m_lastInteractiveCommand.; |
| 139 | QStringcxx . . $ QString# m_commandPrefixcxx . . $ ScriptDebuggerPrivate#m_commandPrefix.; |
| 140 | int m_stepDepthcxx . . $ ScriptDebuggerPrivate#m_stepDepth.; |
| 141 | int m_currentFrameIndexcxx . . $ ScriptDebuggerPrivate#m_currentFrameIndex.; |
| 142 | int m_listLineNumbercxx . . $ ScriptDebuggerPrivate#m_listLineNumber.; |
| 143 | |
| 144 | ScriptDebuggercxx . . $ ScriptDebugger# *q_ptrcxx . . $ ScriptDebuggerPrivate#q_ptr.; |
| 145 | }; |
| 146 | |
| 147 | class ScriptInfocxx . . $ ScriptInfo# |
| 148 | { |
| 149 | public: |
| 150 | ScriptInfocxx . . $ ScriptInfo#ScriptInfo(f82ba06e06e49bd2).(const QStringcxx . . $ QString# &code, const QStringcxx . . $ QString# &fileName, int lineNumber) |
| 151 | : m_codecxx . . $ ScriptInfo#m_code.(code), m_fileNamecxx . . $ ScriptInfo#m_fileName.(fileName), m_lineNumbercxx . . $ ScriptInfo#m_lineNumber.(lineNumber) |
| 152 | { } |
| 153 | |
| 154 | inline QStringcxx . . $ QString# codecxx . . $ ScriptInfo#code(6ef7b6c27b00b43d).() const |
| 155 | { return m_codecxx . . $ QString#QString(132dd6869045752b).; } |
| 156 | inline QStringcxx . . $ QString# fileNamecxx . . $ ScriptInfo#fileName(6ef7b6c27b00b43d).() const |
| 157 | { return m_fileNamecxx . . $ QString#QString(132dd6869045752b).; } |
| 158 | inline int lineNumbercxx . . $ ScriptInfo#lineNumber(455f465bc33b4cdf).() const |
| 159 | { return m_lineNumbercxx . . $ ScriptInfo#m_lineNumber.; } |
| 160 | |
| 161 | QStringcxx . . $ QString# lineTextcxx . . $ ScriptInfo#lineText(ce915ed341d4a7f0).(int lineNumber); |
| 162 | QMapcxx . . $ QMap#<int, int> m_lineOffsetscxx . . $ ScriptInfo#m_lineOffsets.; |
| 163 | |
| 164 | private: |
| 165 | int lineOffsetcxx . . $ ScriptInfo#lineOffset(7864480464b09eea).(int lineNumber); |
| 166 | |
| 167 | QStringcxx . . $ QString# m_codecxx . . $ ScriptInfo#m_code.; |
| 168 | QStringcxx . . $ QString# m_fileNamecxx . . $ ScriptInfo#m_fileName.; |
| 169 | int m_lineNumbercxx . . $ ScriptInfo#m_lineNumber.; |
| 170 | }; |
| 171 | |
| 172 | int ScriptInfocxx . . $ ScriptInfo#::lineOffsetcxx . . $ ScriptInfo#lineOffset(7864480464b09eea).(int lineNumber) |
| 173 | { |
| 174 | QMapcxx . . $ QMap#<int, int>::const_iteratorcxx . . $ QMap#const_iterator# it = m_lineOffsetscxx . . $ ScriptInfo#m_lineOffsets..constFindcxx . . $ QMap#constFind(fcb93a6f9e7070f5).(lineNumber); |
| 175 | if (it !=cxx . . $ QMap#const_iterator#`operator!=`(afb29c289d8ce2db). m_lineOffsetscxx . . $ ScriptInfo#m_lineOffsets..constEndcxx . . $ QMap#constEnd(81a977e5fd18ea74).()) |
| 176 | return it.valuecxx . . $ QMap#const_iterator#value(bdbd05d619d62250).(); |
| 177 | |
| 178 | int offset; |
| 179 | it =cxx . . $ QMap#const_iterator#`operator=`(c6bac73748c2063f). m_lineOffsetscxx . . $ ScriptInfo#m_lineOffsets..constFindcxx . . $ QMap#constFind(fcb93a6f9e7070f5).(lineNumber - 1); |
| 180 | if (it !=cxx . . $ QMap#const_iterator#`operator!=`(afb29c289d8ce2db). m_lineOffsetscxx . . $ ScriptInfo#m_lineOffsets..constEndcxx . . $ QMap#constEnd(81a977e5fd18ea74).()) { |
| 181 | offset = it.valuecxx . . $ QMap#const_iterator#value(bdbd05d619d62250).(); |
| 182 | offset = m_codecxx . . $ ScriptInfo#m_code..indexOfcxx . . $ QString#indexOf(75b556ba78e4903c).(QLatin1Charcxx . . $ QChar#QChar(a50889c09eec06d9).('\n'), offset); |
| 183 | if (offset != -1) |
| 184 | ++offset; |
| 185 | m_lineOffsetscxx . . $ ScriptInfo#m_lineOffsets..insertcxx . . $ QMap#insert(929a1ed410fe8423).(lineNumber, offset); |
| 186 | } else { |
| 187 | int index; |
| 188 | it =cxx . . $ QMap#const_iterator#`operator=`(c6bac73748c2063f). m_lineOffsetscxx . . $ QMap#const_iterator#const_iterator(fad78f9efe814c03)..lowerBoundcxx . . $ QMap#lowerBound(9e2276816f28e801).(lineNumber); |
| 189 | if (it !=cxx . . $ QMap#const_iterator#`operator!=`(afb29c289d8ce2db). m_lineOffsetscxx . . $ ScriptInfo#m_lineOffsets..constBegincxx . . $ QMap#constBegin(81a977e5fd18ea74).()) |
| 190 | --cxx . . $ QMap#const_iterator#operator--(535153adf4c12c2).it; |
| 191 | if (it !=cxx . . $ QMap#const_iterator#`operator!=`(afb29c289d8ce2db). m_lineOffsetscxx . . $ ScriptInfo#m_lineOffsets..constBegincxx . . $ QMap#constBegin(81a977e5fd18ea74).()) { |
| 192 | index = it.keycxx . . $ QMap#const_iterator#key(ea465e50d690edfe).(); |
| 193 | offset = it.valuecxx . . $ QMap#const_iterator#value(bdbd05d619d62250).(); |
| 194 | } else { |
| 195 | index = m_lineNumbercxx . . $ ScriptInfo#m_lineNumber.; |
| 196 | offset = 0; |
| 197 | } |
| 198 | int j = index; |
| 199 | for ( ; j < lineNumber; ++j) { |
| 200 | m_lineOffsetscxx . . $ ScriptInfo#m_lineOffsets..insertcxx . . $ QMap#insert(929a1ed410fe8423).(j, offset); |
| 201 | offset = m_codecxx . . $ ScriptInfo#m_code..indexOfcxx . . $ QString#indexOf(75b556ba78e4903c).(QLatin1Charcxx . . $ QChar#QChar(a50889c09eec06d9).('\n'), offset); |
| 202 | if (offset == -1) |
| 203 | break; |
| 204 | ++offset; |
| 205 | } |
| 206 | m_lineOffsetscxx . . $ ScriptInfo#m_lineOffsets..insertcxx . . $ QMap#insert(929a1ed410fe8423).(j, offset); |
| 207 | } |
| 208 | return offset; |
| 209 | } |
| 210 | |
| 211 | QStringcxx . . $ QString# ScriptInfocxx . . $ ScriptInfo#::lineTextcxx . . $ ScriptInfo#lineText(ce915ed341d4a7f0).(int lineNumber) |
| 212 | { |
| 213 | int startOffset = lineOffsetcxx . . $ ScriptInfo#lineOffset(7864480464b09eea).(lineNumber); |
| 214 | if (startOffset == -1) |
| 215 | return QStringcxx . . $ QString#QString(ced63f7c635d850d).(); |
| 216 | int endOffset = lineOffsetcxx . . $ ScriptInfo#lineOffset(7864480464b09eea).(lineNumber + 1); |
| 217 | if (endOffset == -1) |
| 218 | return m_codecxx . . $ ScriptInfo#m_code..midcxx . . $ QString#mid(44b7563da18aea72).(startOffset); |
| 219 | else |
| 220 | return m_codecxx . . $ ScriptInfo#m_code..midcxx . . $ QString#mid(44b7563da18aea72).(startOffset, endOffset - startOffset - 1); |
| 221 | } |
| 222 | |
| 223 | |
| 224 | |
| 225 | ScriptDebuggerPrivatecxx . . $ ScriptDebuggerPrivate#::ScriptDebuggerPrivatecxx . . $ ScriptDebuggerPrivate#ScriptDebuggerPrivate(d3e0164fcca5dac6).(QScriptEnginecxx . . $ QScriptEngine# *engine) |
| 226 | : QScriptEngineAgentcxx . . $ QScriptEngineAgent#QScriptEngineAgent(d3e0164fcca5dac6).(engine), m_modecxx . . $ ScriptDebuggerPrivate#m_mode.(Runcxx . . $ ScriptDebuggerPrivate#Run.) |
| 227 | { |
| 228 | m_commandPrefixcxx . . $ ScriptDebuggerPrivate#m_commandPrefix. =cxx . . $ QString#`operator=`(10913c921d46e09a). QLatin1Stringcxx . . $ QLatin1String#QLatin1String(aac1607cfe1c1740).("."); |
| 229 | m_bpManagercxx . . $ ScriptDebuggerPrivate#m_bpManager. = new ScriptBreakpointManagercxx . . $ ScriptBreakpointManager#; |
| 230 | m_defaultInputStreamcxx . . $ ScriptDebuggerPrivate#m_defaultInputStream. = new QTextStreamcxx . . $ QTextStream#QTextStream(65339a794c789c54).(stdincxx . . $ `<external>/232824719582829767/stdio.h:153:9`!); |
| 231 | m_defaultOutputStreamcxx . . $ ScriptDebuggerPrivate#m_defaultOutputStream. = new QTextStreamcxx . . $ QTextStream#QTextStream(65339a794c789c54).(stdoutcxx . . $ `<external>/232824719582829767/stdio.h:154:9`!); |
| 232 | m_defaultErrorStreamcxx . . $ ScriptDebuggerPrivate#m_defaultErrorStream. = new QTextStreamcxx . . $ QTextStream#QTextStream(65339a794c789c54).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!); |
| 233 | m_inputStreamcxx . . $ ScriptDebuggerPrivate#m_inputStream. = m_defaultInputStreamcxx . . $ ScriptDebuggerPrivate#m_defaultInputStream.; |
| 234 | m_outputStreamcxx . . $ ScriptDebuggerPrivate#m_outputStream. = m_defaultOutputStreamcxx . . $ ScriptDebuggerPrivate#m_defaultOutputStream.; |
| 235 | m_errorStreamcxx . . $ ScriptDebuggerPrivate#m_errorStream. = m_defaultErrorStreamcxx . . $ ScriptDebuggerPrivate#m_defaultErrorStream.; |
| 236 | } |
| 237 | |
| 238 | ScriptDebuggerPrivatecxx . . $ ScriptDebuggerPrivate#::~cxx . . $ ScriptDebuggerPrivate#`~ScriptDebuggerPrivate`(ced63f7c635d850d).ScriptDebuggerPrivatecxx . . $ ScriptDebuggerPrivate#() |
| 239 | { |
| 240 | delete m_defaultInputStreamcxx . . $ ScriptDebuggerPrivate#m_defaultInputStream.; |
| 241 | delete m_defaultOutputStreamcxx . . $ ScriptDebuggerPrivate#m_defaultOutputStream.; |
| 242 | delete m_defaultErrorStreamcxx . . $ ScriptDebuggerPrivate#m_defaultErrorStream.; |
| 243 | delete m_bpManagercxx . . $ ScriptDebuggerPrivate#m_bpManager.; |
| 244 | qDeleteAllcxx . . $ qDeleteAll(77d9f17553126ecb).(m_scriptscxx . . $ ScriptDebuggerPrivate#m_scripts.); |
| 245 | } |
| 246 | |
| 247 | QStringcxx . . $ QString# ScriptDebuggerPrivatecxx . . $ ScriptDebuggerPrivate#::readLinecxx . . $ ScriptDebuggerPrivate#readLine(4365c3963150523e).() |
| 248 | { |
| 249 | return m_inputStreamcxx . . $ ScriptDebuggerPrivate#m_inputStream.->readLinecxx . . $ QTextStream#readLine(20e0a2766677f583).(); |
| 250 | } |
| 251 | |
| 252 | void ScriptDebuggerPrivatecxx . . $ ScriptDebuggerPrivate#::outputcxx . . $ ScriptDebuggerPrivate#output(3520e46b33348bf6).(const QStringcxx . . $ QString# &text) |
| 253 | { |
| 254 | *m_outputStreamcxx . . $ ScriptDebuggerPrivate#m_outputStream. <<cxx . . $ QTextStream#`operator<<`(f61e69e0d177108f). text; |
| 255 | } |
| 256 | |
| 257 | void ScriptDebuggerPrivatecxx . . $ ScriptDebuggerPrivate#::messagecxx . . $ ScriptDebuggerPrivate#message(3520e46b33348bf6).(const QStringcxx . . $ QString# &text) |
| 258 | { |
| 259 | *m_outputStreamcxx . . $ ScriptDebuggerPrivate#m_outputStream. <<cxx . . $ QTextStream#`operator<<`(f61e69e0d177108f). text <<cxx . . $ `operator<<`(f27eeb5c966d2dd0). endlcxx . . $ QTextStreamFunctions/endl(e06208c9acdf85a).; |
| 260 | m_outputStreamcxx . . $ ScriptDebuggerPrivate#m_outputStream.->flushcxx . . $ QTextStream#flush(49f6e7a06ebc5aa8).(); |
| 261 | } |
| 262 | |
| 263 | void ScriptDebuggerPrivatecxx . . $ ScriptDebuggerPrivate#::errorMessagecxx . . $ ScriptDebuggerPrivate#errorMessage(3520e46b33348bf6).(const QStringcxx . . $ QString# &text) |
| 264 | { |
| 265 | *m_errorStreamcxx . . $ ScriptDebuggerPrivate#m_errorStream. <<cxx . . $ QTextStream#`operator<<`(f61e69e0d177108f). text <<cxx . . $ `operator<<`(f27eeb5c966d2dd0). endlcxx . . $ QTextStreamFunctions/endl(e06208c9acdf85a).; |
| 266 | m_errorStreamcxx . . $ ScriptDebuggerPrivate#m_errorStream.->flushcxx . . $ QTextStream#flush(49f6e7a06ebc5aa8).(); |
| 267 | } |
| 268 | |
| 269 | void ScriptDebuggerPrivatecxx . . $ ScriptDebuggerPrivate#::setModecxx . . $ ScriptDebuggerPrivate#setMode(475977749f749da4).(Modecxx . . $ ScriptDebuggerPrivate#Mode# mode) |
| 270 | { |
| 271 | m_modecxx . . $ ScriptDebuggerPrivate#m_mode. = mode; |
| 272 | } |
| 273 | |
| 274 | ScriptDebuggerPrivatecxx . . $ ScriptDebuggerPrivate#::Modecxx . . $ ScriptDebuggerPrivate#Mode# ScriptDebuggerPrivatecxx . . $ ScriptDebuggerPrivate#::modecxx . . $ ScriptDebuggerPrivate#mode(16363bca95283531).() const |
| 275 | { |
| 276 | return m_modecxx . . $ ScriptDebuggerPrivate#m_mode.; |
| 277 | } |
| 278 | |
| 279 | QScriptContextcxx . . $ QScriptContext# *ScriptDebuggerPrivatecxx . . $ ScriptDebuggerPrivate#::frameContextcxx . . $ ScriptDebuggerPrivate#frameContext(a9726aae27ee23bc).(int index) const |
| 280 | { |
| 281 | QScriptContextcxx . . $ QScriptContext# *ctx = enginecxx . . $ QScriptEngineAgent#engine(18bf45d2c163ce9b).()->currentContextcxx . . $ QScriptEngine#currentContext(3b7b8e48bf7da82e).(); |
| 282 | for (int i = 0; i < index; ++i) { |
| 283 | ctx = ctx->parentContextcxx . . $ QScriptContext#parentContext(3b7b8e48bf7da82e).(); |
| 284 | if (!ctx) |
| 285 | break; |
| 286 | } |
| 287 | return ctx; |
| 288 | } |
| 289 | |
| 290 | int ScriptDebuggerPrivatecxx . . $ ScriptDebuggerPrivate#::currentFrameIndexcxx . . $ ScriptDebuggerPrivate#currentFrameIndex(455f465bc33b4cdf).() const |
| 291 | { |
| 292 | return m_currentFrameIndexcxx . . $ ScriptDebuggerPrivate#m_currentFrameIndex.; |
| 293 | } |
| 294 | |
| 295 | void ScriptDebuggerPrivatecxx . . $ ScriptDebuggerPrivate#::setCurrentFrameIndexcxx . . $ ScriptDebuggerPrivate#setCurrentFrameIndex(d4f767463ce0a6b3).(int index) |
| 296 | { |
| 297 | m_currentFrameIndexcxx . . $ ScriptDebuggerPrivate#m_currentFrameIndex. = index; |
| 298 | m_listLineNumbercxx . . $ ScriptDebuggerPrivate#m_listLineNumber. = -1; |
| 299 | } |
| 300 | |
| 301 | int ScriptDebuggerPrivatecxx . . $ ScriptDebuggerPrivate#::listLineNumbercxx . . $ ScriptDebuggerPrivate#listLineNumber(455f465bc33b4cdf).() const |
| 302 | { |
| 303 | return m_listLineNumbercxx . . $ ScriptDebuggerPrivate#m_listLineNumber.; |
| 304 | } |
| 305 | |
| 306 | void ScriptDebuggerPrivatecxx . . $ ScriptDebuggerPrivate#::setListLineNumbercxx . . $ ScriptDebuggerPrivate#setListLineNumber(d4f767463ce0a6b3).(int lineNumber) |
| 307 | { |
| 308 | m_listLineNumbercxx . . $ ScriptDebuggerPrivate#m_listLineNumber. = lineNumber; |
| 309 | } |
| 310 | |
| 311 | QScriptContextcxx . . $ QScriptContext# *ScriptDebuggerPrivatecxx . . $ ScriptDebuggerPrivate#::currentFrameContextcxx . . $ ScriptDebuggerPrivate#currentFrameContext(3b7b8e48bf7da82e).() const |
| 312 | { |
| 313 | return frameContextcxx . . $ ScriptDebuggerPrivate#frameContext(a9726aae27ee23bc).(currentFrameIndexcxx . . $ ScriptDebuggerPrivate#currentFrameIndex(455f465bc33b4cdf).()); |
| 314 | } |
| 315 | |
| 316 | int ScriptDebuggerPrivatecxx . . $ ScriptDebuggerPrivate#::frameCountcxx . . $ ScriptDebuggerPrivate#frameCount(455f465bc33b4cdf).() const |
| 317 | { |
| 318 | int count = 0; |
| 319 | QScriptContextcxx . . $ QScriptContext# *ctx = enginecxx . . $ QScriptEngineAgent#engine(18bf45d2c163ce9b).()->currentContextcxx . . $ QScriptEngine#currentContext(3b7b8e48bf7da82e).(); |
| 320 | while (ctx) { |
| 321 | ++count; |
| 322 | ctx = ctx->parentContextcxx . . $ QScriptContext#parentContext(3b7b8e48bf7da82e).(); |
| 323 | } |
| 324 | return count; |
| 325 | } |
| 326 | |
| 327 | ScriptInfocxx . . $ ScriptInfo# *ScriptDebuggerPrivatecxx . . $ ScriptDebuggerPrivate#::scriptInfocxx . . $ ScriptDebuggerPrivate#scriptInfo(d4b44431ccbd3233).(QScriptContextcxx . . $ QScriptContext# *context) const |
| 328 | { |
| 329 | QStackcxx . . $ QStack#<qint64cxx . . $ qint64#> pids = m_contextProgramIdscxx . . $ ScriptDebuggerPrivate#m_contextProgramIds..valuecxx . . $ QMap#value(866b0a4e5fb46e14).(context); |
| 330 | if (pids.isEmptycxx . . $ QVector#isEmpty(50ce9a9e25b4a850).()) |
| 331 | return 0; |
| 332 | return m_scriptscxx . . $ ScriptDebuggerPrivate#m_scripts..valuecxx . . $ QMap#value(866b0a4e5fb46e14).(pids.topcxx . . $ QStack#top(19b2b6f17af048b).()); |
| 333 | } |
| 334 | |
| 335 | void ScriptDebuggerPrivatecxx . . $ ScriptDebuggerPrivate#::interactivecxx . . $ ScriptDebuggerPrivate#interactive(49f6e7a06ebc5aa8).() |
| 336 | { |
| 337 | setCurrentFrameIndexcxx . . $ ScriptDebuggerPrivate#setCurrentFrameIndex(d4f767463ce0a6b3).(0); |
| 338 | |
| 339 | QStringcxx . . $ QString# qsdbgPrompt = QStringcxx . . $ QString#::fromLatin1cxx . . $ QString#fromLatin1(5ac70cc0fa2a874e).("(qsdbg) "); |
| 340 | QStringcxx . . $ QString# dotPrompt = QStringcxx . . $ QString#::fromLatin1cxx . . $ QString#fromLatin1(5ac70cc0fa2a874e).(".... "); |
| 341 | QStringcxx . . $ QString# prompt = qsdbgPromptcxx . . $ QString#QString(132dd6869045752b).; |
| 342 | |
| 343 | QStringcxx . . $ QString# codecxx . . $ QString#QString(ced63f7c635d850d).; |
| 344 | |
| 345 | forevercxx . . $ `<external>/15045578679651060896/qglobal.h:1149:13`! { |
| 346 | |
| 347 | *m_outputStreamcxx . . $ ScriptDebuggerPrivate#m_outputStream. <<cxx . . $ QTextStream#`operator<<`(f61e69e0d177108f). prompt; |
| 348 | m_outputStreamcxx . . $ ScriptDebuggerPrivate#m_outputStream.->flushcxx . . $ QTextStream#flush(49f6e7a06ebc5aa8).(); |
| 349 | |
| 350 | QStringcxx . . $ QString# line = readLinecxx . . $ ScriptDebuggerPrivate#readLine(4365c3963150523e).(); |
| 351 | |
| 352 | if (code.isEmptycxx . . $ QString#isEmpty(50ce9a9e25b4a850).() && (line.isEmptycxx . . $ QString#isEmpty(50ce9a9e25b4a850).() || line.startsWithcxx . . $ QString#startsWith(8cce4688c16f48f3).(m_commandPrefixcxx . . $ ScriptDebuggerPrivate#m_commandPrefix.))) { |
| 353 | if (line.isEmptycxx . . $ QString#isEmpty(50ce9a9e25b4a850).()) |
| 354 | line =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). m_lastInteractiveCommandcxx . . $ ScriptDebuggerPrivate#m_lastInteractiveCommand.; |
| 355 | else |
| 356 | m_lastInteractiveCommandcxx . . $ ScriptDebuggerPrivate#m_lastInteractiveCommand. =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). line; |
| 357 | |
| 358 | QStringListcxx . . $ QStringList# parts = line.splitcxx . . $ QString#split(92030b8bf74e4227).(QLatin1Charcxx . . $ QChar#QChar(a50889c09eec06d9).(' '), Qtcxx . . $ QFlags#QFlags(93d577a3e9528307).::SkipEmptyPartscxx . . $ Qt/SkipEmptyParts.); |
| 359 | if (!parts.isEmptycxx . . $ QList#isEmpty(3482b152b9333168).()) { |
| 360 | QStringcxx . . $ QString# command = parts.takeFirstcxx . . $ QList#takeFirst(5f357b03ed472e5e).().midcxx . . $ QString#mid(44b7563da18aea72).(1); |
| 361 | if (executeCommandcxx . . $ ScriptDebuggerPrivate#executeCommand(8f660b66a5b7e95a).(command, parts)) |
| 362 | break; |
| 363 | } |
| 364 | |
| 365 | } else { |
| 366 | if (line.isEmptycxx . . $ QString#isEmpty(50ce9a9e25b4a850).()) |
| 367 | continue; |
| 368 | |
| 369 | code +=cxx . . $ QString#`operator+=`(6a89d0b7f4d2681c). line; |
| 370 | code +=cxx . . $ QString#`operator+=`(3a2ffbdf8ecc25e2). QLatin1Charcxx . . $ QChar#QChar(a50889c09eec06d9).('\n'); |
| 371 | |
| 372 | if (line.trimmedcxx . . $ QString#trimmed(dca2c5857e9adf82).().isEmptycxx . . $ QString#isEmpty(50ce9a9e25b4a850).()) { |
| 373 | continue; |
| 374 | |
| 375 | } else if (! enginecxx . . $ QScriptEngineAgent#engine(18bf45d2c163ce9b).()->canEvaluatecxx . . $ QScriptEngine#canEvaluate(f3b39adf77d9c36c).(code)) { |
| 376 | prompt =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). dotPrompt; |
| 377 | |
| 378 | } else { |
| 379 | setModecxx . . $ ScriptDebuggerPrivate#setMode(475977749f749da4).(Runcxx . . $ ScriptDebuggerPrivate#Run.); |
| 380 | QScriptValuecxx . . $ QScriptValue# result = enginecxx . . $ QScriptEngineAgent#engine(18bf45d2c163ce9b).()->evaluatecxx . . $ QScriptEngine#evaluate(bbfdac3a7d53e517).(code, QLatin1Stringcxx . . $ QString#QString(4641beeb24e75d60).("typein")); |
| 381 | |
| 382 | code.clearcxx . . $ QString#clear(49f6e7a06ebc5aa8).(); |
| 383 | prompt =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). qsdbgPrompt; |
| 384 | |
| 385 | if (! result.isUndefinedcxx . . $ QScriptValue#isUndefined(50ce9a9e25b4a850).()) { |
| 386 | errorMessagecxx . . $ ScriptDebuggerPrivate#errorMessage(3520e46b33348bf6).(result.toStringcxx . . $ QScriptValue#toString(6ef7b6c27b00b43d).()); |
| 387 | enginecxx . . $ QScriptEngineAgent#engine(18bf45d2c163ce9b).()->clearExceptionscxx . . $ QScriptEngine#clearExceptions(49f6e7a06ebc5aa8).(); |
| 388 | } |
| 389 | } |
| 390 | } |
| 391 | } |
| 392 | } |
| 393 | |
| 394 | bool ScriptDebuggerPrivatecxx . . $ ScriptDebuggerPrivate#::executeCommandcxx . . $ ScriptDebuggerPrivate#executeCommand(8f660b66a5b7e95a).(const QStringcxx . . $ QString# &command, const QStringListcxx . . $ QStringList# &args) |
| 395 | { |
| 396 | if (command ==cxx . . $ QString#`operator==`(b3b98e09a392cdf9). QLatin1Stringcxx . . $ QLatin1String#QLatin1String(aac1607cfe1c1740).("c") |
| 397 | || command ==cxx . . $ QString#`operator==`(b3b98e09a392cdf9). QLatin1Stringcxx . . $ QLatin1String#QLatin1String(aac1607cfe1c1740).("continue")) { |
| 398 | setModecxx . . $ ScriptDebuggerPrivate#setMode(475977749f749da4).(Runcxx . . $ ScriptDebuggerPrivate#Run.); |
| 399 | return true; |
| 400 | } else if (command ==cxx . . $ QString#`operator==`(b3b98e09a392cdf9). QLatin1Stringcxx . . $ QLatin1String#QLatin1String(aac1607cfe1c1740).("s") |
| 401 | || command ==cxx . . $ QString#`operator==`(b3b98e09a392cdf9). QLatin1Stringcxx . . $ QLatin1String#QLatin1String(aac1607cfe1c1740).("step")) { |
| 402 | setModecxx . . $ ScriptDebuggerPrivate#setMode(475977749f749da4).(StepIntocxx . . $ ScriptDebuggerPrivate#StepInto.); |
| 403 | return true; |
| 404 | } else if (command ==cxx . . $ QString#`operator==`(b3b98e09a392cdf9). QLatin1Stringcxx . . $ QLatin1String#QLatin1String(aac1607cfe1c1740).("n") |
| 405 | || command ==cxx . . $ QString#`operator==`(b3b98e09a392cdf9). QLatin1Stringcxx . . $ QLatin1String#QLatin1String(aac1607cfe1c1740).("next")) { |
| 406 | setModecxx . . $ ScriptDebuggerPrivate#setMode(475977749f749da4).(StepOvercxx . . $ ScriptDebuggerPrivate#StepOver.); |
| 407 | m_stepDepthcxx . . $ ScriptDebuggerPrivate#m_stepDepth. = 0; |
| 408 | return true; |
| 409 | } else if (command ==cxx . . $ QString#`operator==`(b3b98e09a392cdf9). QLatin1Stringcxx . . $ QLatin1String#QLatin1String(aac1607cfe1c1740).("f") |
| 410 | || command ==cxx . . $ QString#`operator==`(b3b98e09a392cdf9). QLatin1Stringcxx . . $ QLatin1String#QLatin1String(aac1607cfe1c1740).("frame")) { |
| 411 | bool ok = false; |
| 412 | int index = args.valuecxx . . $ QList#value(b4be2ec6940d8d62).(0).toIntcxx . . $ QString#toInt(d7972accae11ee1f).(&ok); |
| 413 | if (ok) { |
| 414 | if (index < 0 || index >= frameCountcxx . . $ ScriptDebuggerPrivate#frameCount(455f465bc33b4cdf).()) { |
| 415 | errorMessagecxx . . $ ScriptDebuggerPrivate#errorMessage(3520e46b33348bf6).("No such frame."cxx . . $ QString#QString(85c52e162fed56f9).); |
| 416 | } else { |
| 417 | setCurrentFrameIndexcxx . . $ ScriptDebuggerPrivate#setCurrentFrameIndex(d4f767463ce0a6b3).(index); |
| 418 | QScriptContextcxx . . $ QScriptContext# *ctx = currentFrameContextcxx . . $ ScriptDebuggerPrivate#currentFrameContext(3b7b8e48bf7da82e).(); |
| 419 | messagecxx . . $ ScriptDebuggerPrivate#message(3520e46b33348bf6).(QStringcxx . . $ QString#::fromLatin1cxx . . $ QString#fromLatin1(5ac70cc0fa2a874e).("#%0 %1").argcxx . . $ QString#arg(64ab2ed17cc11715).(index).argcxx . . $ QString#arg(bc823072288cbbb5).(ctx->toStringcxx . . $ QScriptContext#toString(6ef7b6c27b00b43d).())); |
| 420 | } |
| 421 | } |
| 422 | } else if (command ==cxx . . $ QString#`operator==`(b3b98e09a392cdf9). QLatin1Stringcxx . . $ QLatin1String#QLatin1String(aac1607cfe1c1740).("bt") |
| 423 | || command ==cxx . . $ QString#`operator==`(b3b98e09a392cdf9). QLatin1Stringcxx . . $ QLatin1String#QLatin1String(aac1607cfe1c1740).("backtrace")) { |
| 424 | QScriptContextcxx . . $ QScriptContext# *ctx = enginecxx . . $ QScriptEngineAgent#engine(18bf45d2c163ce9b).()->currentContextcxx . . $ QScriptEngine#currentContext(3b7b8e48bf7da82e).(); |
| 425 | int index = -1; |
| 426 | while (ctx) { |
| 427 | ++index; |
| 428 | QStringcxx . . $ QString# line = ctx->toStringcxx . . $ QScriptContext#toString(6ef7b6c27b00b43d).(); |
| 429 | messagecxx . . $ ScriptDebuggerPrivate#message(3520e46b33348bf6).(QStringcxx . . $ QString#::fromLatin1cxx . . $ QString#fromLatin1(5ac70cc0fa2a874e).("#%0 %1").argcxx . . $ QString#arg(64ab2ed17cc11715).(index).argcxx . . $ QString#arg(bc823072288cbbb5).(line)); |
| 430 | ctx = ctx->parentContextcxx . . $ QScriptContext#parentContext(3b7b8e48bf7da82e).(); |
| 431 | } |
| 432 | } else if (command ==cxx . . $ QString#`operator==`(b3b98e09a392cdf9). QLatin1Stringcxx . . $ QLatin1String#QLatin1String(aac1607cfe1c1740).("up")) { |
| 433 | int index = currentFrameIndexcxx . . $ ScriptDebuggerPrivate#currentFrameIndex(455f465bc33b4cdf).() + 1; |
| 434 | if (index == frameCountcxx . . $ ScriptDebuggerPrivate#frameCount(455f465bc33b4cdf).()) { |
| 435 | errorMessagecxx . . $ ScriptDebuggerPrivate#errorMessage(3520e46b33348bf6).(QStringcxx . . $ QString#::fromLatin1cxx . . $ QString#fromLatin1(5ac70cc0fa2a874e).("Initial frame selected; you cannot go up.")); |
| 436 | } else { |
| 437 | setCurrentFrameIndexcxx . . $ ScriptDebuggerPrivate#setCurrentFrameIndex(d4f767463ce0a6b3).(index); |
| 438 | QScriptContextcxx . . $ QScriptContext# *ctx = currentFrameContextcxx . . $ ScriptDebuggerPrivate#currentFrameContext(3b7b8e48bf7da82e).(); |
| 439 | messagecxx . . $ ScriptDebuggerPrivate#message(3520e46b33348bf6).(QStringcxx . . $ QString#::fromLatin1cxx . . $ QString#fromLatin1(5ac70cc0fa2a874e).("#%0 %1").argcxx . . $ QString#arg(64ab2ed17cc11715).(index).argcxx . . $ QString#arg(bc823072288cbbb5).(ctx->toStringcxx . . $ QScriptContext#toString(6ef7b6c27b00b43d).())); |
| 440 | } |
| 441 | } else if (command ==cxx . . $ QString#`operator==`(b3b98e09a392cdf9). QLatin1Stringcxx . . $ QLatin1String#QLatin1String(aac1607cfe1c1740).("down")) { |
| 442 | int index = currentFrameIndexcxx . . $ ScriptDebuggerPrivate#currentFrameIndex(455f465bc33b4cdf).() - 1; |
| 443 | if (index < 0) { |
| 444 | errorMessagecxx . . $ ScriptDebuggerPrivate#errorMessage(3520e46b33348bf6).(QStringcxx . . $ QString#::fromLatin1cxx . . $ QString#fromLatin1(5ac70cc0fa2a874e).("Bottom (innermost) frame selected; you cannot go down.")); |
| 445 | } else { |
| 446 | setCurrentFrameIndexcxx . . $ ScriptDebuggerPrivate#setCurrentFrameIndex(d4f767463ce0a6b3).(index); |
| 447 | QScriptContextcxx . . $ QScriptContext# *ctx = currentFrameContextcxx . . $ ScriptDebuggerPrivate#currentFrameContext(3b7b8e48bf7da82e).(); |
| 448 | messagecxx . . $ ScriptDebuggerPrivate#message(3520e46b33348bf6).(QStringcxx . . $ QString#::fromLatin1cxx . . $ QString#fromLatin1(5ac70cc0fa2a874e).("#%0 %1").argcxx . . $ QString#arg(64ab2ed17cc11715).(index).argcxx . . $ QString#arg(bc823072288cbbb5).(ctx->toStringcxx . . $ QScriptContext#toString(6ef7b6c27b00b43d).())); |
| 449 | } |
| 450 | } else if (command ==cxx . . $ QString#`operator==`(b3b98e09a392cdf9). QLatin1Stringcxx . . $ QLatin1String#QLatin1String(aac1607cfe1c1740).("b") |
| 451 | || command ==cxx . . $ QString#`operator==`(b3b98e09a392cdf9). QLatin1Stringcxx . . $ QLatin1String#QLatin1String(aac1607cfe1c1740).("break")) { |
| 452 | QStringcxx . . $ QString# str = args.valuecxx . . $ QList#value(b4be2ec6940d8d62).(0); |
| 453 | int colonIndex = str.indexOfcxx . . $ QString#indexOf(75b556ba78e4903c).(QLatin1Charcxx . . $ QChar#QChar(a50889c09eec06d9).(':')); |
| 454 | if (colonIndex != -1) { |
| 455 | // filename:line form |
| 456 | QStringcxx . . $ QString# fileName = str.leftcxx . . $ QString#left(3f3c3d0e9c0eb37f).(colonIndex); |
| 457 | int lineNumber = str.midcxx . . $ QString#mid(44b7563da18aea72).(colonIndex+1).toIntcxx . . $ QString#toInt(d7972accae11ee1f).(); |
| 458 | int id = m_bpManagercxx . . $ ScriptDebuggerPrivate#m_bpManager.->setBreakpointcxx . . $ ScriptBreakpointManager#setBreakpoint(a664fe1f05d5cb93).(fileName, lineNumber); |
| 459 | messagecxx . . $ ScriptDebuggerPrivate#message(3520e46b33348bf6).(QStringcxx . . $ QString#::fromLatin1cxx . . $ QString#fromLatin1(5ac70cc0fa2a874e).("Breakpoint %0 at %1, line %2.").argcxx . . $ QString#arg(64ab2ed17cc11715).(id+1).argcxx . . $ QString#arg(bc823072288cbbb5).(fileName).argcxx . . $ QString#arg(64ab2ed17cc11715).(lineNumber)); |
| 460 | } else { |
| 461 | // function |
| 462 | QScriptValuecxx . . $ QScriptValue# fun = enginecxx . . $ QScriptEngineAgent#engine(18bf45d2c163ce9b).()->globalObjectcxx . . $ QScriptEngine#globalObject(73013aefd0020d47).().propertycxx . . $ QScriptValue#property(cc0ed881c2909ea3).(str); |
| 463 | if (fun.isFunctioncxx . . $ QScriptValue#isFunction(50ce9a9e25b4a850).()) { |
| 464 | int id = m_bpManagercxx . . $ ScriptDebuggerPrivate#m_bpManager.->setBreakpointcxx . . $ ScriptBreakpointManager#setBreakpoint(1ba93f8a114f47f4).(fun); |
| 465 | messagecxx . . $ ScriptDebuggerPrivate#message(3520e46b33348bf6).(QStringcxx . . $ QString#::fromLatin1cxx . . $ QString#fromLatin1(5ac70cc0fa2a874e).("Breakpoint %0 at %1().").argcxx . . $ QString#arg(64ab2ed17cc11715).(id+1).argcxx . . $ QString#arg(bc823072288cbbb5).(str)); |
| 466 | } |
| 467 | } |
| 468 | } else if (command ==cxx . . $ QString#`operator==`(b3b98e09a392cdf9). QLatin1Stringcxx . . $ QLatin1String#QLatin1String(aac1607cfe1c1740).("d") |
| 469 | || command ==cxx . . $ QString#`operator==`(b3b98e09a392cdf9). QLatin1Stringcxx . . $ QLatin1String#QLatin1String(aac1607cfe1c1740).("delete")) { |
| 470 | int id = args.valuecxx . . $ QList#value(b4be2ec6940d8d62).(0).toIntcxx . . $ QString#toInt(d7972accae11ee1f).() - 1; |
| 471 | m_bpManagercxx . . $ ScriptDebuggerPrivate#m_bpManager.->removeBreakpointcxx . . $ ScriptBreakpointManager#removeBreakpoint(d4f767463ce0a6b3).(id); |
| 472 | } else if (command ==cxx . . $ QString#`operator==`(b3b98e09a392cdf9). QLatin1Stringcxx . . $ QLatin1String#QLatin1String(aac1607cfe1c1740).("disable")) { |
| 473 | int id = args.valuecxx . . $ QList#value(b4be2ec6940d8d62).(0).toIntcxx . . $ QString#toInt(d7972accae11ee1f).() - 1; |
| 474 | m_bpManagercxx . . $ ScriptDebuggerPrivate#m_bpManager.->setBreakpointEnabledcxx . . $ ScriptBreakpointManager#setBreakpointEnabled(918ebd27a9ddbad3).(id, false); |
| 475 | } else if (command ==cxx . . $ QString#`operator==`(b3b98e09a392cdf9). QLatin1Stringcxx . . $ QLatin1String#QLatin1String(aac1607cfe1c1740).("enable")) { |
| 476 | int id = args.valuecxx . . $ QList#value(b4be2ec6940d8d62).(0).toIntcxx . . $ QString#toInt(d7972accae11ee1f).() - 1; |
| 477 | m_bpManagercxx . . $ ScriptDebuggerPrivate#m_bpManager.->setBreakpointEnabledcxx . . $ ScriptBreakpointManager#setBreakpointEnabled(918ebd27a9ddbad3).(id, true); |
| 478 | } else if (command ==cxx . . $ QString#`operator==`(b3b98e09a392cdf9). QLatin1Stringcxx . . $ QLatin1String#QLatin1String(aac1607cfe1c1740).("list")) { |
| 479 | QScriptContextcxx . . $ QScriptContext# *ctx = currentFrameContextcxx . . $ ScriptDebuggerPrivate#currentFrameContext(3b7b8e48bf7da82e).(); |
| 480 | ScriptInfocxx . . $ ScriptInfo# *progInfo = scriptInfocxx . . $ ScriptDebuggerPrivate#scriptInfo(d4b44431ccbd3233).(ctx); |
| 481 | if (!progInfo) { |
| 482 | errorMessagecxx . . $ ScriptDebuggerPrivate#errorMessage(3520e46b33348bf6).("No source text available for this frame."cxx . . $ QString#QString(85c52e162fed56f9).); |
| 483 | } else { |
| 484 | QScriptContextInfocxx . . $ QScriptContextInfo# ctxInfocxx . . $ QScriptContextInfo#QScriptContextInfo(2a79a5bde8f9d42e).(ctx); |
| 485 | bool ok; |
| 486 | int line = args.valuecxx . . $ QList#value(b4be2ec6940d8d62).(0).toIntcxx . . $ QString#toInt(d7972accae11ee1f).(&ok); |
| 487 | if (ok) { |
| 488 | line = qMaxcxx . . $ qMax(2a338fce5842aa6a).(1, line - 5); |
| 489 | } else { |
| 490 | line = listLineNumbercxx . . $ ScriptDebuggerPrivate#listLineNumber(455f465bc33b4cdf).(); |
| 491 | if (line == -1) |
| 492 | line = qMaxcxx . . $ qMax(2a338fce5842aa6a).(progInfo->lineNumbercxx . . $ ScriptInfo#lineNumber(455f465bc33b4cdf).(), ctxInfo.lineNumbercxx . . $ QScriptContextInfo#lineNumber(455f465bc33b4cdf).() - 5); |
| 493 | } |
| 494 | for (int i = line; i < line + 10; ++i) { |
| 495 | messagecxx . . $ ScriptDebuggerPrivate#message(3520e46b33348bf6).(QStringcxx . . $ QString#::fromLatin1cxx . . $ QString#fromLatin1(5ac70cc0fa2a874e).("%0\t%1").argcxx . . $ QString#arg(64ab2ed17cc11715).(i).argcxx . . $ QString#arg(bc823072288cbbb5).(progInfo->lineTextcxx . . $ ScriptInfo#lineText(ce915ed341d4a7f0).(i))); |
| 496 | } |
| 497 | setListLineNumbercxx . . $ ScriptDebuggerPrivate#setListLineNumber(d4f767463ce0a6b3).(line + 10); |
| 498 | } |
| 499 | } else if (command ==cxx . . $ QString#`operator==`(b3b98e09a392cdf9). QLatin1Stringcxx . . $ QLatin1String#QLatin1String(aac1607cfe1c1740).("info")) { |
| 500 | if (args.sizecxx . . $ QList#size(ea6fe5115c70a13f).() < 1) { |
| 501 | } else { |
| 502 | QStringcxx . . $ QString# what = args.valuecxx . . $ QList#value(b4be2ec6940d8d62).(0); |
| 503 | if (what ==cxx . . $ QString#`operator==`(b3b98e09a392cdf9). QLatin1Stringcxx . . $ QLatin1String#QLatin1String(aac1607cfe1c1740).("locals")) { |
| 504 | QScriptValueIteratorcxx . . $ QScriptValueIterator# itcxx . . $ QScriptValueIterator#QScriptValueIterator(6b35c8bde2804237).(currentFrameContextcxx . . $ ScriptDebuggerPrivate#currentFrameContext(3b7b8e48bf7da82e).()->activationObjectcxx . . $ QScriptContext#activationObject(73013aefd0020d47).()); |
| 505 | while (it.hasNextcxx . . $ QScriptValueIterator#hasNext(50ce9a9e25b4a850).()) { |
| 506 | it.nextcxx . . $ QScriptValueIterator#next(49f6e7a06ebc5aa8).(); |
| 507 | QStringcxx . . $ QString# linecxx . . $ QString#QString(ced63f7c635d850d).; |
| 508 | line.appendcxx . . $ QString#append(6a89d0b7f4d2681c).(it.namecxx . . $ QScriptValueIterator#name(6ef7b6c27b00b43d).()); |
| 509 | line.appendcxx . . $ QString#append(10913c921d46e09a).(QLatin1Stringcxx . . $ QLatin1String#QLatin1String(aac1607cfe1c1740).(" = ")); |
| 510 | line.appendcxx . . $ QString#append(6a89d0b7f4d2681c).(safeValueToStringcxx . . $ safeValueToString(d5e99072243b3a5c).(it.valuecxx . . $ QScriptValueIterator#value(73013aefd0020d47).())); |
| 511 | messagecxx . . $ ScriptDebuggerPrivate#message(3520e46b33348bf6).(line); |
| 512 | } |
| 513 | } |
| 514 | } |
| 515 | } else if (command ==cxx . . $ QString#`operator==`(b3b98e09a392cdf9). QLatin1Stringcxx . . $ QLatin1String#QLatin1String(aac1607cfe1c1740).("help")) { |
| 516 | messagecxx . . $ ScriptDebuggerPrivate#message(3520e46b33348bf6).("continue - continue execution\n"cxx . . $ QString#QString(85c52e162fed56f9). |
| 517 | "step - step into statement\n" |
| 518 | "next - step over statement\n" |
| 519 | "list - show where you are\n" |
| 520 | "\n" |
| 521 | "break - set breakpoint\n" |
| 522 | "delete - remove breakpoint\n" |
| 523 | "disable - disable breakpoint\n" |
| 524 | "enable - enable breakpoint\n" |
| 525 | "\n" |
| 526 | "backtrace - show backtrace\n" |
| 527 | "up - one frame up\n" |
| 528 | "down - one frame down\n" |
| 529 | "frame - set frame\n" |
| 530 | "\n" |
| 531 | "info locals - show local variables"); |
| 532 | } else { |
| 533 | errorMessagecxx . . $ ScriptDebuggerPrivate#errorMessage(3520e46b33348bf6).(QStringcxx . . $ QString#::fromLatin1cxx . . $ QString#fromLatin1(5ac70cc0fa2a874e).("Undefined command \"%0\". Try \"help\".") |
| 534 | .argcxx . . $ QString#arg(bc823072288cbbb5).(command)); |
| 535 | } |
| 536 | |
| 537 | return false; |
| 538 | } |
| 539 | |
| 540 | |
| 541 | // QScriptEngineAgent interface |
| 542 | |
| 543 | void ScriptDebuggerPrivatecxx . . $ ScriptDebuggerPrivate#::scriptLoadcxx . . $ ScriptDebuggerPrivate#scriptLoad(a07cc45066a712e1).(qint64cxx . . $ qint64# id, const QStringcxx . . $ QString# &program, |
| 544 | const QStringcxx . . $ QString# &fileName, int lineNumber) |
| 545 | { |
| 546 | ScriptInfocxx . . $ ScriptInfo# *info = new ScriptInfocxx . . $ ScriptInfo#ScriptInfo(f82ba06e06e49bd2).(program, fileName, lineNumber); |
| 547 | m_scriptscxx . . $ ScriptDebuggerPrivate#m_scripts..insertcxx . . $ QMap#insert(929a1ed410fe8423).(id, info); |
| 548 | } |
| 549 | |
| 550 | void ScriptDebuggerPrivatecxx . . $ ScriptDebuggerPrivate#::scriptUnloadcxx . . $ ScriptDebuggerPrivate#scriptUnload(35cb52607f6af42f).(qint64cxx . . $ qint64# id) |
| 551 | { |
| 552 | ScriptInfocxx . . $ ScriptInfo# *info = m_scriptscxx . . $ ScriptDebuggerPrivate#m_scripts..takecxx . . $ QMap#take(2af7d483e934a1ad).(id); |
| 553 | delete info; |
| 554 | } |
| 555 | |
| 556 | void ScriptDebuggerPrivatecxx . . $ ScriptDebuggerPrivate#::functionEntrycxx . . $ ScriptDebuggerPrivate#functionEntry(35cb52607f6af42f).(qint64cxx . . $ qint64# scriptId) |
| 557 | { |
| 558 | if (scriptId != -1) { |
| 559 | QScriptContextcxx . . $ QScriptContext# *ctx = enginecxx . . $ QScriptEngineAgent#engine(18bf45d2c163ce9b).()->currentContextcxx . . $ QScriptEngine#currentContext(3b7b8e48bf7da82e).(); |
| 560 | QStackcxx . . $ QStack#<qint64cxx . . $ qint64#> ids = m_contextProgramIdscxx . . $ ScriptDebuggerPrivate#m_contextProgramIds..valuecxx . . $ QMap#value(866b0a4e5fb46e14).(ctx); |
| 561 | ids.pushcxx . . $ QStack#push(77d9f17553126ecb).(scriptId); |
| 562 | m_contextProgramIdscxx . . $ ScriptDebuggerPrivate#m_contextProgramIds..insertcxx . . $ QMap#insert(929a1ed410fe8423).(ctx, ids); |
| 563 | } |
| 564 | |
| 565 | if (modecxx . . $ ScriptDebuggerPrivate#mode(16363bca95283531).() == StepOvercxx . . $ ScriptDebuggerPrivate#StepOver.) |
| 566 | ++m_stepDepthcxx . . $ ScriptDebuggerPrivate#m_stepDepth.; |
| 567 | } |
| 568 | |
| 569 | void ScriptDebuggerPrivatecxx . . $ ScriptDebuggerPrivate#::functionExitcxx . . $ ScriptDebuggerPrivate#functionExit(ffe3d7c603bb85e5).(qint64cxx . . $ qint64# scriptId, |
| 570 | const QScriptValuecxx . . $ QScriptValue# &/*returnValue*/) |
| 571 | { |
| 572 | if (scriptId != -1) { |
| 573 | QScriptContextcxx . . $ QScriptContext# *ctx = enginecxx . . $ QScriptEngineAgent#engine(18bf45d2c163ce9b).()->currentContextcxx . . $ QScriptEngine#currentContext(3b7b8e48bf7da82e).(); |
| 574 | QStackcxx . . $ QStack#<qint64cxx . . $ qint64#> ids = m_contextProgramIdscxx . . $ ScriptDebuggerPrivate#m_contextProgramIds..valuecxx . . $ QMap#value(866b0a4e5fb46e14).(ctx); |
| 575 | Q_ASSERTcxx . . $ `<external>/15045578679651060896/qglobal.h:859:13`!(!ids.isEmpty()); |
| 576 | Q_ASSERTcxx . . $ `<external>/15045578679651060896/qglobal.h:859:13`!(ids.top() == scriptId); |
| 577 | ids.popcxx . . $ QStack#pop(5f357b03ed472e5e).(); |
| 578 | m_contextProgramIdscxx . . $ ScriptDebuggerPrivate#m_contextProgramIds..insertcxx . . $ QMap#insert(929a1ed410fe8423).(ctx, ids); |
| 579 | } |
| 580 | |
| 581 | if (modecxx . . $ ScriptDebuggerPrivate#mode(16363bca95283531).() == StepOvercxx . . $ ScriptDebuggerPrivate#StepOver.) |
| 582 | --m_stepDepthcxx . . $ ScriptDebuggerPrivate#m_stepDepth.; |
| 583 | } |
| 584 | |
| 585 | void ScriptDebuggerPrivatecxx . . $ ScriptDebuggerPrivate#::positionChangecxx . . $ ScriptDebuggerPrivate#positionChange(8340a051bd88fc1d).(qint64cxx . . $ qint64# scriptId, |
| 586 | int lineNumber, int /*columnNumber*/) |
| 587 | { |
| 588 | ScriptInfocxx . . $ ScriptInfo# *info = 0; |
| 589 | bool enterInteractiveMode = false; |
| 590 | |
| 591 | if (m_bpManagercxx . . $ ScriptDebuggerPrivate#m_bpManager.->hasBreakpointscxx . . $ ScriptBreakpointManager#hasBreakpoints(50ce9a9e25b4a850).()) { |
| 592 | // check if we hit a breakpoint |
| 593 | info = m_scriptscxx . . $ ScriptDebuggerPrivate#m_scripts..valuecxx . . $ QMap#value(866b0a4e5fb46e14).(scriptId); |
| 594 | QScriptContextcxx . . $ QScriptContext# *ctx = enginecxx . . $ QScriptEngineAgent#engine(18bf45d2c163ce9b).()->currentContextcxx . . $ QScriptEngine#currentContext(3b7b8e48bf7da82e).(); |
| 595 | QScriptContextInfocxx . . $ QScriptContextInfo# ctxInfocxx . . $ QScriptContextInfo#QScriptContextInfo(2a79a5bde8f9d42e).(ctx); |
| 596 | QScriptValuecxx . . $ QScriptValue# callee = ctx->calleecxx . . $ QScriptContext#callee(73013aefd0020d47).(); |
| 597 | |
| 598 | // try fileName:lineNumber |
| 599 | int bpid = m_bpManagercxx . . $ ScriptDebuggerPrivate#m_bpManager.->findBreakpointcxx . . $ ScriptBreakpointManager#findBreakpoint(91f46685ef4c12b5).(info->fileNamecxx . . $ ScriptInfo#fileName(6ef7b6c27b00b43d).(), lineNumber); |
| 600 | if ((bpid != -1) && m_bpManagercxx . . $ ScriptDebuggerPrivate#m_bpManager.->isBreakpointEnabledcxx . . $ ScriptBreakpointManager#isBreakpointEnabled(4a668f6de69bf818).(bpid)) { |
| 601 | messagecxx . . $ ScriptDebuggerPrivate#message(3520e46b33348bf6).(QStringcxx . . $ QString#::fromLatin1cxx . . $ QString#fromLatin1(5ac70cc0fa2a874e).("Breakpoint %0 at %1:%2") |
| 602 | .argcxx . . $ QString#arg(64ab2ed17cc11715).(bpid + 1).argcxx . . $ QString#arg(bc823072288cbbb5).(info->fileNamecxx . . $ ScriptInfo#fileName(6ef7b6c27b00b43d).()).argcxx . . $ QString#arg(64ab2ed17cc11715).(lineNumber)); |
| 603 | if (m_bpManagercxx . . $ ScriptDebuggerPrivate#m_bpManager.->isBreakpointSingleShotcxx . . $ ScriptBreakpointManager#isBreakpointSingleShot(4a668f6de69bf818).(bpid)) |
| 604 | m_bpManagercxx . . $ ScriptDebuggerPrivate#m_bpManager.->removeBreakpointcxx . . $ ScriptBreakpointManager#removeBreakpoint(d4f767463ce0a6b3).(bpid); |
| 605 | } |
| 606 | if (bpid == -1) { |
| 607 | // try function |
| 608 | bpid = m_bpManagercxx . . $ ScriptDebuggerPrivate#m_bpManager.->findBreakpointcxx . . $ ScriptBreakpointManager#findBreakpoint(7777895d9151fbe4).(callee); |
| 609 | if ((bpid != -1) && m_bpManagercxx . . $ ScriptDebuggerPrivate#m_bpManager.->isBreakpointEnabledcxx . . $ ScriptBreakpointManager#isBreakpointEnabled(4a668f6de69bf818).(bpid)) { |
| 610 | messagecxx . . $ ScriptDebuggerPrivate#message(3520e46b33348bf6).(QStringcxx . . $ QString#::fromLatin1cxx . . $ QString#fromLatin1(5ac70cc0fa2a874e).("Breakpoint %0, %1()") |
| 611 | .argcxx . . $ QString#arg(64ab2ed17cc11715).(bpid + 1).argcxx . . $ QString#arg(bc823072288cbbb5).(ctxInfo.functionNamecxx . . $ QScriptContextInfo#functionName(6ef7b6c27b00b43d).())); |
| 612 | if (m_bpManagercxx . . $ ScriptDebuggerPrivate#m_bpManager.->isBreakpointSingleShotcxx . . $ ScriptBreakpointManager#isBreakpointSingleShot(4a668f6de69bf818).(bpid)) |
| 613 | m_bpManagercxx . . $ ScriptDebuggerPrivate#m_bpManager.->removeBreakpointcxx . . $ ScriptBreakpointManager#removeBreakpoint(d4f767463ce0a6b3).(bpid); |
| 614 | } |
| 615 | } |
| 616 | if ((bpid == -1) && !ctxInfo.functionNamecxx . . $ QScriptContextInfo#functionName(6ef7b6c27b00b43d).().isEmptycxx . . $ QString#isEmpty(50ce9a9e25b4a850).()) { |
| 617 | // try functionName:fileName |
| 618 | bpid = m_bpManagercxx . . $ ScriptDebuggerPrivate#m_bpManager.->findBreakpointcxx . . $ ScriptBreakpointManager#findBreakpoint(45fb196bbb245bf5).(ctxInfo.functionNamecxx . . $ QScriptContextInfo#functionName(6ef7b6c27b00b43d).(), ctxInfo.fileNamecxx . . $ QScriptContextInfo#fileName(6ef7b6c27b00b43d).()); |
| 619 | if ((bpid != -1) && m_bpManagercxx . . $ ScriptDebuggerPrivate#m_bpManager.->isBreakpointEnabledcxx . . $ ScriptBreakpointManager#isBreakpointEnabled(4a668f6de69bf818).(bpid)) { |
| 620 | messagecxx . . $ ScriptDebuggerPrivate#message(3520e46b33348bf6).(QStringcxx . . $ QString#::fromLatin1cxx . . $ QString#fromLatin1(5ac70cc0fa2a874e).("Breakpoint %0, %1():%2").argcxx . . $ QString#arg(64ab2ed17cc11715).(bpid + 1) |
| 621 | .argcxx . . $ QString#arg(bc823072288cbbb5).(ctxInfo.functionNamecxx . . $ QScriptContextInfo#functionName(6ef7b6c27b00b43d).()).argcxx . . $ QString#arg(bc823072288cbbb5).(ctxInfo.fileNamecxx . . $ QScriptContextInfo#fileName(6ef7b6c27b00b43d).())); |
| 622 | if (m_bpManagercxx . . $ ScriptDebuggerPrivate#m_bpManager.->isBreakpointSingleShotcxx . . $ ScriptBreakpointManager#isBreakpointSingleShot(4a668f6de69bf818).(bpid)) |
| 623 | m_bpManagercxx . . $ ScriptDebuggerPrivate#m_bpManager.->removeBreakpointcxx . . $ ScriptBreakpointManager#removeBreakpoint(d4f767463ce0a6b3).(bpid); |
| 624 | } |
| 625 | } |
| 626 | |
| 627 | enterInteractiveMode = (bpid != -1); |
| 628 | } |
| 629 | |
| 630 | switch (modecxx . . $ ScriptDebuggerPrivate#mode(16363bca95283531).()) { |
| 631 | case Runcxx . . $ ScriptDebuggerPrivate#Run.: |
| 632 | break; |
| 633 | |
| 634 | case StepIntocxx . . $ ScriptDebuggerPrivate#StepInto.: |
| 635 | enterInteractiveMode = true; |
| 636 | break; |
| 637 | |
| 638 | case StepOvercxx . . $ ScriptDebuggerPrivate#StepOver.: |
| 639 | enterInteractiveMode = enterInteractiveMode || (m_stepDepthcxx . . $ ScriptDebuggerPrivate#m_stepDepth. <= 0); |
| 640 | break; |
| 641 | } |
| 642 | |
| 643 | if (enterInteractiveMode) { |
| 644 | if (!info) |
| 645 | info = m_scriptscxx . . $ ScriptDebuggerPrivate#m_scripts..valuecxx . . $ QMap#value(866b0a4e5fb46e14).(scriptId); |
| 646 | Q_ASSERTcxx . . $ `<external>/15045578679651060896/qglobal.h:859:13`!(info); |
| 647 | messagecxx . . $ ScriptDebuggerPrivate#message(3520e46b33348bf6).(QStringcxx . . $ QString#::fromLatin1cxx . . $ QString#fromLatin1(5ac70cc0fa2a874e).("%0\t%1").argcxx . . $ QString#arg(64ab2ed17cc11715).(lineNumber).argcxx . . $ QString#arg(bc823072288cbbb5).(info->lineTextcxx . . $ ScriptInfo#lineText(ce915ed341d4a7f0).(lineNumber))); |
| 648 | interactivecxx . . $ ScriptDebuggerPrivate#interactive(49f6e7a06ebc5aa8).(); |
| 649 | } |
| 650 | } |
| 651 | |
| 652 | void ScriptDebuggerPrivatecxx . . $ ScriptDebuggerPrivate#::exceptionThrowcxx . . $ ScriptDebuggerPrivate#exceptionThrow(fb4a237cc3cb37d3).(qint64cxx . . $ qint64# /*scriptId*/, |
| 653 | const QScriptValuecxx . . $ QScriptValue# &exception, |
| 654 | bool hasHandler) |
| 655 | { |
| 656 | if (!hasHandler) { |
| 657 | errorMessagecxx . . $ ScriptDebuggerPrivate#errorMessage(3520e46b33348bf6).(QStringcxx . . $ QString#::fromLatin1cxx . . $ QString#fromLatin1(5ac70cc0fa2a874e).("uncaught exception: %0").argcxx . . $ QString#arg(bc823072288cbbb5).(exception.toStringcxx . . $ QScriptValue#toString(6ef7b6c27b00b43d).())); |
| 658 | QScriptContextcxx . . $ QScriptContext# *ctx = enginecxx . . $ QScriptEngineAgent#engine(18bf45d2c163ce9b).()->currentContextcxx . . $ QScriptEngine#currentContext(3b7b8e48bf7da82e).(); |
| 659 | int lineNumber = QScriptContextInfocxx . . $ QScriptContextInfo#(ctx).lineNumbercxx . . $ QScriptContextInfo#lineNumber(455f465bc33b4cdf).(); |
| 660 | ScriptInfocxx . . $ ScriptInfo# *info = scriptInfocxx . . $ ScriptDebuggerPrivate#scriptInfo(d4b44431ccbd3233).(ctx); |
| 661 | QStringcxx . . $ QString# lineText = info ? info->lineTextcxx . . $ ScriptInfo#lineText(ce915ed341d4a7f0).(lineNumber) : QStringcxx . . $ QString#QString(85c52e162fed56f9).("(no source text available)"); |
| 662 | messagecxx . . $ ScriptDebuggerPrivate#message(3520e46b33348bf6).(QStringcxx . . $ QString#::fromLatin1cxx . . $ QString#fromLatin1(5ac70cc0fa2a874e).("%0\t%1").argcxx . . $ QString#arg(64ab2ed17cc11715).(lineNumber).argcxx . . $ QString#arg(bc823072288cbbb5).(lineText)); |
| 663 | interactivecxx . . $ ScriptDebuggerPrivate#interactive(49f6e7a06ebc5aa8).(); |
| 664 | } |
| 665 | } |
| 666 | |
| 667 | |
| 668 | |
| 669 | ScriptDebuggercxx . . $ ScriptDebugger#::ScriptDebuggercxx . . $ ScriptDebugger#ScriptDebugger(d3e0164fcca5dac6).(QScriptEnginecxx . . $ QScriptEngine# *engine) |
| 670 | : d_ptrcxx . . $ ScriptDebugger#d_ptr.(new ScriptDebuggerPrivatecxx . . $ ScriptDebuggerPrivate#ScriptDebuggerPrivate(d3e0164fcca5dac6).(engine)) |
| 671 | { |
| 672 | d_ptrcxx . . $ ScriptDebugger#d_ptr.->q_ptrcxx . . $ ScriptDebuggerPrivate#q_ptr. = this; |
| 673 | engine->setAgentcxx . . $ QScriptEngine#setAgent(78ead58f1ffbde97).(d_ptrcxx . . $ ScriptDebugger#d_ptr.); |
| 674 | } |
| 675 | |
| 676 | ScriptDebuggercxx . . $ ScriptDebugger#::ScriptDebuggercxx . . $ ScriptDebugger#ScriptDebugger(720eef1479fe424f).(QScriptEnginecxx . . $ QScriptEngine# *engine, ScriptDebuggerPrivatecxx . . $ ScriptDebuggerPrivate# &dd) |
| 677 | : d_ptrcxx . . $ ScriptDebugger#d_ptr.(&dd) |
| 678 | { |
| 679 | d_ptrcxx . . $ ScriptDebugger#d_ptr.->q_ptrcxx . . $ ScriptDebuggerPrivate#q_ptr. = this; |
| 680 | engine->setAgentcxx . . $ QScriptEngine#setAgent(78ead58f1ffbde97).(d_ptrcxx . . $ ScriptDebugger#d_ptr.); |
| 681 | } |
| 682 | |
| 683 | ScriptDebuggercxx . . $ ScriptDebugger#::~cxx . . $ ScriptDebugger#`~ScriptDebugger`(ced63f7c635d850d).ScriptDebuggercxx . . $ ScriptDebugger#() |
| 684 | { |
| 685 | delete d_ptrcxx . . $ ScriptDebugger#d_ptr.; |
| 686 | d_ptrcxx . . $ ScriptDebugger#d_ptr. = 0; |
| 687 | } |
| 688 | |
| 689 | void ScriptDebuggercxx . . $ ScriptDebugger#::breakAtNextStatementcxx . . $ ScriptDebugger#breakAtNextStatement(49f6e7a06ebc5aa8).() |
| 690 | { |
| 691 | Q_Dcxx . . $ `<external>/15045578679651060896/qglobal.h:1177:9`!(ScriptDebugger); |
| 692 | d->setModecxx . . $ ScriptDebuggerPrivate#setMode(475977749f749da4).(ScriptDebuggerPrivatecxx . . $ ScriptDebuggerPrivate#::StepIntocxx . . $ ScriptDebuggerPrivate#StepInto.); |
| 693 | } |
| 694 | |
| 695 | void ScriptDebuggercxx . . $ ScriptDebugger#::setBreakpointcxx . . $ ScriptDebugger#setBreakpoint(29ed8fcd127906b1).(const QStringcxx . . $ QString# &fileName, int lineNumber) |
| 696 | { |
| 697 | Q_Dcxx . . $ `<external>/15045578679651060896/qglobal.h:1177:9`!(ScriptDebugger); |
| 698 | d->m_bpManagercxx . . $ ScriptDebuggerPrivate#m_bpManager.->setBreakpointcxx . . $ ScriptBreakpointManager#setBreakpoint(a664fe1f05d5cb93).(fileName, lineNumber); |
| 699 | } |
| 700 | |
| 701 | void ScriptDebuggercxx . . $ ScriptDebugger#::setBreakpointcxx . . $ ScriptDebugger#setBreakpoint(c1427772cd1877b0).(const QStringcxx . . $ QString# &functionName, const QStringcxx . . $ QString# &fileName) |
| 702 | { |
| 703 | Q_Dcxx . . $ `<external>/15045578679651060896/qglobal.h:1177:9`!(ScriptDebugger); |
| 704 | d->m_bpManagercxx . . $ ScriptDebuggerPrivate#m_bpManager.->setBreakpointcxx . . $ ScriptBreakpointManager#setBreakpoint(c6f4e55073dadb56).(functionName, fileName); |
| 705 | } |
| 706 | |
| 707 | void ScriptDebuggercxx . . $ ScriptDebugger#::setBreakpointcxx . . $ ScriptDebugger#setBreakpoint(6b35c8bde2804237).(const QScriptValuecxx . . $ QScriptValue# &function) |
| 708 | { |
| 709 | Q_Dcxx . . $ `<external>/15045578679651060896/qglobal.h:1177:9`!(ScriptDebugger); |
| 710 | d->m_bpManagercxx . . $ ScriptDebuggerPrivate#m_bpManager.->setBreakpointcxx . . $ ScriptBreakpointManager#setBreakpoint(1ba93f8a114f47f4).(function); |
| 711 | } |
| 712 | |
| 713 | QTextStreamcxx . . $ QTextStream# *ScriptDebuggercxx . . $ ScriptDebugger#::inputStreamcxx . . $ ScriptDebugger#inputStream(42f732c789512468).() const |
| 714 | { |
| 715 | Q_Dcxx . . $ `<external>/15045578679651060896/qglobal.h:1177:9`!(const ScriptDebugger); |
| 716 | return d->m_inputStreamcxx . . $ ScriptDebuggerPrivate#m_inputStream.; |
| 717 | } |
| 718 | |
| 719 | void ScriptDebuggercxx . . $ ScriptDebugger#::setInputStreamcxx . . $ ScriptDebugger#setInputStream(aca783e314870a73).(QTextStreamcxx . . $ QTextStream# *inputStream) |
| 720 | { |
| 721 | Q_Dcxx . . $ `<external>/15045578679651060896/qglobal.h:1177:9`!(ScriptDebugger); |
| 722 | d->m_inputStreamcxx . . $ ScriptDebuggerPrivate#m_inputStream. = inputStream; |
| 723 | } |
| 724 | |
| 725 | QTextStreamcxx . . $ QTextStream# *ScriptDebuggercxx . . $ ScriptDebugger#::outputStreamcxx . . $ ScriptDebugger#outputStream(42f732c789512468).() const |
| 726 | { |
| 727 | Q_Dcxx . . $ `<external>/15045578679651060896/qglobal.h:1177:9`!(const ScriptDebugger); |
| 728 | return d->m_outputStreamcxx . . $ ScriptDebuggerPrivate#m_outputStream.; |
| 729 | } |
| 730 | |
| 731 | void ScriptDebuggercxx . . $ ScriptDebugger#::setOutputStreamcxx . . $ ScriptDebugger#setOutputStream(aca783e314870a73).(QTextStreamcxx . . $ QTextStream# *outputStream) |
| 732 | { |
| 733 | Q_Dcxx . . $ `<external>/15045578679651060896/qglobal.h:1177:9`!(ScriptDebugger); |
| 734 | d->m_outputStreamcxx . . $ ScriptDebuggerPrivate#m_outputStream. = outputStream; |
| 735 | } |
| 736 | |
| 737 | QTextStreamcxx . . $ QTextStream# *ScriptDebuggercxx . . $ ScriptDebugger#::errorStreamcxx . . $ ScriptDebugger#errorStream(42f732c789512468).() const |
| 738 | { |
| 739 | Q_Dcxx . . $ `<external>/15045578679651060896/qglobal.h:1177:9`!(const ScriptDebugger); |
| 740 | return d->m_errorStreamcxx . . $ ScriptDebuggerPrivate#m_errorStream.; |
| 741 | } |
| 742 | |
| 743 | void ScriptDebuggercxx . . $ ScriptDebugger#::setErrorStreamcxx . . $ ScriptDebugger#setErrorStream(aca783e314870a73).(QTextStreamcxx . . $ QTextStream# *errorStream) |
| 744 | { |
| 745 | Q_Dcxx . . $ `<external>/15045578679651060896/qglobal.h:1177:9`!(ScriptDebugger); |
| 746 | d->m_errorStreamcxx . . $ ScriptDebuggerPrivate#m_errorStream. = errorStream; |
| 747 | } |