summaryrefslogtreecommitdiff
path: root/src/gallium/state_trackers/python/retrace/parser.py
diff options
context:
space:
mode:
authorJosé Fonseca <jrfonseca@tungstengraphics.com>2008-11-19 17:17:06 +0900
committerJosé Fonseca <jrfonseca@tungstengraphics.com>2008-11-19 17:17:06 +0900
commit56ce90c8bee057cf69ba653adf57aa401d51c240 (patch)
tree4b5f4853965732a7e0161ce1df29be862fbf32d8 /src/gallium/state_trackers/python/retrace/parser.py
parent9efa6cafea8176eb867bf820ea82a46ad45bfc15 (diff)
python/retrace: Highlight the trace dump to help to visualize.
Diffstat (limited to 'src/gallium/state_trackers/python/retrace/parser.py')
-rwxr-xr-xsrc/gallium/state_trackers/python/retrace/parser.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gallium/state_trackers/python/retrace/parser.py b/src/gallium/state_trackers/python/retrace/parser.py
index e5e8525dfc..5205f2d8dd 100755
--- a/src/gallium/state_trackers/python/retrace/parser.py
+++ b/src/gallium/state_trackers/python/retrace/parser.py
@@ -327,15 +327,19 @@ class TraceParser(XmlParser):
return Pointer(address)
def handle_call(self, call):
-
pass
class TraceDumper(TraceParser):
+ def __init__(self, fp):
+ TraceParser.__init__(self, fp)
+ self.formatter = format.DefaultFormatter(sys.stdout)
+ self.pretty_printer = PrettyPrinter(self.formatter)
def handle_call(self, call):
- print call
+ call.visit(self.pretty_printer)
+ self.formatter.newline()
def main(ParserFactory):