WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
152703
offlineasm: Emit Dwarf2 file and location directives to allow for debugging .asm files
https://bugs.webkit.org/show_bug.cgi?id=152703
Summary
offlineasm: Emit Dwarf2 file and location directives to allow for debugging ....
Michael Saboff
Reported
2016-01-04 11:30:50 PST
If the offline assembler added .file and .loc Dwarf2 directives, we can do source level debugging of the LLInt .asm files. For example: (lldb) Process 55150 stopped * thread #1: tid = 0xc9de2a, 0x0000000100ada5cf JavaScriptCore`llint_entry + 7403 at LowLevelInterpreter64.asm:796, queue = 'com.apple.main-thread', stop reason = step over frame #0: 0x0000000100ada5cf JavaScriptCore`llint_entry + 7403 at LowLevelInterpreter64.asm:796 793 loadq [cfr, t0, 8], t1 794 bqb t1, tagTypeNumber, .slow 795 arithmeticOperation(t1, .slow) -> 796 orq tagTypeNumber, t1 797 storeq t1, [cfr, t0, 8] 798 dispatch(2) 799 (lldb) n Process 55150 stopped * thread #1: tid = 0xc9de2a, 0x0000000100ada5d2 JavaScriptCore`llint_entry + 7406 at LowLevelInterpreter64.asm:797, queue = 'com.apple.main-thread', stop reason = step over frame #0: 0x0000000100ada5d2 JavaScriptCore`llint_entry + 7406 at LowLevelInterpreter64.asm:797 794 bqb t1, tagTypeNumber, .slow 795 arithmeticOperation(t1, .slow) 796 orq tagTypeNumber, t1 -> 797 storeq t1, [cfr, t0, 8] 798 dispatch(2) 799 800 .slow: (lldb) bt 6 * thread #1: tid = 0xc9de2a, 0x0000000100ada5d2 JavaScriptCore`llint_entry + 7406 at LowLevelInterpreter64.asm:797, queue = 'com.apple.main-thread', stop reason = step over * frame #0: 0x0000000100ada5d2 JavaScriptCore`llint_entry + 7406 at LowLevelInterpreter64.asm:797 frame #1: 0x0000001000000001 frame #2: 0x0000000100adf138 JavaScriptCore`llint_entry + 26708 at LowLevelInterpreter.asm:726 frame #3: 0x0000000100ad86ce JavaScriptCore`vmEntryToJavaScript + 334 at LowLevelInterpreter64.asm:249 frame #4: 0x000000010090ec35 JavaScriptCore`JSC::JITCode::execute(this=0x00000001069a2258, vm=0x0000000106c01000, protoCallFrame=0x00007fff5fbfa898) + 213 at JITCode.cpp:80 frame #5: 0x00000001008d6147 JavaScriptCore`JSC::Interpreter::execute(this=0x0000000103bf8548, program=0x0000000106896900, callFrame=0x00000001068a3740, thisObj=0x00000001068c9ac0) + 4471 at Interpreter.cpp:975 (lldb) This change is dependent on fixing a bug in the Clang toolchain. That bug is tracked in <
rdar://problem/22690666
>
Attachments
Patch
(9.42 KB, patch)
2016-01-04 11:36 PST
,
Michael Saboff
ggaren
: review-
Details
Formatted Diff
Diff
Updated patch
(11.63 KB, patch)
2016-01-04 16:22 PST
,
Michael Saboff
mark.lam
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Michael Saboff
Comment 1
2016-01-04 11:36:30 PST
Created
attachment 268208
[details]
Patch This patch cannot be landed or enabled without the fix needed for Clang to support multiple .file directives from inlined assembly.
Michael Saboff
Comment 2
2016-01-04 12:06:30 PST
(In reply to
comment #1
)
> Created
attachment 268208
[details]
> Patch > > This patch cannot be landed or enabled without the fix needed for Clang to > support multiple .file directives from inlined assembly.
This patch could be landed with $enableDebugAnnotations = false in config.rb.
Geoffrey Garen
Comment 3
2016-01-04 15:16:16 PST
Comment on
attachment 268208
[details]
Patch Generating ../../DerivedSources/JavaScriptCore/LowLevelInterpreterWin.asm Assembling C:\cygwin\home\buildbot\WebKit\WebKitBuild\Release\DerivedSources\JavaScriptCore\LowLevelInterpreterWin.asm... reterWin.asm(5): error A2071: initializer magnitude too large for specified size [C:\cygwin\home\buildbot\WebKit\WebKitBuild\Release\Source\JavaScriptCore\JavaScriptCore.vcxproj] MASM : error A2109: only white space or comment can follow backslash [C:\cygwin\home\buildbot\WebKit\WebKitBuild\Release\Source\JavaScriptCore\JavaScriptCore.vcxproj] reterWin.asm(7): error A2071: initializer magnitude too large for specified size [C:\cygwin\home\buildbot\WebKit\WebKitBuild\Release\Source\JavaScriptCore\JavaScriptCore.vcxproj] MASM : error A2109: only white space or comment can follow backslash [C:\cygwin\home\buildbot\WebKit\WebKitBuild\Release\Source\JavaScriptCore\JavaScriptCore.vcxproj] reterWin.asm(9): error A2071: initializer magnitude too large for specified size [C:\cygwin\home\buildbot\WebKit\WebKitBuild\Release\Source\JavaScriptCore\JavaScriptCore.vcxproj] MASM : error A2109: only white space or comment can follow backslash [C:\cygwin\home\buildbot\WebKit\WebKitBuild\Release\Source\JavaScriptCore\JavaScriptCore.vcxproj] reterWin.asm(11): error A2071: initializer magnitude too large for specified size [C:\cygwin\home\buildbot\WebKit\WebKitBuild\Release\Source\JavaScriptCore\JavaScriptCore.vcxproj] MASM : error A2109: only white space or comment can follow backslash [C:\cygwin\home\buildbot\WebKit\WebKitBuild\Release\Source\JavaScriptCore\JavaScriptCore.vcxproj]
Michael Saboff
Comment 4
2016-01-04 16:22:31 PST
Created
attachment 268246
[details]
Updated patch Fixed windows issue. Turned off debug annotations. To be turned on when clang bug is fixed.
Csaba Osztrogonác
Comment 5
2016-01-12 07:15:56 PST
Comment on
attachment 268246
[details]
Updated patch View in context:
https://bugs.webkit.org/attachment.cgi?id=268246&action=review
> Source/JavaScriptCore/offlineasm/arm64.rb:1 > +# Copyright (C) 2011, 2012, 2014, 2015, 2106 Apple Inc. All rights reserved.
typo: 2106 -> 2016
> Source/JavaScriptCore/offlineasm/arm.rb:1 > +# Copyright (C) 2011, 2012, 2015, 2106 Apple Inc. All rights reserved.
ditto
Michael Saboff
Comment 6
2016-01-12 11:03:24 PST
(In reply to
comment #5
)
> Comment on
attachment 268246
[details]
> Updated patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=268246&action=review
> > > Source/JavaScriptCore/offlineasm/arm64.rb:1 > > +# Copyright (C) 2011, 2012, 2014, 2015, 2106 Apple Inc. All rights reserved. > > typo: 2106 -> 2016 > > > Source/JavaScriptCore/offlineasm/arm.rb:1 > > +# Copyright (C) 2011, 2012, 2015, 2106 Apple Inc. All rights reserved. > > ditto
Just thinking ahead ;) Fixed locally.
Mark Lam
Comment 7
2016-02-12 10:41:32 PST
Comment on
attachment 268246
[details]
Updated patch View in context:
https://bugs.webkit.org/attachment.cgi?id=268246&action=review
r=me
>>> Source/JavaScriptCore/offlineasm/arm64.rb:1 >>> +# Copyright (C) 2011, 2012, 2014, 2015, 2106 Apple Inc. All rights reserved. >> >> typo: 2106 -> 2016 > > Just thinking ahead ;) > > Fixed locally.
FYI, for brevity, you can use "2014-2016" instead of "2014, 2015, 2016".
Michael Saboff
Comment 8
2016-02-12 18:37:17 PST
Committed
r196541
: <
http://trac.webkit.org/changeset/196541
>
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