Пример #1
0
def setup():
    machine = MockMachine(fill=23)
    mem = machine.get_mem()
    traps = machine.get_traps()
    cpu = machine.get_cpu()
    alloc = MemoryAlloc.for_machine(machine)
    ctx = LibCtx(machine)
    return mem, traps, alloc, ctx
Пример #2
0
def get_jump_table(with_fd=False, **kwargs):
    machine = MockMachine()
    mem = machine.get_mem()
    name = 'vamostest.library'
    fd = read_lib_fd(name)
    neg_size = fd.get_neg_size()
    lib_base = neg_size + 0x100
    if not with_fd:
        fd = None
    jt = LibJumpTable(mem, lib_base, neg_size, fd=fd, **kwargs)
    return jt
Пример #3
0
def get_jump_table(with_fd=False, **kwargs):
  machine = MockMachine()
  mem = machine.get_mem()
  name = 'vamostest.library'
  fd = read_lib_fd(name)
  neg_size = fd.get_neg_size()
  lib_base = neg_size + 0x100
  if not with_fd:
    fd = None
  jt = LibJumpTable(mem, lib_base, neg_size, fd=fd, **kwargs)
  return jt