WebKit Bugzilla
Attachment 373312 Details for
Bug 199399
: [JSC][Win] Support unwind information for LLInt ASM by using MASM directives to get callstack in debugger
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
WIP patch
unwind.diff (text/plain), 3.41 KB, created by
Fujii Hironori
on 2019-07-02 03:07:55 PDT
(
hide
)
Description:
WIP patch
Filename:
MIME Type:
Creator:
Fujii Hironori
Created:
2019-07-02 03:07:55 PDT
Size:
3.41 KB
patch
obsolete
>diff --git a/Source/JavaScriptCore/llint/LowLevelInterpreter.asm b/Source/JavaScriptCore/llint/LowLevelInterpreter.asm >index c0ad83c6c43..6d0253842ff 100644 >--- a/Source/JavaScriptCore/llint/LowLevelInterpreter.asm >+++ b/Source/JavaScriptCore/llint/LowLevelInterpreter.asm >@@ -873,6 +873,26 @@ macro preserveReturnAddressAfterCall(destinationRegister) > end > > macro functionPrologue() >+ tagReturnAddress sp >+ if X86 or X86_WIN or X86_64 or X86_64_WIN >+ push cfr >+ if X86_64_WIN >+ emit ".pushreg rbp" >+ end >+ elsif ARM64 or ARM64E >+ push cfr, lr >+ elsif C_LOOP or C_LOOP_WIN or ARMv7 or MIPS >+ push lr >+ push cfr >+ end >+ move sp, cfr >+ if X86_64_WIN >+ emit ".setframe rbp, 0" >+ emit ".endprolog" >+ end >+end >+ >+macro functionPrologueForTrampoline() > tagReturnAddress sp > if X86 or X86_WIN or X86_64 or X86_64_WIN > push cfr >@@ -1273,6 +1293,9 @@ if not (C_LOOP or C_LOOP_WIN) > # void sanitizeStackForVMImpl(VM* vm) > global _sanitizeStackForVMImpl > _sanitizeStackForVMImpl: >+ if X86_64_WIN >+ emit ".endprolog" >+ end > tagReturnAddress sp > # We need three non-aliased caller-save registers. We are guaranteed > # this for a0, a1 and a2 on all architectures. >@@ -1300,6 +1323,9 @@ if not (C_LOOP or C_LOOP_WIN) > # VMEntryRecord* vmEntryRecord(const EntryFrame* entryFrame) > global _vmEntryRecord > _vmEntryRecord: >+ if X86_64_WIN >+ emit ".endprolog" >+ end > tagReturnAddress sp > if X86 or X86_WIN > loadp 4[sp], a0 >diff --git a/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm b/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm >index 903635af525..0fce8bfa0fa 100644 >--- a/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm >+++ b/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm >@@ -2088,7 +2088,7 @@ end) > > macro nativeCallTrampoline(executableOffsetToFunction) > >- functionPrologue() >+ functionPrologueForTrampoline() > storep 0, CodeBlock[cfr] > loadp Callee[cfr], t0 > andp MarkedBlockMask, t0, t1 >@@ -2128,7 +2128,7 @@ macro nativeCallTrampoline(executableOffsetToFunction) > end > > macro internalFunctionCallTrampoline(offsetOfFunction) >- functionPrologue() >+ functionPrologueForTrampoline() > storep 0, CodeBlock[cfr] > loadp Callee[cfr], t0 > andp MarkedBlockMask, t0, t1 >diff --git a/Source/JavaScriptCore/offlineasm/asm.rb b/Source/JavaScriptCore/offlineasm/asm.rb >index f96defc2d96..1b30ccd5a08 100644 >--- a/Source/JavaScriptCore/offlineasm/asm.rb >+++ b/Source/JavaScriptCore/offlineasm/asm.rb >@@ -65,6 +65,7 @@ class Assembler > @outp.puts "OFFLINE_ASM_GLOBAL_LABEL(llintPCRangeStart)" > else > putsProc("llintPCRangeStart", "") >+ @outp.puts ".endprolog" > putsProcEndIfNeeded > end > @state = :asm >@@ -77,6 +78,7 @@ class Assembler > @outp.puts "OFFLINE_ASM_GLOBAL_LABEL(llintPCRangeEnd)" > else > putsProc("llintPCRangeEnd", "") >+ @outp.puts ".endprolog" > putsProcEndIfNeeded > end > putsLastComment >@@ -200,7 +202,7 @@ class Assembler > > def putsProc(label, comment) > raise unless $emitWinAsm >- @outp.puts(formatDump("#{label} PROC PUBLIC", comment)) >+ @outp.puts(formatDump("#{label} PROC PUBLIC FRAME", comment)) > @lastlabel = label > end >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 199399
: 373312