Skip to content

Commit

Permalink
Implement get_text for Python USDT class
Browse files Browse the repository at this point in the history
  • Loading branch information
palmtenor committed Feb 10, 2018
1 parent e01c993 commit 918fad8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/python/bcc/usdt.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,11 @@ def enable_probe_or_bail(self, probe, fn_name):
def get_context(self):
return self.context

def get_text(self):
ctx_array = (ct.c_void_p * 1)()
ctx_array[0] = ct.c_void_p(self.context)
return lib.bcc_usdt_genargs(ctx_array, 1).decode()

def get_probe_arg_ctype(self, probe_name, arg_index):
return lib.bcc_usdt_get_probe_argctype(
self.context, probe_name, arg_index)
Expand Down

0 comments on commit 918fad8

Please sign in to comment.