[Pdbg] [PATCH 6/9] libpdbg: Add register access procedures to thread

Amitay Isaacs amitay at ozlabs.org
Mon Jun 22 10:44:58 AEST 2020


Signed-off-by: Amitay Isaacs <amitay at ozlabs.org>
---
 libpdbg/hwunit.h | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/libpdbg/hwunit.h b/libpdbg/hwunit.h
index 7fe83a6..fd643b4 100644
--- a/libpdbg/hwunit.h
+++ b/libpdbg/hwunit.h
@@ -143,6 +143,27 @@ struct thread {
 	int (*ram_getxer)(struct thread *, uint64_t *value);
 	int (*ram_putxer)(struct thread *, uint64_t value);
 	int (*enable_attn)(struct thread *);
+
+	int (*getmem)(struct thread *, uint64_t, uint64_t *);
+	int (*getregs)(struct thread *, struct thread_regs *regs);
+
+	int (*getgpr)(struct thread *, int, uint64_t *);
+	int (*putgpr)(struct thread *, int, uint64_t);
+
+	int (*getspr)(struct thread *, int, uint64_t *);
+	int (*putspr)(struct thread *, int, uint64_t);
+
+	int (*getmsr)(struct thread *, uint64_t *);
+	int (*putmsr)(struct thread *, uint64_t);
+
+	int (*getnia)(struct thread *, uint64_t *);
+	int (*putnia)(struct thread *, uint64_t);
+
+	int (*getxer)(struct thread *, uint64_t *);
+	int (*putxer)(struct thread *, uint64_t);
+
+	int (*getcr)(struct thread *, uint32_t *);
+	int (*putcr)(struct thread *, uint32_t);
 };
 #define target_to_thread(x) container_of(x, struct thread, target)
 
-- 
2.26.2



More information about the Pdbg mailing list