X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=retrace.py;h=392519b02739e6abcf1d6b3364e1940c2c3b032b;hb=ebf971eec6c3a5f98885cc418e04690ba213b645;hp=a9c5b4d41f8cd84158678ba59bbdc654a5842129;hpb=974a3fbc44f21b738830e1b031d6d3c7587856ae;p=apitrace diff --git a/retrace.py b/retrace.py index a9c5b4d..392519b 100644 --- a/retrace.py +++ b/retrace.py @@ -190,6 +190,7 @@ class Retracer: def retrace_function_body(self, function): if not function.sideeffects: + print ' (void)call;' return success = True @@ -205,7 +206,9 @@ class Retracer: success = False print ' %s = 0; // FIXME' % arg.name if not success: + print ' if (1) {' self.fail_function(function) + print ' }' self.call_function(function) for arg in function.args: if arg.output: @@ -231,6 +234,9 @@ class Retracer: def extract_arg(self, function, arg, arg_type, lvalue, rvalue): ValueExtractor().visit(arg_type, lvalue, rvalue) + + def extract_opaque_arg(self, function, arg, arg_type, lvalue, rvalue): + OpaqueValueExtractor().visit(arg_type, lvalue, rvalue) def call_function(self, function): arg_names = ", ".join([arg.name for arg in function.args]) @@ -251,7 +257,7 @@ class Retracer: self.retrace_function(function) print 'void retrace::retrace_call(Trace::Call &call) {' - print ' const char *name = call.name().c_str();' + print ' const char *name = call.name();' print func_dict = dict([(function.name, function) for function in functions])