MCPcopy Create free account
hub / github.com/ELMERIKH/PyinMemoryPE / dump

Method dump

pythonmemorymodule/pefile.py:1902–1927  ·  view source on GitHub ↗
(self, indentation=0)

Source from the content-addressed store, hash-verified

1900 return None
1901
1902 def dump(self, indentation=0):
1903 # Because __keys_ext__ are shared among all the instances with the same
1904 # format string, we have to add and sunsequently remove the optional field
1905 # each time.
1906 # It saves space (as compared to keeping a copy self.__keys_ext__ per
1907 # UnwindInfo instance), but makes our dump() implementation thread-unsafe.
1908 if self._opt_field_name != None:
1909 self.__field_offsets__[self._opt_field_name] = (
1910 self._full_size - STRUCT_SIZEOF_TYPES["I"]
1911 )
1912 self.__keys_ext__.append([self._opt_field_name])
1913 try:
1914 dump = super(UnwindInfo, self).dump(indentation)
1915 finally:
1916 if self._opt_field_name != None:
1917 self.__keys_ext__.pop()
1918
1919 dump.append(
1920 "Flags: "
1921 + ", ".join([s[0] for s in unwind_info_flags if getattr(self, s[0])])
1922 )
1923 dump.append(
1924 "Unwind codes: "
1925 + "; ".join([str(c) for c in self.UnwindCodes if c.is_valid()])
1926 )
1927 return dump
1928
1929 def dump_dict(self):
1930 if self._opt_field_name != None:

Callers

nothing calls this directly

Calls 2

dumpMethod · 0.45
is_validMethod · 0.45

Tested by

no test coverage detected