Example #1
0
    def __getitem__(self, item):
        if isinstance(self.env.event, (event.function_exit, event.function_entry)):
            f = self.env.function_name
        elif isinstance(self.env.event, (event.syscall_exit, event.syscall_entry)):
            f = self.env.syscall_name
        else:
            raise Exception()

        return prototype.peek_argument(self.env, f, item)
Example #2
0
    def __getattr__(self, item):
        if item == "retval":
            if isinstance(self.env.event, event.function_exit):
                f = self.env.function_name
            elif isinstance(self.env.event, event.syscall_exit):
                f = self.env.syscall_name
            else:
                raise Exception()

            return prototype.peek_argument(self.env, f, -1)

        raise Exception()