Implement __contains__ for reg module (#1504)

pull/1505/head
Gulshan Singh 3 years ago committed by GitHub
parent 65462f63dd
commit 5767fe30cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -94,6 +94,10 @@ class module(ModuleType):
return item
def __contains__(self, reg):
regs = set(reg_sets[pwndbg.gdblib.arch.current]) | {"pc", "sp"}
return reg in regs
def __iter__(self):
regs = set(reg_sets[pwndbg.gdblib.arch.current]) | {"pc", "sp"}
for item in regs:

Loading…
Cancel
Save