|
|
|
@ -6,7 +6,6 @@ e.g. execution stops because of a SIGINT or breakpoint, or a
|
|
|
|
new library/objfile are loaded, etc.
|
|
|
|
new library/objfile are loaded, etc.
|
|
|
|
"""
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
|
|
import collections
|
|
|
|
|
|
|
|
import functools
|
|
|
|
import functools
|
|
|
|
import sys
|
|
|
|
import sys
|
|
|
|
|
|
|
|
|
|
|
|
@ -14,6 +13,13 @@ import gdb
|
|
|
|
|
|
|
|
|
|
|
|
import pwndbg.events
|
|
|
|
import pwndbg.events
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
try:
|
|
|
|
|
|
|
|
# Python >= 3.10
|
|
|
|
|
|
|
|
from collections.abc import Hashable
|
|
|
|
|
|
|
|
except ImportError:
|
|
|
|
|
|
|
|
# Python < 3.10
|
|
|
|
|
|
|
|
from collections import Hashable
|
|
|
|
|
|
|
|
|
|
|
|
debug = False
|
|
|
|
debug = False
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -32,7 +38,7 @@ class memoize:
|
|
|
|
def __call__(self, *args, **kwargs):
|
|
|
|
def __call__(self, *args, **kwargs):
|
|
|
|
how = None
|
|
|
|
how = None
|
|
|
|
|
|
|
|
|
|
|
|
if not isinstance(args, collections.abc.Hashable):
|
|
|
|
if not isinstance(args, Hashable):
|
|
|
|
print("Cannot memoize %r!", file=sys.stderr)
|
|
|
|
print("Cannot memoize %r!", file=sys.stderr)
|
|
|
|
how = "Not memoizeable!"
|
|
|
|
how = "Not memoizeable!"
|
|
|
|
value = self.func(*args)
|
|
|
|
value = self.func(*args)
|
|
|
|
|