diff options
| author | serpilliere <devnull@localhost> | 2011-08-26 13:34:12 +0200 |
|---|---|---|
| committer | serpilliere <devnull@localhost> | 2011-08-26 13:34:12 +0200 |
| commit | bbd7e71ada55e23fe857a7c9954687ff987dec7c (patch) | |
| tree | 5b8b21abab228129b8b2db1fab465185d27e4416 /miasm/tools/to_c_helper.py | |
| parent | 78bacd4d0dd014412a81ce8dc72ad3954bcd12e5 (diff) | |
| download | focaccia-miasm-bbd7e71ada55e23fe857a7c9954687ff987dec7c.tar.gz focaccia-miasm-bbd7e71ada55e23fe857a7c9954687ff987dec7c.zip | |
explicit error whil vm_get_mem fails
Diffstat (limited to 'miasm/tools/to_c_helper.py')
| -rw-r--r-- | miasm/tools/to_c_helper.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/miasm/tools/to_c_helper.py b/miasm/tools/to_c_helper.py index be19ee8c..9bbda006 100644 --- a/miasm/tools/to_c_helper.py +++ b/miasm/tools/to_c_helper.py @@ -598,9 +598,12 @@ def gen_C_from_asmbloc(in_str, offset, symbol_pool, dont_dis = [], job_done = No f_name = "bloc_%.16X"%(offset&mask_int) l = symbol_pool.getby_offset_create(offset) cur_bloc = asmbloc.asm_bloc(l) - - asmbloc.dis_bloc(x86_mn, in_str, cur_bloc, offset, job_done, symbol_pool,[], - follow_call = False, patch_instr_symb = True, dontdis_retcall = False,lines_wd = None, amode=x86_afs.u32, sex=0) + + try: + asmbloc.dis_bloc(x86_mn, in_str, cur_bloc, offset, job_done, symbol_pool,[], + follow_call = False, patch_instr_symb = True, dontdis_retcall = False,lines_wd = None, amode=x86_afs.u32, sex=0) + except: + raise ValueError('cannot disasm at', hex(offset)) f_dec, out = bloc_gen_C_func([cur_bloc], f_name, None, True, log_mn, log_reg, log_lbl, filtered_ad, tick_dbg) #print "\n".join(out) |