WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
199399
[JSC][Win] Support unwind information for LLInt ASM by using MASM directives to get callstack in debugger
https://bugs.webkit.org/show_bug.cgi?id=199399
Summary
[JSC][Win] Support unwind information for LLInt ASM by using MASM directives ...
Fujii Hironori
Reported
2019-07-02 03:06:33 PDT
[JSC][Win] Support unwind information for LLInt ASM by using MASM directives to get callstack in debugger MASM has directives for debug information. .SETFRAME | Microsoft Docs
https://docs.microsoft.com/ja-jp/cpp/assembler/masm/dot-setframe?view=vs-2019
VS debugger can't get callstack under JSC. It looks like the following:
> WebKit.dll!WebCore::Node::appendChild(WebCore::Node & newChild) Line 493 C++ > WebKit.dll!WebCore::jsNodePrototypeFunctionAppendChildBody(JSC::ExecState * state, WebCore::JSNode * castedThis, JSC::ThrowScope & throwScope) Line 860 C++ > WebKit.dll!WebCore::IDLOperation<WebCore::JSNode>::call<&WebCore::jsNodePrototypeFunctionAppendChildBody,WebCore::CastedThisErrorBehavior::Throw>(JSC::ExecState & state, const char * operationName) Line 53 C++ > WebKit.dll!WebCore::jsNodePrototypeFunctionAppendChild(JSC::ExecState * state) Line 866 C++ > [External Code]
Attachments
WIP patch
(3.41 KB, patch)
2019-07-02 03:07 PDT
,
Fujii Hironori
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Fujii Hironori
Comment 1
2019-07-02 03:07:55 PDT
Created
attachment 373312
[details]
WIP patch This WIP patch doens't work as expected, but sometimes debugger can show full callstack like the following:
> WebKit.dll!WebCore::Node::appendChild(WebCore::Node & newChild) Line 493 C++ > WebKit.dll!WebCore::jsNodePrototypeFunctionAppendChildBody(JSC::ExecState * state, WebCore::JSNode * castedThis, JSC::ThrowScope & throwScope) Line 860 C++ > WebKit.dll!WebCore::IDLOperation<WebCore::JSNode>::call<&WebCore::jsNodePrototypeFunctionAppendChildBody,WebCore::CastedThisErrorBehavior::Throw>(JSC::ExecState & state, const char * operationName) Line 53 C++ > WebKit.dll!WebCore::jsNodePrototypeFunctionAppendChild(JSC::ExecState * state) Line 866 C++ > [External Code] > JavaScriptCore.dll!JSC::JITCode::execute(JSC::VM * vm, JSC::ProtoCallFrame * protoCallFrame) Line 38 C++ > JavaScriptCore.dll!JSC::Interpreter::executeProgram(const JSC::SourceCode & source, JSC::ExecState * callFrame, JSC::JSObject * thisObj) Line 845 C++ > JavaScriptCore.dll!JSC::evaluate(JSC::ExecState * exec, const JSC::SourceCode & source, JSC::JSValue thisValue, WTF::NakedPtr<JSC::Exception> & returnedException) Line 149 C++ > JavaScriptCore.dll!JSC::profiledEvaluate(JSC::ExecState * exec, JSC::ProfilingReason reason, const JSC::SourceCode & source, JSC::JSValue thisValue, WTF::NakedPtr<JSC::Exception> & returnedException) Line 164 C++ > WebKit.dll!WebCore::JSExecState::profiledEvaluate(JSC::ExecState * exec, JSC::ProfilingReason reason, const JSC::SourceCode & source, JSC::JSValue thisValue, WTF::NakedPtr<JSC::Exception> & returnedException) Line 81 C++ > WebKit.dll!WebCore::ScriptController::evaluateInWorld(const WebCore::ScriptSourceCode & sourceCode, WebCore::DOMWrapperWorld & world, WebCore::ExceptionDetails * exceptionDetails) Line 133 C++ > WebKit.dll!WebCore::ScriptController::evaluate(const WebCore::ScriptSourceCode & sourceCode, WebCore::ExceptionDetails * exceptionDetails) Line 149 C++ > WebKit.dll!WebCore::ScriptElement::executeClassicScript(const WebCore::ScriptSourceCode & sourceCode) Line 388 C++ > WebKit.dll!WebCore::LoadableClassicScript::execute(WebCore::ScriptElement & scriptElement) Line 123 C++ > WebKit.dll!WebCore::ScriptElement::executeScriptAndDispatchEvent(WebCore::LoadableScript & loadableScript) Line 426 C++ > WebKit.dll!WebCore::ScriptElement::executePendingScript(WebCore::PendingScript & pendingScript) Line 434 C++ > WebKit.dll!WebCore::ScriptRunner::timerFired() Line 131 C++ > [External Code] > WebKit.dll!WTF::Detail::CallableWrapper<std::_Binder<std::_Unforced,void (WebCore::ScriptRunner::*&)(),WebCore::ScriptRunner *>,void>::call() Line 52 C++ > WebKit.dll!WTF::Function<void ()>::operator()() Line 79 C++ > WebKit.dll!WebCore::Timer::fired() Line 127 C++ > WebKit.dll!WebCore::ThreadTimers::sharedTimerFiredInternal() Line 129 C++ > WebKit.dll!WebCore::ThreadTimers::setSharedTimer::<unnamed-tag>::operator()() Line 69 C++ > WebKit.dll!WTF::Detail::CallableWrapper<`lambda at ..\..\Source\WebCore\platform/ThreadTimers.cpp:69:41',void>::call() Line 52 C++ > WebKit.dll!WTF::Function<void ()>::operator()() Line 79 C++ > WebKit.dll!WebCore::MainThreadSharedTimer::fired() Line 84 C++ > WebKit.dll!WebCore::TimerWindowWndProc(HWND__ * hWnd, unsigned int message, unsigned __int64 wParam, __int64 lParam) Line 89 C++ > [External Code] > WebKit.dll!WebKitMessageLoop::run(HACCEL__ * hAccelTable) Line 94 C++ > MiniBrowserLib.dll!wWinMain(HINSTANCE__ * hInstance, HINSTANCE__ * hPrevInstance, wchar_t * lpstrCmdLine, int nCmdShow) Line 97 C++ > MiniBrowserLib.dll!dllLauncherEntryPoint(HINSTANCE__ * hInstance, HINSTANCE__ * hPrevInstance, wchar_t * lpstrCmdLine, int nCmdShow) Line 115 C++ > MiniBrowser.exe!wWinMain(HINSTANCE__ * hInstance, HINSTANCE__ * hPrevInstance, wchar_t * lpstrCmdLine, int nCmdShow) Line 232 C++ > [External Code]
Fujii Hironori
Comment 2
2019-07-02 03:13:21 PDT
https://docs.microsoft.com/en-us/cpp/assembler/masm/dot-setframe
Fujii Hironori
Comment 3
2019-07-02 23:52:04 PDT
Umm, this doesn't seem an easy task. It manipulates the stack pointer outside of epilogue and prologue.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug