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

Method refresh

windows/debug/symbols.py:668–691  ·  view source on GitHub ↗

Update the list of loaded modules to match the modules present in the target process .. note:: This function only call `SymRefreshModuleList `_ for now. It seems that this fun

(self)

Source from the content-addressed store, hash-verified

666 return self.load_module(addr=mod.baseaddr, path=mod.fullname)
667
668 def refresh(self):
669 """Update the list of loaded modules to match the modules present in the target process
670
671 .. note::
672 This function only call `SymRefreshModuleList <https://docs.microsoft.com/en-us/windows/win32/api/dbghelp/nf-dbghelp-symrefreshmodulelist>`_ for now.
673 It seems that this function do not handle refreshing a 64b target from a 32b python
674
675 Also, on a 32b target from a 64b python it seems to only load symbols for the 64b modules (ntdll + syswow dll)
676
677 Exemple:
678
679 >>> sh = windows.debug.symbols.ProcessSymbolHandler(windows.test.pop_proc_64())
680 >>> sh.modules
681 []
682 >>> sh.refresh()
683 44
684 >>> sh.modules
685 [<SymbolModule name="notepad" type=SymDeferred pdb="" addr=0x7ff772b80000>,
686 <SymbolModule name="ntdll" type=SymDeferred pdb="" addr=0x7ffb5d860000>,
687 <SymbolModule name="KERNEL32" type=SymDeferred pdb="" addr=0x7ffb5bb90000>,
688 <SymbolModule name="KERNELBASE" type=SymDeferred pdb="" addr=0x7ffb5b090000>,
689 ...]
690 """
691 return windows.winproxy.SymRefreshModuleList(self.handle)
692
693
694 def stackwalk(self, ctx):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected