proxyclient: removed unused code

Little clean-up of unused proxyclient code.
Code used/referenced by commented out sections were taken
into account and left behind to be used by it at a later point.

Signed-off-by: TophEvich <84676511+TophEvich@users.noreply.github.com>
This commit is contained in:
TophEvich 2021-08-14 19:34:22 +02:00 committed by Hector Martin
parent 18bc2c7db1
commit 913c775165
7 changed files with 3 additions and 14 deletions

View file

@ -47,7 +47,6 @@ class BaseAsm(object):
def disassemble(self):
output = subprocess.check_output("%sobjdump -zd %s" % (self.PREFIX, self.elffile), shell=True).decode("ascii")
disas = []
for line in output.split("\n"):
if not line or line[0] != " ":
continue

View file

@ -41,12 +41,10 @@ def find_regs(u, regs=None, block=1024, call=None, values=True):
mov, mrs, st = struct.unpack("3I", template.data)
data = []
BAD = 0xacce5515abad1dea
OOPS = 0xdeadc0dedeadc0de
rblock = []
iregs = iter(regs)
while True:

View file

@ -194,8 +194,6 @@ class Method:
if name == "ret":
continue
dir = self.dir[i]
val = self.get_field_val(i, in_vals, out_vals, nullobj=NULL)
if name in in_vals and out_vals is not None and name not in out_vals:

View file

@ -197,9 +197,9 @@ class HV(Reloadable):
def map_hook(self, ipa, size, read=None, write=None, **kwargs):
index = len(self.vm_hooks)
self.vm_hooks.append((read, write, ipa, kwargs))
self.map_hook_idx(ipa, size, index, read is not None, write is not None, kwargs)
self.map_hook_idx(ipa, size, index, read is not None, write is not None)
def map_hook_idx(self, ipa, size, index, read=False, write=False, kwargs={}):
def map_hook_idx(self, ipa, size, index, read=False, write=False):
if read:
if write:
t = self.SPTE_PROXY_HOOK_RW
@ -224,7 +224,7 @@ class HV(Reloadable):
if len(self.interrupt_map):
self.add_tracer(zone, "AIC_IRQ", TraceMode.RESERVED)
else:
self.del_tracer(zone, "AIC_IRQ", TraceMode.RESERVED)
self.del_tracer(zone, "AIC_IRQ")
assert self.p.hv_trace_irq(self.AIC_EVT_TYPE_HW, num, count, flags) > 0
@ -599,7 +599,6 @@ class HV(Reloadable):
if ctx.esr.ISS == 0x20:
return self.handle_msr(ctx, ctx.afsr1)
start = ctx.elr_phys
code = struct.unpack("<I", self.iface.readmem(ctx.elr_phys, 4))
c = ARMAsm(".inst " + ",".join(str(i) for i in code), ctx.elr_phys)
insn = "; ".join(c.disassemble())
@ -1180,7 +1179,6 @@ class HV(Reloadable):
data = open(data, "rb")
self.macho = macho = MachO(data)
symbols = None
if symfile is not None:
if isinstance(symfile, str):
symfile = open(symfile, "rb")

View file

@ -289,7 +289,6 @@ class UartInterface(Reloadable):
def handle_boot(self, data):
reason, code, info = struct.unpack("<IIQ", data[:16])
reason = START(reason)
info_type = None
if reason in (START.EXCEPTION, START.EXCEPTION_LOWER):
code = EXC(code)
if (reason, code) in self.handlers:

View file

@ -348,7 +348,6 @@ class RegMonitor(Reloadable):
self.bufsize = bufsize
self.ascii = ascii
base = utils.base
if bufsize:
self.scratch = utils.malloc(bufsize)
else:

View file

@ -200,8 +200,6 @@ class HCR(Register64):
NV2 = 45
AT = 44
NV1 = 43
NV1 = 43
NV = 42
NV = 42
API = 41
APK = 40