WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
ASSIGNED
65574
Addition to Tools/gdb/webkit.py to view graph of loader-related objects
https://bugs.webkit.org/show_bug.cgi?id=65574
Summary
Addition to Tools/gdb/webkit.py to view graph of loader-related objects
Scott Graham
Reported
2011-08-02 14:24:32 PDT
GDB Python script that outputs a diagram of a subset of fields for each object, and the graph of connected objects. Generic code, can be used for other subsystems, along with one concrete gdb command "viewloadergraph" which works on xxxLoader and related.
Attachments
Patch
(6.18 KB, patch)
2011-08-02 14:33 PDT
,
Scott Graham
ojan
: review-
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Scott Graham
Comment 1
2011-08-02 14:33:38 PDT
Created
attachment 102701
[details]
Patch
WebKit Review Bot
Comment 2
2011-08-02 14:36:27 PDT
Attachment 102701
[details]
did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Tools/ChangeLog', u'Tools/gdb/webkit.py']" exit_code: 1 Tools/gdb/webkit.py:424: missing whitespace around operator [pep8/E225] [5] Tools/gdb/webkit.py:431: missing whitespace around operator [pep8/E225] [5] Tools/gdb/webkit.py:432: missing whitespace around operator [pep8/E225] [5] Tools/gdb/webkit.py:438: whitespace before '}' [pep8/E202] [5] Tools/gdb/webkit.py:452: whitespace before ']' [pep8/E202] [5] Total errors found: 5 in 2 files If any of these errors are false positives, please file a bug against check-webkit-style.
Hajime Morrita
Comment 3
2011-08-18 22:26:35 PDT
CC-ed one who knows it well.
Hayato Ito
Comment 4
2011-08-18 23:38:23 PDT
Comment on
attachment 102701
[details]
Patch Looks very useful command. Could you upload a sample png or a dot file? I'd like to see it. Some minor comments follows. View in context:
https://bugs.webkit.org/attachment.cgi?id=102701&action=review
> Tools/gdb/webkit.py:41 > +import os
Please sort this lexicologically.
> Tools/gdb/webkit.py:354 > + self.ptr_type = gdb.lookup_type('void').pointer()
Is this member variable used?
> Tools/gdb/webkit.py:357 > + return label.replace('\\', '\\\\').replace('"', '\\"')
Can you use a raw string here? (r'\', r'\\' instead of '\\', '\\\\').
> Tools/gdb/webkit.py:366 > + conns = []
Could you avoid abbreviations? I think we don't have a clear style guide for gdb's Python script. But it should be better to avoid abbreviations, following other Python scripts used in WebKit.
> Tools/gdb/webkit.py:369 > + if target_type in self.typemap:
Could you early exit here to reduce the indent level?
> Tools/gdb/webkit.py:376 > + fieldsidx = 0
Could you use fields_idx instead of fields_idx?
> Tools/gdb/webkit.py:377 > + prefixchar = '.'
Could you use prefix_char?
>> Tools/gdb/webkit.py:424 >> + print >>f, """digraph g { > > missing whitespace around operator [pep8/E225] [5]
Could you use f.write(...) instead of print statement?
Ojan Vafai
Comment 5
2012-04-19 15:30:45 PDT
Comment on
attachment 102701
[details]
Patch r- per unaddressed comments in
comment 4
.
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