Skip to contentSkip to conversation

target-arm: A64: Print ELR when taking exceptions

PATCH Applied Soren Brinkmann 2 participants 2 messages Jun 23, 2015 – Jun 25, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 target-arm: A64: Print ELR when taking exceptions

When taking an exception print the content of the exception link register. This is useful especially for synchronous exceptions because in that case this registers holds the address of the instruction that generated the exception.

---
 target-arm/helper-a64.c | 2 ++
 1 file changed, 2 insertions(+)
target-arm/helper-a64.c +2 -0
index e30af0659e29..08c95a3f5202 100644
@@ -533,6 +533,8 @@ void aarch64_cpu_do_interrupt(CPUState *cs)
 
         env->condexec_bits = 0;
     }
+    qemu_log_mask(CPU_LOG_INT, "...with ELR 0x%" PRIx64 "\n",
+                  env->elr_el[new_el]);
 
     pstate_write(env, PSTATE_DAIF | new_mode);
     env->aarch64 = 1;
Signature · 1 line
2.4.4.3.gd756881
#1 lore raw
Quoted 15 lines · Soren Brinkmann

When taking an exception print the content of the exception link register. This is useful especially for synchronous exceptions because in that case this registers holds the address of the instruction that generated the exception.

---
 target-arm/helper-a64.c | 2 ++
 1 file changed, 2 insertions(+)
target-arm/helper-a64.c +0 -0
index e30af0659e29..08c95a3f5202 100644

target-arm/helper-a64.c void aarch64_cpu_do_interrupt(CPUState *cs) · line 537

Quoted 5 lines
target-arm/helper-a64.c +2 -0
@@ -533,6 +533,8 @@ void aarch64_cpu_do_interrupt(CPUState *cs)
 
         env->condexec_bits = 0;
     }
+    qemu_log_mask(CPU_LOG_INT, "...with ELR 0x%" PRIx64 "\n",
+                  env->elr_el[new_el]);

Thanks, applied to target-arm.next.

-- PMM