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.

Classes:

Functions:

Attributes:

T module-attribute ¤

T = TypeVar('T')

P module-attribute ¤

P = ParamSpec('P')

debug module-attribute ¤

debug = NO_DEBUG

debug_name module-attribute ¤

debug_name = 'regs'

Cache module-attribute ¤

Cache = Union[Dict[Tuple[Any, ...], Any], DebugCacheDict]

IS_CACHING module-attribute ¤

IS_CACHING = True

IS_CACHING_DISABLED_FOR 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,
}

DebugCacheDict ¤

DebugCacheDict(func: Callable[P, T], *args: Any, **kwargs: Any)

Bases: UserDict

Methods:

Attributes:

hits instance-attribute ¤

hits = 0

misses instance-attribute ¤

misses = 0

func instance-attribute ¤

func = func

name instance-attribute ¤

name = f'{split('.')[-1]}.{__name__}'

__getitem__ ¤

__getitem__(key: tuple[Any, ...]) -> Any

__setitem__ ¤

__setitem__(key: tuple[Any, ...], value: Any) -> None

clear ¤

clear() -> None

connect_clear_caching_events ¤

connect_clear_caching_events(
    event_dicts: dict[str, tuple[Any, ...]], **kwargs: Any
) -> None

Connect given debugger event hooks to correspoonding _CacheUntilEvent instances

cache_until ¤

cache_until(
    *event_names: str,
) -> Callable[[Callable[P, T]], Callable[P, T]]

clear_caches ¤

clear_caches() -> None

clear_cache ¤

clear_cache(cache_name: str) -> None