[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Libunwind-devel] [PATCH] [RFC] add fallback logic for coredump register
From: |
Mike Frysinger |
Subject: |
[Libunwind-devel] [PATCH] [RFC] add fallback logic for coredump register access |
Date: |
Tue, 14 Feb 2017 13:22:45 -0500 |
Caveat: I haven't spent time looking into the libunwind API and seeing
if these arches need their own mapping, or if they have more registers
in the coredump than libunwind exposes.
At least it no longer fails to compile? :)
---
src/coredump/_UCD_access_reg_linux.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/coredump/_UCD_access_reg_linux.c
b/src/coredump/_UCD_access_reg_linux.c
index 208d8d27b658..b94a89565dca 100644
--- a/src/coredump/_UCD_access_reg_linux.c
+++ b/src/coredump/_UCD_access_reg_linux.c
@@ -54,6 +54,9 @@ _UCD_access_reg (unw_addr_space_t as,
#elif defined(UNW_TARGET_TILEGX)
if (regnum > UNW_TILEGX_CFA)
goto badreg;
+#elif defined(UNW_TARGET_IA64) || defined(UNW_TARGET_HPPA) ||
defined(UNW_TARGET_PPC32) || defined(UNW_TARGET_PPC64)
+ if (regnum >= ARRAY_SIZE(ui->prstatus->pr_reg))
+ goto badreg;
#else
#if defined(UNW_TARGET_MIPS)
static const uint8_t remap_regs[] =
--
2.11.0
- [Libunwind-devel] [PATCH] [RFC] add fallback logic for coredump register access,
Mike Frysinger <=