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
This commit is contained in:
Tianyu Li
2023-04-17 02:49:22 +00:00
committed by Damjan Marion
parent 4add3f4c8b
commit c405f755e3

View File

@ -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;