本文整理汇总了Python中trace.Tracer.doInvokeFunction方法的典型用法代码示例。如果您正苦于以下问题:Python Tracer.doInvokeFunction方法的具体用法?Python Tracer.doInvokeFunction怎么用?Python Tracer.doInvokeFunction使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类trace.Tracer
的用法示例。
在下文中一共展示了Tracer.doInvokeFunction方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: doInvokeFunction
# 需要导入模块: from trace import Tracer [as 别名]
# 或者: from trace.Tracer import doInvokeFunction [as 别名]
def doInvokeFunction(self, function):
if function.name in self.getProcAddressFunctionNames:
nameArg = function.args[0].name
Tracer.doInvokeFunction(self, function)
# Replace function addresses with ours
# XXX: Doing this here instead of wrapRet means that the trace will
# contain the addresses of the wrapper functions, and not the real
# functions, but in practice this should make no difference.
print " _result = _wrapProcAddress(%s, _result);" % (nameArg,)
else:
Tracer.doInvokeFunction(self, function)
示例2: doInvokeFunction
# 需要导入模块: from trace import Tracer [as 别名]
# 或者: from trace.Tracer import doInvokeFunction [as 别名]
def doInvokeFunction(self, function):
# Same as invokeFunction() but called both when trace is enabled or disabled.
#
# Used to modify the behavior of GL entry-points.
# Override GL extensions
if function.name in ('glGetString', 'glGetIntegerv', 'glGetStringi'):
Tracer.doInvokeFunction(self, function, prefix = 'gltrace::_', suffix = '_override')
return
# We implement GL_EXT_debug_marker, GL_GREMEDY_*, etc., and not the
# driver
if function.name in self.marker_functions:
return
# We may be faking KHR_debug, so ensure the pointer queries result is
# always zeroed to prevent dereference of unitialized pointers
if function.name == 'glGetPointerv':
print ' if (params &&'
print ' (pname == GL_DEBUG_CALLBACK_FUNCTION ||'
print ' pname == GL_DEBUG_CALLBACK_USER_PARAM)) {'
print ' *params = NULL;'
print ' }'
if function.name in self.getProcAddressFunctionNames:
else_ = ''
for marker_function in self.marker_functions:
if self.api.getFunctionByName(marker_function):
print ' %sif (strcmp("%s", (const char *)%s) == 0) {' % (else_, marker_function, function.args[0].name)
print ' _result = (%s)&%s;' % (function.type, marker_function)
print ' }'
else_ = 'else '
print ' %s{' % else_
Tracer.doInvokeFunction(self, function)
# Replace function addresses with ours
# XXX: Doing this here instead of wrapRet means that the trace will
# contain the addresses of the wrapper functions, and not the real
# functions, but in practice this should make no difference.
if function.name in self.getProcAddressFunctionNames:
print ' _result = _wrapProcAddress(%s, _result);' % (function.args[0].name,)
print ' }'
return
Tracer.doInvokeFunction(self, function)
示例3: doInvokeFunction
# 需要导入模块: from trace import Tracer [as 别名]
# 或者: from trace.Tracer import doInvokeFunction [as 别名]
def doInvokeFunction(self, function):
# Same as invokeFunction() but called both when trace is enabled or disabled.
#
# Used to modify the behavior of GL entry-points.
# Override GL extensions
if function.name in ('glGetString', 'glGetIntegerv', 'glGetStringi'):
Tracer.doInvokeFunction(self, function, prefix = 'gltrace::_', suffix = '_override')
return
# We implement GL_EXT_debug_marker, GL_GREMEDY_*, etc., and not the
# driver
if function.name in self.marker_functions:
return
if function.name in self.getProcAddressFunctionNames:
else_ = ''
for marker_function in self.marker_functions:
if self.api.getFunctionByName(marker_function):
print ' %sif (strcmp("%s", (const char *)%s) == 0) {' % (else_, marker_function, function.args[0].name)
print ' _result = (%s)&%s;' % (function.type, marker_function)
print ' }'
else_ = 'else '
print ' %s{' % else_
Tracer.doInvokeFunction(self, function)
# Replace function addresses with ours
# XXX: Doing this here instead of wrapRet means that the trace will
# contain the addresses of the wrapper functions, and not the real
# functions, but in practice this should make no difference.
if function.name in self.getProcAddressFunctionNames:
print ' _result = _wrapProcAddress(%s, _result);' % (function.args[0].name,)
print ' }'
return
Tracer.doInvokeFunction(self, function)