def callmask(self): if self.options.has_key('call'): mask = {} for c in self.options['call']: mask[c] = 1 return mask elif self.options.has_key('ignore'): mask = syscallmap.full_mask() for c in self.options['ignore']: del mask[c] return mask else: return None
def get_callmask(self): if self.ignore_calls: mask = syscallmap.full_mask() for c in self.ignore_calls: del mask[c] # we are not interested in this call return mask elif self.watch_calls: # just an optimization assert not self.ignore_calls, "both ignored and watched" mask = {} for states in self._states.keys(): for c in self._states[states].keys() + self.watch_calls: mask[c] = 1 # so we won't bother with uninteresting calls return mask return None # investigate all