Ejemplo n.º 1
0
    def process_arg(self, stream, options):
        if options.plain:
            formatter = format.Formatter(sys.stdout)
        else:
            formatter = format.DefaultFormatter(sys.stdout)

        parser = TraceDumper(stream, options, formatter)
        parser.parse()

        if options.named_ptrs:
            parser.dump_calls()
Ejemplo n.º 2
0
    def process_arg(self, stream, options):
        if options.plain:
            formatter = format.Formatter(sys.stdout)
        else:
            formatter = format.DefaultFormatter(sys.stdout)

        dump = TraceDumper(stream, options, formatter, TraceStateData())
        dump.parse()

        if options.named_ptrs:
            for call in dump.call_stack:
                call.visit(dump.pretty_printer)
Ejemplo n.º 3
0
 def __str__(self):
     stream = StringIO()
     formatter = format.DefaultFormatter(stream)
     pretty_printer = PrettyPrinter(formatter)
     self.visit(pretty_printer)
     return stream.getvalue()