vppinfra: add aarch64 support for format_ucontext_pc
Add the missing AArch64 support for printing program counter.
Type: improvement
Signed-off-by: Tianyu Li <tianyu.li@arm.com>
Change-Id: Idb63737ed72e10fa29fd61e1eab5af059e2b8e28
diff --git a/src/vppinfra/unix-formats.c b/src/vppinfra/unix-formats.c
index fb3a728..2abc752 100644
--- a/src/vppinfra/unix-formats.c
+++ b/src/vppinfra/unix-formats.c
@@ -436,6 +436,8 @@
regs = &uc->uc_mcontext.uc_regs->gp_regs[0];
#elif defined (i386) || defined (__x86_64__)
regs = (void *) &uc->uc_mcontext.gregs[0];
+#elif defined(__aarch64__)
+ regs = (void *) &uc->uc_mcontext.pc;
#endif
#if defined (powerpc) || defined (powerpc64)
@@ -444,6 +446,8 @@
reg_no = REG_EIP;
#elif defined (__x86_64__)
reg_no = REG_RIP;
+#elif defined(__aarch64__)
+ reg_no = 0;
#else
reg_no = 0;
regs = 0;