On 10/22/26 16:50, Philippe Mathieu-Daudé wrote:
Have targets register a helper to resolve their exceptions.

Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Pierrick Bouvier <[email protected]>
---
  include/hw/core/cpu.h       | 2 ++
  accel/tcg/cpu-exec-common.c | 6 ++++++
  2 files changed, 8 insertions(+)

diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h
index 456154df6f6..9d71db16d2f 100644
--- a/include/hw/core/cpu.h
+++ b/include/hw/core/cpu.h
@@ -108,6 +108,7 @@ struct SemihostingCPUOps;
   * @list_cpus: list available CPU models and flags.
   * @parse_features: Callback to parse command line arguments.
   * @reset_dump_flags: #CPUDumpFlags to use for reset logging.
+ * @exception_name: Callback for getting architecture exception name.
   * @memory_rw_debug: Callback for GDB memory access.
   * @dump_state: Callback for dumping state.
   * @query_cpu_fast:
@@ -178,6 +179,7 @@ struct CPUClass {
      const char * (*gdb_arch_name)(CPUState *cpu);
      const char * (*gdb_get_core_xml_file)(CPUState *cpu);
+ const char *(*exception_name)(int exception);
Not keen on "int" while you're standardizing on STR_ARRAY_ELEM_OR_NULL and thus an unsigned comparison vs ARRAY_SIZE.


r~

Reply via email to