aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qv4debugger
Commit message (Collapse)AuthorAgeFilesLines
* Clean up data format for V4 debug connectionUlf Hermann2015-08-191-12/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | This changes the type announced for functions to the actual JavaScript type "function". The type for null is also wrong: it should be "object". However, older QtCreators cannot distinguish between null and {} if null gets the correct type, unless you explicitly compare x === null in an expression evaluator. For this reason the fake "null" type is kept for now. Also, the value field of undefined is now set as QJsonValue::Undefined which causes it to be omitted when sent over the wire. This is the logical thing to do. In addition we add type and value fields for all data members mentioned in a response, not only the ones specifically asked for. The value field is the actual value for any primitives (including strings), or the number of properties for composite types: objects, arrays, functions. In turn, the "ref" members are omitted for primitive types, so that we don't have to hold references to them in the debug service anymore. Even old QtCreators can deal with verbatim data members without "ref". Task-number: QTBUG-47746 Task-number: QTBUG-47747 Change-Id: I773e6418c39cd9814aadb5fb5ef7e109f9a4e618 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Move DataCollector into debugger pluginUlf Hermann2015-08-102-15/+33
| | | | | | | | The data collector and all the jobs it uses to interact with the engine are only used from the debugger plugin. We can as well move them there. Change-Id: Ia48251f08b48c7e1e607b8ae2a3d1de29f80f742 Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
* Move V4 debugger agent into the debugger pluginUlf Hermann2015-08-101-30/+34
| | | | | | | | | | The debugger is the only thing that actually needs it. Note that for this to work we need to make QV4::Debugging::Debugger a QObject and add some signals. The net effect is still a reduction in binary size of about 1kb. Change-Id: Ibecb8cfa140fc26fc13c8cbefb3d027ebdcd28a4 Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
* Change data collection for debugging to use QV4::Value.Ulf Hermann2015-08-101-131/+162
| | | | | | | | | | | | | | | | This patch changes the variable collection to store QV4::Value values into a JS array, which is retained by the collector. This prevents any GC issues, and gives a nice mapping from handle (used in the debugging protocol) to JS value. It also allows for easy "shallow" object serialization: any lookup can start with the QV4::Value, and add any values it encounters to the array. Testing is changed to use this collector directly, thereby testing the class that is actually used to generate protocol data. Task-number: QTBUG-47061 Change-Id: Iec75c4f74c08495e2a8af0fedf304f76f8385fd7 Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
* Move exceptionValue and globalObject from the Engine onto the JS stackLars Knoll2015-04-241-1/+1
| | | | | | | | | We'll need to move all GC'ed objects currently stored in ExecutionEngine onto the JS stack for easier management in a new garbage collection scheme. This is the start of that change. Change-Id: Ib3ad8e846875dade8a807ea79f063173d40e4aad Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* More cleanupsLars Knoll2015-04-211-1/+1
| | | | | | | | Get rid of Value::asObject(), and pass const Managed pointers into some more vtable methods. Change-Id: Ia4f427d5fd8868f77b4015d1ce5424d32bfc2115 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-121-7/+7
| | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Change-Id: I61120571787870c0ed17066afb31779b1e6e30e9 Reviewed-by: Iikka Eklund <iikka.eklund@theqtcompany.com>
* Remove all remaining usages of ValueRefLars Knoll2015-01-231-2/+2
| | | | | Change-Id: Icd76d3d03fac2e57530e55f8ec15b97109dcdcbc Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Merge remote-tracking branch 'origin/5.4' into devSimon Hausmann2015-01-161-0/+38
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/qml/jsruntime/qv4context_p.h src/qml/jsruntime/qv4debugging.cpp src/qml/jsruntime/qv4engine.cpp src/qml/jsruntime/qv4functionobject_p.h src/qml/jsruntime/qv4qobjectwrapper.cpp src/quick/scenegraph/shaders/visualization.frag tests/auto/qml/qjsengine/tst_qjsengine.cpp Change-Id: I492e8546c278f80a300a2129e9a29d861e144a30
| * QML Debugging: Fix breakpoints/stepping in a with-statement.Erik Verbruggen2014-12-101-0/+18
| | | | | | | | | | | | | | | | Also fix the stack-trace generation, otherwise the debugger engine would report a breakpoint hit on the wrong line. Change-Id: I6eb4b508fbdca64d03badd8f9312a05c78781ded Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| * QML Debugging: Fix crash when stepping through try-catch block.Erik Verbruggen2014-12-091-0/+20
| | | | | | | | | | | | | | | | | | Also fix the stack-trace generation, otherwise the debugger engine would report a breakpoint hit on the wrong line. Task-number: QTBUG-42723 Change-Id: I1f655a5174b28a1c9c31c85bbe023fbce5ddbb96 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Use QV4::ScopedString typedef instead of actual typeOleg Shparber2015-01-021-1/+1
| | | | | | | | | | Change-Id: I64ecbf6cea463387a70e909ecc5f9165d22a7b0f Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Return Heap::ExecutionContext for globalContext()Lars Knoll2014-12-191-1/+2
| | | | | | | | | | Change-Id: Ide7c81735be4662ff45bf268cfe750ff1f784453 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Better encapsulate access to the global objectLars Knoll2014-12-111-1/+1
| | | | | | | | | | Change-Id: I8a76112d821cb3fc172ba0d16ee8410d39b4422a Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Encapsulate accesses to the root contextLars Knoll2014-12-111-1/+1
|/ | | | | Change-Id: I668cef1363a5c1a5c5b9a7e138f3bd0338712eea Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix conditional breakpoints in QMLSimon Hausmann2014-12-031-0/+39
| | | | | | | | | | We need to set "inheritContext" to true for the QV4::Script that's used during conditional break point evaluation, because that will also disable fast property lookups, which is still required for QML lookups to work. Change-Id: I8976df1c827b5058eae9bdce6e86e5ea856cbfe1 Task-number: QTBUG-43018 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix expression evaluation in specific frames in the debuggerSimon Hausmann2014-12-031-0/+44
| | | | | | | | | | | | Expressions from the QML/JS console are intended to be executed in a specific frame / context. However that wasn't implemented properly, we should pop the current context frameNr times. [ChangeLog][QtQml] Fix inspecting objects in QML/JS console in different frames. Change-Id: If575d4005c52a9fe6805538a7b1a02b9e32049d6 Task-number: QTBUG-42831 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Update license headers and add new licensesJani Heikkinen2014-08-251-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 & LICENSE.GPLv2 - Removed LICENSE.GPL Change-Id: I84a565e2e0caa3b76bf291a7d188a57a4b00e1b0 Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
* Add support for conditional breakpoints and evaluate.Erik Verbruggen2014-08-081-0/+24
| | | | | | | | | | | | Also centralized the context state saver and added line number saving, so that the JS jobs for evaluation of breakpoint conditions don't change the state of the current engine context. Task-number: QTBUG-37119 Task-number: QTCREATORBUG-11516 Change-Id: Ia21b3d64e239e5b67f3c07e1c006d8e6748f29b6 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com> Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Change the object allocation schemeSimon Hausmann2014-07-221-2/+2
| | | | | | | | | Instead of allocating the data directly, centralize the object and its ::Data allocation in one place in the memory manager. This is in preparation for additional pointer indirection later. Change-Id: I7880e1e7354b3258b6a8965be378cd09c9467d25 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix compilation on QNXSergio Ahumada2014-03-311-5/+5
| | | | | | | Task-number: QTBUG-37979 Change-Id: Ie877317cded5b9eaf95389344712c66192696552 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* Debugging with V4Erik Verbruggen2013-11-101-59/+151
| | | | | | | | | Currently missing, but coming in subsequent patches: - evaluating expressions - evaluating breakpoint conditions Change-Id: Ib43f2a3aaa252741ea7ce857a274480feb8741aa Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Simplify & speed up function callingLars Knoll2013-11-091-2/+2
| | | | | | | | | Get rid of the SimpleCallContext, instead simply use the CallContext data structure, but don't initialize the unused variables. Change-Id: I11b311986da180c62c815b516a2c55844156d0ab Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* V4 debugger: retrieve formals and locals.Erik Verbruggen2013-10-241-1/+166
| | | | | Change-Id: I47507a4d7d1b429b9c43ed3a7822079efe577327 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* convert Managed::put() API to be GC safeLars Knoll2013-09-221-1/+1
| | | | | Change-Id: I09198ce372fa545372db389fac26828d21ad5731 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Start using StringRef for parameter passingLars Knoll2013-09-221-1/+1
| | | | | Change-Id: If2c41daeda2862cd1162c5da8163a9d62fe4111d Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Cleanup ExecutionEngine::newBuiltinFunction() usagesLars Knoll2013-09-221-3/+4
| | | | | | | And change the return type to be GC safe Change-Id: I6d7513962370fea4072a3d8c6b2c6f2d1705992e Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Convert builtin methods to return a ReturnedValueLars Knoll2013-09-181-3/+3
| | | | | Change-Id: I6b75adbf53a5be0deab023d2eed98ce2a7915551 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* V4 debugger: change agent API to work on all debuggers.Erik Verbruggen2013-09-101-7/+7
| | | | | | | | | From a client point of view, there is no way to know which engine is executing which script. So, instead of passing in a debugger for a specific engine, have the agent set breakpoints on all debuggers. Change-Id: I53b8cbc1bdc02c7705042f2ac3a99a041992c134 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Improve reliability of v4 debugger testsSimon Hausmann2013-08-151-1/+1
| | | | | | | | | Sometimes the test hangs on shutdown. Don't wait for the finished signal to be emitted with an event loop, instead do the QThread equivalent of pthread_join: wait(). Change-Id: I3583e8366c08fc0446682d124d86df4ffa3290d3 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Initial support for debugging in the v4 interpreterSimon Hausmann2013-07-262-0/+294
This adds breakpoint support to the Debugger, a helper function in the engine for enabling debugging (which will switch from JIT to the interpreter) and a DebuggingAgent interface, for use by v4 clients. Change-Id: I78e17a6cbe7196b0dfe4ee157fc028532131caa3 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>