Skip to content

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.

Cache = Union[Dict[Tuple[Any, ...], Any], DebugCacheDict] module-attribute

IS_CACHING = True module-attribute

IS_CACHING_DISABLED_FOR: Dict[str, bool] = {'stop': False, 'exit': False, 'objfile': False, 'start': False, 'cont': False, 'thread': False, 'prompt': False, 'forever': False} module-attribute

P = ParamSpec('P') module-attribute

T = TypeVar('T') module-attribute

debug = NO_DEBUG module-attribute

debug_name = 'regs' module-attribute

DebugCacheDict

Bases: UserDict

func = func instance-attribute

hits = 0 instance-attribute

misses = 0 instance-attribute

name = f'{func.__module__.split('.')[-1]}.{func.__name__}' instance-attribute

__getitem__(key)

__init__(func, *args, **kwargs)

__setitem__(key, value)

clear()

cache_until(*event_names)

clear_cache(cache_name)

clear_caches()

connect_clear_caching_events(event_dicts, **kwargs)

Connect given debugger event hooks to correspoonding _CacheUntilEvent instances