(self, addr: int, is_syscall: bool=None, anyaddr: bool=False,
                     force_fastpath: bool=False)
return None
Get an arbitrary CFGNode (without considering their contexts) from our graph.

        :param addr:            Address of the beginning of the basic block. Set anyaddr to True to support arbitrary
                                address.
        :param is_syscall:      Whether you want to get the syscall node or any other node. This is due to the fact that
                                syscall SimProcedures have the same address as the targer it returns to.
                                None means get either, True means get a syscall node, False means get something that
                                isn't a syscall node.
        :param anyaddr:         If anyaddr is True, then addr doesn't have to be the beginning address of a basic
                                block. By default the entire graph.nodes() will be iterated, and the first node
                                containing the specific address is returned, which can be slow.
        :param force_fastpath:  If force_fastpath is True, it will only perform a dict lookup in the _nodes_by_addr
                                dict.
        :return:                A CFGNode if there is any that satisfies given conditions, or None otherwise
Get an arbitrary CFGNode (without considering their contexts) from our graph.
Get an arbitrary CFGNode ( without considering their contexts ) from our graph .
def get_any_node(self, addr: int, is_syscall: bool=None, anyaddr: bool=False,
                     force_fastpath: bool=False) -> Optional[CFGNode]:
        """
        Get an arbitrary CFGNode (without considering their contexts) from our graph.

        :param addr:            Address of the beginning of the basic block. Set anyaddr to True to support arbitrary
                                address.
        :param is_syscall:      Whether you want to get the syscall node or any other node. This is due to the fact that
                                syscall SimProcedures have the same address as the targer it returns to.
                                None means get either, True means get a syscall node, False means get something that
                                isn't a syscall node.
        :param anyaddr:         If anyaddr is True, then addr doesn't have to be the beginning address of a basic
                                block. By default the entire graph.nodes() will be iterated, and the first node
                                containing the specific address is returned, which can be slow.
        :param force_fastpath:  If force_fastpath is True, it will only perform a dict lookup in the _nodes_by_addr
                                dict.
        :return:                A CFGNode if there is any that satisfies given conditions, or None otherwise
        """

        # fastpath: directly look in the nodes list
        if not anyaddr or addr in self._nodes_by_addr:
            try:
                return self._nodes_by_addr[addr][0]
            except (KeyError, IndexError):
                pass

        if force_fastpath:
            return None

        if isinstance(addr, int):
            # slower path
            # find all potential addresses that the block may cover
            pos = bisect.bisect_left(self._node_addrs, max(addr - 400, 0))

            is_cfgemulated = self.ident == "CFGEmulated"

            while pos < len(self._node_addrs):
                n = self._nodes_by_addr[self._node_addrs[pos]][0]
                if n.addr > addr:
                    break

                if is_cfgemulated:
                    cond = n.looping_times == 0
                else:
                    cond = True
                if anyaddr and n.size is not None:
                    cond = cond and (addr == n.addr or n.addr <= addr < n.addr + n.size)
                else:
                    cond = cond and (addr == n.addr)
                if cond:
                    if is_syscall is None:
                        return n
                    if n.is_syscall == is_syscall:
                        return n

                pos += 1

        return None
def get_any_node ( self , addr : int , is_syscall : bool = None , anyaddr : bool = False , force_fastpath : bool = False ) -> Optional [ CFGNode ] : # fastpath: directly look in the nodes list if not anyaddr or addr in self . _nodes_by_addr : try : return self . _nodes_by_addr [ addr ] [ 0 ] except ( KeyError , IndexError ) : pass if force_fastpath : return None if isinstance ( addr , int ) : # slower path # find all potential addresses that the block may cover pos = bisect . bisect_left ( self . _node_addrs , max ( addr - 400 , 0 ) ) is_cfgemulated = self . ident == "CFGEmulated" while pos < len ( self . _node_addrs ) : n = self . _nodes_by_addr [ self . _node_addrs [ pos ] ] [ 0 ] if n . addr > addr : break if is_cfgemulated : cond = n . looping_times == 0 else : cond = True if anyaddr and n . size is not None : cond = cond and ( addr == n . addr or n . addr <= addr < n . addr + n . size ) else : cond = cond and ( addr == n . addr ) if cond : if is_syscall is None : return n if n . is_syscall == is_syscall : return n pos += 1 return None