Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1909)

Unified Diff: Tools/gdb/webkit.py

Issue 484003006: Update python script for gdb to track namespace change from WebCore to blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Tools/gdb/webkit.py
diff --git a/Tools/gdb/webkit.py b/Tools/gdb/webkit.py
index ef4680327d98324697d0310cdf5bbd0d1d411f4d..26fbec5b5d2d393efef43265a29363605532d520 100644
--- a/Tools/gdb/webkit.py
+++ b/Tools/gdb/webkit.py
@@ -171,14 +171,14 @@ class JSCJSStringPrinter(StringPrinter):
return WTFStringImplPrinter(self.val['m_value']).to_string()
-class WebCoreKURLPrinter(StringPrinter):
- "Print a WebCore::KURL"
+class blinkKURLPrinter(StringPrinter):
+ "Print a blink::KURL"
def to_string(self):
return WTFStringPrinter(self.val['m_string']).to_string()
-class WebCoreLayoutUnitPrinter:
- "Print a WebCore::LayoutUnit"
+class blinkLayoutUnitPrinter:
+ "Print a blink::LayoutUnit"
def __init__(self, val):
self.val = val
@@ -186,29 +186,29 @@ class WebCoreLayoutUnitPrinter:
return "%gpx" % (self.val['m_value'] / 64.0)
-class WebCoreLayoutSizePrinter:
- "Print a WebCore::LayoutSize"
+class blinkLayoutSizePrinter:
+ "Print a blink::LayoutSize"
def __init__(self, val):
self.val = val
def to_string(self):
- return 'LayoutSize(%s, %s)' % (WebCoreLayoutUnitPrinter(self.val['m_width']).to_string(), WebCoreLayoutUnitPrinter(self.val['m_height']).to_string())
+ return 'LayoutSize(%s, %s)' % (blinkLayoutUnitPrinter(self.val['m_width']).to_string(), blinkLayoutUnitPrinter(self.val['m_height']).to_string())
-class WebCoreLayoutPointPrinter:
- "Print a WebCore::LayoutPoint"
+class blinkLayoutPointPrinter:
+ "Print a blink::LayoutPoint"
def __init__(self, val):
self.val = val
def to_string(self):
- return 'LayoutPoint(%s, %s)' % (WebCoreLayoutUnitPrinter(self.val['m_x']).to_string(), WebCoreLayoutUnitPrinter(self.val['m_y']).to_string())
+ return 'LayoutPoint(%s, %s)' % (blinkLayoutUnitPrinter(self.val['m_x']).to_string(), blinkLayoutUnitPrinter(self.val['m_y']).to_string())
-class WebCoreQualifiedNamePrinter(StringPrinter):
- "Print a WebCore::QualifiedName"
+class blinkQualifiedNamePrinter(StringPrinter):
+ "Print a blink::QualifiedName"
def __init__(self, val):
- super(WebCoreQualifiedNamePrinter, self).__init__(val)
+ super(blinkQualifiedNamePrinter, self).__init__(val)
self.prefix_length = 0
self.length = 0
if self.val['m_impl']:
@@ -309,11 +309,11 @@ def add_pretty_printers():
(re.compile("^WTF::CString$"), WTFCStringPrinter),
(re.compile("^WTF::String$"), WTFStringPrinter),
(re.compile("^WTF::StringImpl$"), WTFStringImplPrinter),
- (re.compile("^WebCore::KURL$"), WebCoreKURLPrinter),
- (re.compile("^WebCore::LayoutUnit$"), WebCoreLayoutUnitPrinter),
- (re.compile("^WebCore::LayoutPoint$"), WebCoreLayoutPointPrinter),
- (re.compile("^WebCore::LayoutSize$"), WebCoreLayoutSizePrinter),
- (re.compile("^WebCore::QualifiedName$"), WebCoreQualifiedNamePrinter),
+ (re.compile("^blink::KURL$"), blinkKURLPrinter),
+ (re.compile("^blink::LayoutUnit$"), blinkLayoutUnitPrinter),
+ (re.compile("^blink::LayoutPoint$"), blinkLayoutPointPrinter),
+ (re.compile("^blink::LayoutSize$"), blinkLayoutSizePrinter),
+ (re.compile("^blink::QualifiedName$"), blinkQualifiedNamePrinter),
(re.compile("^JSC::Identifier$"), JSCIdentifierPrinter),
(re.compile("^JSC::JSString$"), JSCJSStringPrinter),
)
@@ -355,8 +355,8 @@ class PrintPathToRootCommand(gdb.Command):
gdb.COMPLETE_NONE)
def invoke(self, arg, from_tty):
- element_type = gdb.lookup_type('WebCore::Element')
- node_type = gdb.lookup_type('WebCore::Node')
+ element_type = gdb.lookup_type('blink::Element')
+ node_type = gdb.lookup_type('blink::Node')
frame = gdb.selected_frame()
try:
val = gdb.Frame.read_var(frame, arg)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698