aboutsummaryrefslogtreecommitdiffstats
path: root/qmljs_runtime.cpp
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@digia.com>2012-11-29 14:41:26 +0100
committerLars Knoll <lars.knoll@digia.com>2012-11-29 22:05:49 +0100
commita14e7549c4a3faece3474f059b2d04005cfc7cbf (patch)
tree3ce4903154e98aec5d952e5cdd067a7cb1b33aff /qmljs_runtime.cpp
parent36356a4b273e19ca599bf2a0cbfb02fda69e6c0a (diff)
Add some debugging infrastructure to the interpreter.
This currently mainly intended to be useful in a C++ debugger. The infrastructure makes it a lot easier to access (parent) contexts, find function names, etc. Change-Id: I0493d3a3bd4bf5c3a03379c1a2b545ed76862cd5 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'qmljs_runtime.cpp')
-rw-r--r--qmljs_runtime.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/qmljs_runtime.cpp b/qmljs_runtime.cpp
index 1aa3c94f2c..6779f86d11 100644
--- a/qmljs_runtime.cpp
+++ b/qmljs_runtime.cpp
@@ -39,6 +39,7 @@
**
****************************************************************************/
+#include "debugging.h"
#include "qmljs_runtime.h"
#include "qmljs_objects.h"
#include "qv4ir_p.h"
@@ -777,6 +778,9 @@ void __qmljs_throw(Value value, ExecutionContext *context)
{
assert(!context->engine->unwindStack.isEmpty());
+ if (context->engine->debugger)
+ context->engine->debugger->aboutToThrow(&value);
+
ExecutionEngine::ExceptionHandler &handler = context->engine->unwindStack.last();
// clean up call contexts