cache ¤
Caches return values until some event in the inferior happens, e.g. execution stops because of a SIGINT or breakpoint, or a new library/objfile are loaded, etc.
Classes:
-
DebugCacheDict– -
CachedFunction– -
CacheUntilEvent–Not necessarily 1:1 with pwndbg.dbg_mod.EventTypes , but
Functions:
-
events_to_event_set– -
connect_clear_caching_events–Connect given debugger event hooks to corresponding _CacheUntilEvent instances
-
cache_until–All possible values of the function arguments must be hashable
-
clear_caches– -
clear_cache–
Attributes:
-
T– -
P– -
debug– -
debug_name– -
Cache– -
EventSet– -
IS_CACHING– -
IS_CACHING_DISABLED_FOR(EventSet) –
DebugCacheDict ¤
CachedFunction ¤
CacheUntilEvent ¤
Bases: IntFlag
Not necessarily 1:1 with pwndbg.dbg_mod.EventTypes , but read the definition of that enum to get an idea of how these work.
Notably, STOP is also triggered when the user changes debugee memory or register state.
Attributes:
connect_clear_caching_events ¤
connect_clear_caching_events(
event_dicts: dict[CacheUntilEvent, tuple[Any, ...]],
) -> None
Connect given debugger event hooks to corresponding _CacheUntilEvent instances
cache_until ¤
cache_until(
*event_names: str,
) -> Callable[[Callable[P, T]], CachedFunction[T]]
All possible values of the function arguments must be hashable (so e.g. var: MyUnhashableType | None = None is not allowed, but may fail rarely). The return value of the function should not be mutable, must not be mutated.