def pop_from_stack_section(args):
 if (len(args) == 0):
  return ''
 parts = []
 for idx in xrange(len(args)):
  parts.append(('self->arg%d = self->arguments_stack[self->deeplevel, "arg%d"];\n DCTB self->arguments_stack[self->deeplevel, "arg%d"] = 0;' % (idx, idx, idx)))
 parts.append('--self->deeplevel;')
 return ('\n DCTB ' + '\n DCTB '.join(parts))

def pop_from_stack_section ( args ) : if ( len ( args ) == 0 ) : return '' parts = [ ] for idx in xrange ( len ( args ) ) : parts . append ( ( 'self->arg%d = self->arguments_stack[self->deeplevel, "arg%d"];\n DCTB self->arguments_stack[self->deeplevel, "arg%d"] = 0;' % ( idx , idx , idx ) ) ) parts . append ( '--self->deeplevel;' ) return ( '\n DCTB ' + '\n DCTB ' . join ( parts ) )
composes a "pop arguments from stack" section of a return pid dtrace probe .