diff options
author | Jedrzej Nowacki <jedrzej.nowacki@nokia.com> | 2009-08-10 13:23:52 +0200 |
---|---|---|
committer | Jedrzej Nowacki <jedrzej.nowacki@nokia.com> | 2009-08-10 13:46:33 +0200 |
commit | af9ebb26298e80992cda4fb3bbb6a3384e59e94a (patch) | |
tree | f512db277c0c20db5c3359ede8f779ef9038a9af | |
parent | fab932713af6dfa7aad06ddfde774d25f5222472 (diff) |
Debugger modification. Debugger receive column number from op_debug
opcode and pass it for DidReachBreakpoint and WillExecuteStatement
events as an argument.
Compilation fix for JIT.
6 files changed, 17 insertions, 12 deletions
diff --git a/src/3rdparty/webkit/JavaScriptCore/debugger/Debugger.h b/src/3rdparty/webkit/JavaScriptCore/debugger/Debugger.h index 98d09358cd..0c75ecd9ab 100644 --- a/src/3rdparty/webkit/JavaScriptCore/debugger/Debugger.h +++ b/src/3rdparty/webkit/JavaScriptCore/debugger/Debugger.h @@ -42,13 +42,13 @@ namespace JSC { virtual void sourceParsed(ExecState*, const SourceCode&, int errorLine, const UString& errorMsg) = 0; virtual void exception(const DebuggerCallFrame&, intptr_t sourceID, int lineno) = 0; - virtual void atStatement(const DebuggerCallFrame&, intptr_t sourceID, int lineno) = 0; + virtual void atStatement(const DebuggerCallFrame&, intptr_t sourceID, int lineno, int column) = 0; virtual void callEvent(const DebuggerCallFrame&, intptr_t sourceID, int lineno) = 0; virtual void returnEvent(const DebuggerCallFrame&, intptr_t sourceID, int lineno) = 0; virtual void willExecuteProgram(const DebuggerCallFrame&, intptr_t sourceID, int lineno) = 0; virtual void didExecuteProgram(const DebuggerCallFrame&, intptr_t sourceID, int lineno) = 0; - virtual void didReachBreakpoint(const DebuggerCallFrame&, intptr_t sourceID, int lineno) = 0; + virtual void didReachBreakpoint(const DebuggerCallFrame&, intptr_t sourceID, int lineno, int column) = 0; private: HashSet<JSGlobalObject*> m_globalObjects; diff --git a/src/3rdparty/webkit/JavaScriptCore/interpreter/Interpreter.cpp b/src/3rdparty/webkit/JavaScriptCore/interpreter/Interpreter.cpp index 5a8f47416d..0c3081c9a7 100644 --- a/src/3rdparty/webkit/JavaScriptCore/interpreter/Interpreter.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/interpreter/Interpreter.cpp @@ -878,7 +878,7 @@ JSValue Interpreter::execute(EvalNode* evalNode, CallFrame* callFrame, JSObject* return result; } -NEVER_INLINE void Interpreter::debug(CallFrame* callFrame, DebugHookID debugHookID, int firstLine, int lastLine) +NEVER_INLINE void Interpreter::debug(CallFrame* callFrame, DebugHookID debugHookID, int firstLine, int lastLine, int column) { Debugger* debugger = callFrame->dynamicGlobalObject()->debugger(); if (!debugger) @@ -892,7 +892,7 @@ NEVER_INLINE void Interpreter::debug(CallFrame* callFrame, DebugHookID debugHook debugger->returnEvent(callFrame, callFrame->codeBlock()->ownerNode()->sourceID(), lastLine); return; case WillExecuteStatement: - debugger->atStatement(callFrame, callFrame->codeBlock()->ownerNode()->sourceID(), firstLine); + debugger->atStatement(callFrame, callFrame->codeBlock()->ownerNode()->sourceID(), firstLine, column); return; case WillExecuteProgram: debugger->willExecuteProgram(callFrame, callFrame->codeBlock()->ownerNode()->sourceID(), firstLine); @@ -901,7 +901,7 @@ NEVER_INLINE void Interpreter::debug(CallFrame* callFrame, DebugHookID debugHook debugger->didExecuteProgram(callFrame, callFrame->codeBlock()->ownerNode()->sourceID(), lastLine); return; case DidReachBreakpoint: - debugger->didReachBreakpoint(callFrame, callFrame->codeBlock()->ownerNode()->sourceID(), lastLine); + debugger->didReachBreakpoint(callFrame, callFrame->codeBlock()->ownerNode()->sourceID(), lastLine, column); return; } } @@ -3824,7 +3824,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi int lastLine = (++vPC)->u.operand; int column = (++vPC)->u.operand; - debug(callFrame, static_cast<DebugHookID>(debugHookID), firstLine, lastLine); + debug(callFrame, static_cast<DebugHookID>(debugHookID), firstLine, lastLine, column); ++vPC; NEXT_INSTRUCTION(); diff --git a/src/3rdparty/webkit/JavaScriptCore/interpreter/Interpreter.h b/src/3rdparty/webkit/JavaScriptCore/interpreter/Interpreter.h index 5331d929f3..69f83cf912 100644 --- a/src/3rdparty/webkit/JavaScriptCore/interpreter/Interpreter.h +++ b/src/3rdparty/webkit/JavaScriptCore/interpreter/Interpreter.h @@ -110,7 +110,7 @@ namespace JSC { NEVER_INLINE JSValue callEval(CallFrame*, RegisterFile*, Register* argv, int argc, int registerOffset, JSValue& exceptionValue); NEVER_INLINE HandlerInfo* throwException(CallFrame*&, JSValue&, unsigned bytecodeOffset, bool); - NEVER_INLINE void debug(CallFrame*, DebugHookID, int firstLine, int lastLine); + NEVER_INLINE void debug(CallFrame*, DebugHookID, int firstLine, int lastLine, int column); private: enum ExecutionFlag { Normal, InitializeAndReturn }; diff --git a/src/3rdparty/webkit/JavaScriptCore/jit/JITStubs.cpp b/src/3rdparty/webkit/JavaScriptCore/jit/JITStubs.cpp index 62da189d23..40d218248d 100644 --- a/src/3rdparty/webkit/JavaScriptCore/jit/JITStubs.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/jit/JITStubs.cpp @@ -2705,8 +2705,13 @@ DEFINE_STUB_FUNCTION(void, op_debug) int debugHookID = stackFrame.args[0].int32(); int firstLine = stackFrame.args[1].int32(); int lastLine = stackFrame.args[2].int32(); +#ifdef QT_BUILD_SCRIPT_LIB + int column = stackFrame.args[3].int32(); +#else + int column = -1; +#endif - stackFrame.globalData->interpreter->debug(callFrame, static_cast<DebugHookID>(debugHookID), firstLine, lastLine); + stackFrame.globalData->interpreter->debug(callFrame, static_cast<DebugHookID>(debugHookID), firstLine, lastLine, column); } DEFINE_STUB_FUNCTION(EncodedJSValue, vm_throw) diff --git a/src/3rdparty/webkit/WebCore/inspector/JavaScriptDebugServer.cpp b/src/3rdparty/webkit/WebCore/inspector/JavaScriptDebugServer.cpp index 10eff26a1d..0aafd6508d 100644 --- a/src/3rdparty/webkit/WebCore/inspector/JavaScriptDebugServer.cpp +++ b/src/3rdparty/webkit/WebCore/inspector/JavaScriptDebugServer.cpp @@ -459,7 +459,7 @@ void JavaScriptDebugServer::callEvent(const DebuggerCallFrame& debuggerCallFrame pauseIfNeeded(toPage(debuggerCallFrame.dynamicGlobalObject())); } -void JavaScriptDebugServer::atStatement(const DebuggerCallFrame& debuggerCallFrame, intptr_t sourceID, int lineNumber) +void JavaScriptDebugServer::atStatement(const DebuggerCallFrame& debuggerCallFrame, intptr_t sourceID, int lineNumber, int column) { if (m_paused) return; @@ -533,7 +533,7 @@ void JavaScriptDebugServer::didExecuteProgram(const DebuggerCallFrame& debuggerC m_currentCallFrame = m_currentCallFrame->caller(); } -void JavaScriptDebugServer::didReachBreakpoint(const DebuggerCallFrame& debuggerCallFrame, intptr_t sourceID, int lineNumber) +void JavaScriptDebugServer::didReachBreakpoint(const DebuggerCallFrame& debuggerCallFrame, intptr_t sourceID, int lineNumber, int /*column*/) { if (m_paused) return; diff --git a/src/3rdparty/webkit/WebCore/inspector/JavaScriptDebugServer.h b/src/3rdparty/webkit/WebCore/inspector/JavaScriptDebugServer.h index baa6699c73..505a6168de 100644 --- a/src/3rdparty/webkit/WebCore/inspector/JavaScriptDebugServer.h +++ b/src/3rdparty/webkit/WebCore/inspector/JavaScriptDebugServer.h @@ -105,12 +105,12 @@ namespace WebCore { virtual void sourceParsed(JSC::ExecState*, const JSC::SourceCode&, int errorLine, const JSC::UString& errorMsg); virtual void callEvent(const JSC::DebuggerCallFrame&, intptr_t sourceID, int lineNumber); - virtual void atStatement(const JSC::DebuggerCallFrame&, intptr_t sourceID, int firstLine); + virtual void atStatement(const JSC::DebuggerCallFrame&, intptr_t sourceID, int firstLine, int column); virtual void returnEvent(const JSC::DebuggerCallFrame&, intptr_t sourceID, int lineNumber); virtual void exception(const JSC::DebuggerCallFrame&, intptr_t sourceID, int lineNumber); virtual void willExecuteProgram(const JSC::DebuggerCallFrame&, intptr_t sourceID, int lineno); virtual void didExecuteProgram(const JSC::DebuggerCallFrame&, intptr_t sourceID, int lineno); - virtual void didReachBreakpoint(const JSC::DebuggerCallFrame&, intptr_t sourceID, int lineno); + virtual void didReachBreakpoint(const JSC::DebuggerCallFrame&, intptr_t sourceID, int lineno, int column); void didAddListener(Page*); void didRemoveListener(Page*); |