diff mbox series

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

Message ID 20200622004501.12889-7-amitay@ozlabs.org
State New
Headers show
Series Make register access into thread procedures | expand

Checks

Context Check Description
snowpatch_ozlabs/build-multiarch success Test build-multiarch on branch master
snowpatch_ozlabs/apply_patch success Successfully applied on branch master (b0a62fc11260400ad7518e36cbab9e56dd1bbf5b)

Commit Message

Amitay Isaacs June 22, 2020, 12:44 a.m. UTC
Signed-off-by: Amitay Isaacs <amitay@ozlabs.org>
---
 libpdbg/hwunit.h | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
diff mbox series

Patch

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)