diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2017-10-24 13:56:09 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2017-11-06 11:57:36 +0000 |
commit | 0855417be493a774c1d1a70fcf7a73ee7fed0529 (patch) | |
tree | 99dd74c68b8e9ed5fb47a0f491dadac3304b02bd /src/qml/jsruntime/qv4vme_moth.cpp | |
parent | 7bbce3c39660f49add75c5153b8d1f085e31ff49 (diff) |
Re-enable Debug instructions and locations for QML functions
Debug instructions are used to trigger break points and are added for
every source line.
We also need to insert Debug instructions before Ret, so that we can
step out. We also need to assign line numbers to the entry and return
points of "abbreviated" QML functions (by simulating lbrace and
rbrace) so that we can set break points on them. The line numbers on Ret
need to be negative, so that you cannot (accidentally) set break points
on them. A typical signal handler or binding in QML consists of only one
line and if you set a break point on that line, you want it to hit only
once, when entering the function. If the line numbers on Ret were
positive, it would be hit again on exit. Some of the tests in
tst_qqmldebugjs implicitly check for that.
Also the new interpreter does something on the left brace, so a
function actually starts there, not on the first statement.
Change-Id: Id9dfb20e35696b420d0950deab988f7cc5197bfc
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4vme_moth.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4vme_moth.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/qml/jsruntime/qv4vme_moth.cpp b/src/qml/jsruntime/qv4vme_moth.cpp index 8efd684290..b3b9842ba9 100644 --- a/src/qml/jsruntime/qv4vme_moth.cpp +++ b/src/qml/jsruntime/qv4vme_moth.cpp @@ -1294,6 +1294,7 @@ QV4::ReturnedValue VME::exec(CallData *callData, QV4::Function *function) #ifndef QT_NO_QML_DEBUGGER MOTH_BEGIN_INSTR(Debug) + STORE_IP(); debug_slowPath(engine); MOTH_END_INSTR(Debug) #endif // QT_NO_QML_DEBUGGER |