コード例 #1
0
def setup(profiler_cfg=None):
    machine = Machine()
    alloc = MemoryAlloc(machine.get_mem(), machine.get_ram_begin())
    mgr = VLibManager(machine, alloc, profiler_cfg=profiler_cfg)
    # setup ctx map
    cpu = machine.get_cpu()
    mem = machine.get_mem()
    cpu_type = machine.get_cpu_type()
    segloader = SegmentLoader(alloc)
    exec_ctx = ExecLibCtx(machine, alloc, segloader, None)
    mgr.add_ctx('exec.library', exec_ctx)
    return machine, alloc, mgr
コード例 #2
0
ファイル: libcore_mgr.py プロジェクト: simontoens/amitools
def setup(main_profiler=None, prof_names=None, prof_calls=False):
  machine = Machine()
  alloc = MemoryAlloc(machine.get_mem(), machine.get_ram_begin())
  mgr = VLibManager(machine, alloc,
                    main_profiler=main_profiler,
                    prof_names=prof_names, prof_calls=prof_calls)
  # setup ctx map
  cpu = machine.get_cpu()
  mem = machine.get_mem()
  cpu_type = machine.get_cpu_type()
  segloader = SegmentLoader(alloc)
  exec_ctx = ExecLibCtx(machine, alloc, segloader, None)
  mgr.add_ctx('exec.library', exec_ctx)
  mgr.add_impl_cls('exec.library', ExecLibrary)
  mgr.add_impl_cls('vamostest.library', VamosTestLibrary)
  mgr.add_impl_cls('vamostestdev.device', VamosTestDevice)
  return machine, alloc, mgr
コード例 #3
0
ファイル: libcore_mgr.py プロジェクト: simontoens/amitools
def setup(main_profiler=None, prof_names=None, prof_calls=False):
    machine = Machine()
    alloc = MemoryAlloc(machine.get_mem(), machine.get_ram_begin())
    mgr = VLibManager(machine,
                      alloc,
                      main_profiler=main_profiler,
                      prof_names=prof_names,
                      prof_calls=prof_calls)
    # setup ctx map
    cpu = machine.get_cpu()
    mem = machine.get_mem()
    cpu_type = machine.get_cpu_type()
    segloader = SegmentLoader(alloc)
    exec_ctx = ExecLibCtx(machine, alloc, segloader, None)
    mgr.add_ctx('exec.library', exec_ctx)
    mgr.add_impl_cls('exec.library', ExecLibrary)
    mgr.add_impl_cls('vamostest.library', VamosTestLibrary)
    mgr.add_impl_cls('vamostestdev.device', VamosTestDevice)
    return machine, alloc, mgr
コード例 #4
0
def setup(path_mgr=None, cfg=None, profiler_cfg=None):
    log_libmgr.setLevel(logging.INFO)
    log_exec.setLevel(logging.INFO)
    machine = Machine()
    # machine.show_instr(True)
    sp = machine.get_ram_begin() - 4
    alloc = MemoryAlloc.for_machine(machine)
    segloader = SegmentLoader(alloc, path_mgr)
    mgr = LibManager(machine,
                     alloc,
                     segloader,
                     cfg=cfg,
                     profiler_cfg=profiler_cfg)
    # setup ctx map
    cpu = machine.get_cpu()
    mem = machine.get_mem()
    cpu_type = machine.get_cpu_type()
    exec_ctx = ExecLibCtx(machine, alloc, segloader, path_mgr)
    mgr.add_ctx('exec.library', exec_ctx)
    dos_ctx = DosLibCtx(machine, alloc, segloader, path_mgr, None, None)
    mgr.add_ctx('dos.library', dos_ctx)
    return machine, alloc, mgr, sp
コード例 #5
0
def setup(path_mgr=None):
    log_libmgr.setLevel(logging.INFO)
    log_exec.setLevel(logging.INFO)
    machine = Machine()
    # machine.show_instr(True)
    sp = machine.get_ram_begin() - 4
    alloc = MemoryAlloc.for_machine(machine)
    segloader = SegmentLoader(alloc, path_mgr)
    cfg = LibMgrCfg()
    mgr = LibManager(machine, alloc, segloader, cfg)
    # setup ctx map
    cpu = machine.get_cpu()
    mem = machine.get_mem()
    cpu_type = machine.get_cpu_type()
    exec_ctx = ExecLibCtx(machine, alloc, segloader, path_mgr, mgr)
    mgr.add_ctx("exec.library", exec_ctx)
    mgr.add_impl_cls("exec.library", ExecLibrary)
    dos_ctx = DosLibCtx(machine, alloc, segloader, path_mgr, None, None)
    mgr.add_ctx("dos.library", dos_ctx)
    mgr.add_impl_cls("dos.library", DosLibrary)
    mgr.add_impl_cls("vamostest.library", VamosTestLibrary)
    mgr.add_impl_cls("vamostestdev.device", VamosTestDevice)
    return machine, alloc, mgr, sp, cfg
コード例 #6
0
ファイル: libcore_mgr.py プロジェクト: pararaum/-amitools
def setup_env(main_profiler=None, prof_names=None, prof_calls=False):
    machine = Machine()
    alloc = MemoryAlloc(machine.get_mem(), machine.get_ram_begin())
    mgr = VLibManager(
        machine,
        alloc,
        main_profiler=main_profiler,
        prof_names=prof_names,
        prof_calls=prof_calls,
    )
    # setup ctx map
    cpu = machine.get_cpu()
    mem = machine.get_mem()
    cpu_type = machine.get_cpu_type()
    segloader = SegmentLoader(alloc)
    exec_ctx = ExecLibCtx(machine, alloc, segloader, None, None)
    # add extra attr to ctx
    mgr.set_ctx_extra_attr("foo", "bar")
    mgr.add_ctx("exec.library", exec_ctx)
    mgr.add_impl_cls("exec.library", ExecLibrary)
    mgr.add_impl_cls("vamostest.library", VamosTestLibrary)
    mgr.add_impl_cls("vamostestdev.device", VamosTestDevice)
    return machine, alloc, mgr
コード例 #7
0
ファイル: libmgr_mgr.py プロジェクト: simontoens/amitools
def setup(path_mgr=None):
  log_libmgr.setLevel(logging.INFO)
  log_exec.setLevel(logging.INFO)
  machine = Machine()
  # machine.show_instr(True)
  sp = machine.get_ram_begin() - 4
  alloc = MemoryAlloc.for_machine(machine)
  segloader = SegmentLoader(alloc, path_mgr)
  cfg = LibMgrCfg()
  mgr = LibManager(machine, alloc, segloader, cfg)
  # setup ctx map
  cpu = machine.get_cpu()
  mem = machine.get_mem()
  cpu_type = machine.get_cpu_type()
  exec_ctx = ExecLibCtx(machine, alloc, segloader, path_mgr)
  mgr.add_ctx('exec.library', exec_ctx)
  mgr.add_impl_cls('exec.library', ExecLibrary)
  dos_ctx = DosLibCtx(machine, alloc, segloader, path_mgr, None, None)
  mgr.add_ctx('dos.library', dos_ctx)
  mgr.add_impl_cls('dos.library', DosLibrary)
  mgr.add_impl_cls('vamostest.library', VamosTestLibrary)
  mgr.add_impl_cls('vamostestdev.device', VamosTestDevice)
  return machine, alloc, mgr, sp, cfg