X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=retrace%2Fretrace.py;h=c4ad2d2bb494aceb861dcf163818bb702af58622;hb=4f49d21974343e282dbbe784ccc36ae29ddcbcfc;hp=5b5812faa101feb04c651608c24561bf22d9f0af;hpb=43fb29ecbf20b773fdca3179a38958930a4f4c0b;p=apitrace diff --git a/retrace/retrace.py b/retrace/retrace.py index 5b5812f..c4ad2d2 100644 --- a/retrace/retrace.py +++ b/retrace/retrace.py @@ -434,6 +434,7 @@ class Retracer: if function.type is not stdapi.Void: print ' _result = %s(%s);' % (function.name, arg_names) print ' (void)_result;' + self.checkResult(function.type) else: print ' %s(%s);' % (function.name, arg_names) @@ -450,9 +451,16 @@ class Retracer: if method.type is not stdapi.Void: print ' _result = _this->%s(%s);' % (method.name, arg_names) print ' (void)_result;' + self.checkResult(method.type) else: print ' _this->%s(%s);' % (method.name, arg_names) + def checkResult(self, resultType): + if str(resultType) == 'HRESULT': + print r' if (FAILED(_result)) {' + print r' retrace::warning(call) << "failed\n";' + print r' }' + def filterFunction(self, function): return True