aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTianyu Li <tianyu.li@arm.com>2023-04-17 02:49:22 +0000
committerDamjan Marion <dmarion@0xa5.net>2023-05-16 09:26:04 +0000
commitc405f755e3e534432e082284ecf5c78bfb57376e (patch)
treea2df0da93a648e02b5a75b3ee6431f18b60e5b4b /src
parent4add3f4c8b5ea6c787bd374727787084a8b7dc78 (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/vppinfra/unix-formats.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/vppinfra/unix-formats.c b/src/vppinfra/unix-formats.c
index fb3a7286020..2abc7521bae 100644
--- a/src/vppinfra/unix-formats.c
+++ b/src/vppinfra/unix-formats.c
@@ -436,6 +436,8 @@ u8 * format_ucontext_pc (u8 * s, va_list * args)
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 @@ u8 * format_ucontext_pc (u8 * s, va_list * args)
reg_no = REG_EIP;
#elif defined (__x86_64__)
reg_no = REG_RIP;
+#elif defined(__aarch64__)
+ reg_no = 0;
#else
reg_no = 0;
regs = 0;