about summary refs log tree commit diff stats
path: root/miasm2/jitter/loader/elf.py
diff options
context:
space:
mode:
authorserpilliere <serpilliere@users.noreply.github.com>2015-03-30 19:09:03 +0200
committerserpilliere <serpilliere@users.noreply.github.com>2015-03-30 19:09:03 +0200
commit65c65bd7548fd665ca2631db4b91eb136aa5962c (patch)
tree64a31b9f881907f34d2faad8d7fde82c435c0412 /miasm2/jitter/loader/elf.py
parentf72d0de75c6815db54f9d54824e8948d962eee5a (diff)
parent37eb0a3d29434383a469f252975e1e3e1bd0309f (diff)
downloadmiasm-65c65bd7548fd665ca2631db4b91eb136aa5962c.tar.gz
miasm-65c65bd7548fd665ca2631db4b91eb136aa5962c.zip
Merge pull request #133 from commial/lazy-logging
Remove lazy logging pattern
Diffstat (limited to 'miasm2/jitter/loader/elf.py')
-rw-r--r--miasm2/jitter/loader/elf.py7
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