44 """Function decorator to allow the use of .func_args_*() methods
45 with either the number of arguments or the list of the argument
48 The wrapper is also used to log the argument values.
54 def newfunc(self, args):
55 if isinstance(args, Sequence):
56 ret_ad, arg_vals = func(self, len(args))
57 arg_vals = namedtuple(
"args", args)(*arg_vals)
59 log_func.info(
'%s(%s) ret addr: %s',
61 ', '.join(
"%s=0x%x" % (field, value)
62 for field, value
in arg_vals._asdict().iteritems()),
64 return ret_ad, namedtuple(
"args", args)(*arg_vals)
66 ret_ad, arg_vals = func(self, args)
68 log_func.info(
'%s(%s) ret addr: %s',
70 ', '.join(hex(arg)
for arg
in arg_vals),
72 return ret_ad, arg_vals