[docs]classNamedRegion(Backend):""" A NamedRegion represents a region of memory that has a name, a location, but no static content. This region also has permissions; with no memory, these obviously don't do anything on their own, but they help inform any other code that relies on CLE (e.g., angr) This can be used as a placeholder for memory that should exist in CLE's view, but for which it does not need data, like RAM, MMIO, etc """is_default=False# This backend must be constructed manually (or by angr)has_memory=False# This backend, by definition, has no memory backer
[docs]def__init__(self,name,start,end,is_readable=True,is_writable=True,is_executable=False,**kwargs):""" Create a NamedRegion. :param name: The name of the region :param start: The start address of the region :param end: The end address (exclusive) of the region :param is_readable: Whether the region is readable :param is_writable: Whether the region is writable :param is_executable: Whether the region is executable :param kwargs: """self.name=namesuper().__init__(name,None,**kwargs)self._min_addr=startself.linked_base=startself._max_addr=endself.has_memory=Falses=EmptySegment(start,end-start,is_readable,is_writable,is_executable)self.segments.append(s)