WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
162585
Cannot run dump-class-layout; dies with "global name 'lldb' is not defined"
https://bugs.webkit.org/show_bug.cgi?id=162585
Summary
Cannot run dump-class-layout; dies with "global name 'lldb' is not defined"
Daniel Bates
Reported
2016-09-26 17:26:30 PDT
When I ran dump-class-layout today (09/26) to see the object size of ResourceHandle it died with the following traceback: [[ $ Tools/Scripts/dump-class-layout -c Debug WebCore ResourceHandle Traceback (most recent call last): File "Tools/Scripts/dump-class-layout", line 169, in <module> main() File "Tools/Scripts/dump-class-layout", line 166, in main dump_class(target_path, args.classname) File "Tools/Scripts/dump-class-layout", line 120, in dump_class debugger = lldb.SBDebugger.Create() NameError: global name 'lldb' is not defined ]] I am using Python 2.7.10.
Attachments
Patch
(2.52 KB, patch)
2016-09-26 17:45 PDT
,
Daniel Bates
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Daniel Bates
Comment 1
2016-09-26 17:33:01 PDT
We import the lldb inside the function import_lldb() in dump-class-layout on line 48, <
https://trac.webkit.org/browser/trunk/Tools/Scripts/dump-class-layout?rev=188350#L48
>. By (2) of <
https://docs.python.org/2/reference/simple_stmts.html#import
>, the names from the imported module are defined "in the local namespace (of the scope where the import statement occurs)". And each function creates a local namespace by <
https://docs.python.org/2/tutorial/classes.html#python-scopes-and-namespaces
>. Therefore, import_lldb() does not import the lldb module into the global namespace.
Daniel Bates
Comment 2
2016-09-26 17:45:51 PDT
Created
attachment 289896
[details]
Patch
Daniel Bates
Comment 3
2016-09-27 10:21:16 PDT
Comment on
attachment 289896
[details]
Patch Clearing flags on attachment: 289896 Committed
r206441
: <
http://trac.webkit.org/changeset/206441
>
Daniel Bates
Comment 4
2016-09-27 10:21:20 PDT
All reviewed patches have been landed. Closing bug.
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