[Pdbg] [PATCH] libpdbg/chip: add HEIR and HID register to ram_state_thread
Rashmica Gupta
rashmica.g at gmail.com
Fri Oct 5 13:46:45 AEST 2018
Signed-off-by: Rashmica Gupta <rashmica.g at gmail.com>
---
libpdbg/chip.c | 7 +++++++
libpdbg/libpdbg.h | 2 ++
2 files changed, 9 insertions(+)
diff --git a/libpdbg/chip.c b/libpdbg/chip.c
index 93eb3f0..5b67c7b 100644
--- a/libpdbg/chip.c
+++ b/libpdbg/chip.c
@@ -471,6 +471,13 @@ int ram_state_thread(struct pdbg_target *thread, struct thread_regs *regs)
ram_getspr(thread, 307, ®s->hdar);
printf("HDAR : 0x%016" PRIx64 "\n", regs->hdar);
+ ram_getspr(thread, 339, &value);
+ regs->heir = value;
+ printf("HEIR : 0x%016" PRIx32 "\n", regs->heir);
+
+ ram_getspr(thread, 1008, ®s->hid);
+ printf("HID0 : 0x%016" PRIx64 "\n", regs->hid);
+
ram_getspr(thread, 314, ®s->hsrr0);
printf("HSRR0 : 0x%016" PRIx64 "\n", regs->hsrr0);
diff --git a/libpdbg/libpdbg.h b/libpdbg/libpdbg.h
index c802020..1977c75 100644
--- a/libpdbg/libpdbg.h
+++ b/libpdbg/libpdbg.h
@@ -120,6 +120,8 @@ struct thread_regs {
uint64_t hsrr0;
uint64_t hsrr1;
uint64_t hdec;
+ uint32_t heir;
+ uint64_t hid;
uint64_t hsprg0;
uint64_t hsprg1;
uint64_t fscr;
--
2.14.4
More information about the Pdbg
mailing list