From 1af194490370e894be32d03ebd41e2e21df56aba Mon Sep 17 00:00:00 2001 From: Peter Maydell Date: Fri, 2 Mar 2018 14:37:30 -0500 Subject: [PATCH] target/arm: Add missing entries to excnames[] for log strings Recent changes have added new EXCP_ values to ARM but forgot to update the excnames[] array which is used to provide human-readable strings when printing information about the exception for debug logging. Add the missing entries, and add a comment to the list of #defines to help avoid the mistake being repeated in future. Backports commit 32b81e620ea562d56ab2733421b5da1082b237a2 from qemu --- qemu/target/arm/cpu.h | 2 ++ qemu/target/arm/internals.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/qemu/target/arm/cpu.h b/qemu/target/arm/cpu.h index 3a47d51c..a4ed8d7f 100644 --- a/qemu/target/arm/cpu.h +++ b/qemu/target/arm/cpu.h @@ -61,6 +61,8 @@ #define EXCP_VFIQ 15 #define EXCP_SEMIHOST 16 /* semihosting call */ #define EXCP_NOCP 17 /* v7M NOCP UsageFault */ +#define EXCP_INVSTATE 18 /* v7M INVSTATE UsageFault */ +/* NB: new EXCP_ defines should be added to the excnames[] array too */ #define ARMV7M_EXCP_RESET 1 #define ARMV7M_EXCP_NMI 2 diff --git a/qemu/target/arm/internals.h b/qemu/target/arm/internals.h index 3e459b99..8360421b 100644 --- a/qemu/target/arm/internals.h +++ b/qemu/target/arm/internals.h @@ -72,6 +72,8 @@ static const char * const excnames[] = { "Virtual IRQ", "Virtual FIQ", "Semihosting call", + "v7M NOCP UsageFault", + "v7M INVSTATE UsageFault", }; /* Scale factor for generic timers, ie number of ns per tick.