mirror of https://github.com/pwndbg/pwndbg
Fix unit tests (#1685)
This commit is contained in:
parent
4fde3e898c
commit
7720b81cc7
|
@ -1,3 +1,4 @@
|
|||
import struct
|
||||
import types
|
||||
|
||||
|
||||
|
@ -6,4 +7,12 @@ class Amd64Arch(types.ModuleType):
|
|||
super(Amd64Arch, self).__init__(module_name)
|
||||
|
||||
self.ptrsize = 8
|
||||
self.ptrmask = (1 << 8 * self.ptrsize) - 1
|
||||
self.endian = "little"
|
||||
self.fmt = "<Q"
|
||||
|
||||
def pack(self, integer: int) -> bytes:
|
||||
return struct.pack(self.fmt, integer & self.ptrmask)
|
||||
|
||||
def unpack(self, data: bytes) -> int:
|
||||
return struct.unpack(self.fmt, data)[0]
|
||||
|
|
|
@ -11,7 +11,10 @@ class Config(types.ModuleType):
|
|||
|
||||
return wrapper
|
||||
|
||||
def add_param(self, *args):
|
||||
def add_param(self, *args, **kwargs):
|
||||
pass
|
||||
|
||||
def add_param_obj(self, *args, **kwargs):
|
||||
pass
|
||||
|
||||
def init_params(self):
|
||||
|
|
|
@ -10,3 +10,5 @@ import gdb
|
|||
gdb.PARAM_BOOLEAN = 0
|
||||
gdb.PARAM_ZINTEGER = 4
|
||||
gdb.PARAM_STRING = 8
|
||||
|
||||
gdb.VERSION = "8.3.1"
|
||||
|
|
Loading…
Reference in New Issue