From d40b9c4b786e8eefc8e9d212d95035861566339c Mon Sep 17 00:00:00 2001 From: Kathy Gray Date: Wed, 20 Jan 2016 10:39:46 +0000 Subject: Show opcode in sequential interpreter when decode fails --- src/lem_interp/run_with_elf.ml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/lem_interp/run_with_elf.ml b/src/lem_interp/run_with_elf.ml index b6c0a8f3..f1b19c9c 100644 --- a/src/lem_interp/run_with_elf.ml +++ b/src/lem_interp/run_with_elf.ml @@ -902,7 +902,9 @@ let rec fde_loop count context model mode track_dependencies opcode = | Interp_interface.Unsupported_instruction_error instr -> debugf "\n**** Encountered unsupported instruction %s ****\n" (Printing_functions.instruction_to_string instr) | Interp_interface.Not_an_instruction_error op -> - debugf "\n**** Encountered non-decodeable opcode ****\n" + (match op with + | Opcode bytes -> + debugf "\n**** Encountered non-decodeable opcode: %s ****\n" (Printing_functions.byte_list_to_string bytes)) | Internal_error s -> debugf "\n**** Internal error on decode: %s ****\n" s); exit 1 in -- cgit v1.2.3