diff options
| author | Kathy Gray | 2016-02-02 14:41:51 +0000 |
|---|---|---|
| committer | Kathy Gray | 2016-02-02 14:41:51 +0000 |
| commit | 28e520e33ca706796b603506dbd8d8ff66502f0d (patch) | |
| tree | f1c154a3337118ecbb80f2dd806e7e0cbd86e9ac /src/lem_interp | |
| parent | 8c7eeb2f961f42ff7e2586714e2997f038873772 (diff) | |
Print out the address of the instruction running in sequential interpreter
Diffstat (limited to 'src/lem_interp')
| -rw-r--r-- | src/lem_interp/run_with_elf.ml | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/lem_interp/run_with_elf.ml b/src/lem_interp/run_with_elf.ml index deafd92a..17adf7b7 100644 --- a/src/lem_interp/run_with_elf.ml +++ b/src/lem_interp/run_with_elf.ml @@ -916,11 +916,18 @@ let fetch_instruction_opcode_and_update_ia model = | None -> errorf "nextPC contains unknown or undefined"; exit 1) | _ -> assert false +let get_pc_address = function + | MIPS -> Reg.find "PC" !reg + | PPC -> Reg.find "CIA" !reg + | AArch64 -> Reg.find "_PC" !reg + + let rec fde_loop count context model mode track_dependencies opcode = if !max_cut_off && count = !max_instr then resultf "\nEnding evaluation due to reaching cut off point of %d instructions\n" count else begin - interactf "\n**** instruction %d ****\n" count; + interactf "\n**** instruction %d from address %s ****\n" + count (Printing_functions.register_value_to_string (get_pc_address model)); if !break_point && count = !break_instr then begin break_point := false; eager_eval := false end; let (instruction,istate) = match Interp_inter_imp.decode_to_istate context opcode with | Instr(instruction,istate) -> |
