summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKathy Gray2016-01-20 10:39:46 +0000
committerKathy Gray2016-01-20 10:39:46 +0000
commitd40b9c4b786e8eefc8e9d212d95035861566339c (patch)
tree8b6d79f52654d9856822841a0cf4911c0b4a5852 /src
parentee4e2fdcc589406411ef17509e8140f21aee5c02 (diff)
Show opcode in sequential interpreter when decode fails
Diffstat (limited to 'src')
-rw-r--r--src/lem_interp/run_with_elf.ml4
1 files changed, 3 insertions, 1 deletions
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