diff options
| author | Ajax <commial@gmail.com> | 2015-03-30 18:05:24 +0200 |
|---|---|---|
| committer | Ajax <commial@gmail.com> | 2015-03-30 18:05:24 +0200 |
| commit | 37eb0a3d29434383a469f252975e1e3e1bd0309f (patch) | |
| tree | 64a31b9f881907f34d2faad8d7fde82c435c0412 /miasm2/jitter/loader/elf.py | |
| parent | f72d0de75c6815db54f9d54824e8948d962eee5a (diff) | |
| download | miasm-37eb0a3d29434383a469f252975e1e3e1bd0309f.tar.gz miasm-37eb0a3d29434383a469f252975e1e3e1bd0309f.zip | |
Remove lazy logging pattern
Diffstat (limited to 'miasm2/jitter/loader/elf.py')
| -rw-r--r-- | miasm2/jitter/loader/elf.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/miasm2/jitter/loader/elf.py b/miasm2/jitter/loader/elf.py index c0427e79..e5241910 100644 --- a/miasm2/jitter/loader/elf.py +++ b/miasm2/jitter/loader/elf.py @@ -40,8 +40,7 @@ def preload_elf(vm, e, runtime_lib, patch_vm_imp=True): libname_s = canon_libname_libfunc(libname, libfunc) dyn_funcs[libname_s] = ad_libfunc if patch_vm_imp: - log.debug('patch %s %s %s' % - (hex(ad), hex(ad_libfunc), libfunc)) + log.debug('patch 0x%x 0x%x %s', ad, ad_libfunc, libfunc) vm.set_mem( ad, struct.pack(cstruct.size2type[e.size], ad_libfunc)) return runtime_lib, dyn_funcs @@ -60,8 +59,8 @@ def vm_load_elf(vm, fdata, **kargs): for p in e.ph.phlist: if p.ph.type != 1: continue - log.debug('%s %s %s %s' % - (hex(p.ph.vaddr), hex(p.ph.memsz), hex(p.ph.offset), hex(p.ph.filesz))) + log.debug('0x%x 0x%x 0x%x 0x%x', p.ph.vaddr, p.ph.memsz, p.ph.offset, + p.ph.filesz) data_o = e._content[p.ph.offset:p.ph.offset + p.ph.filesz] addr_o = p.ph.vaddr a_addr = addr_o & ~0xFFF |