[Pdbg] [PATCH 3/8] libpdbg: Add state() method to thread
Amitay Isaacs
amitay at ozlabs.org
Fri Oct 9 14:59:56 AEDT 2020
Signed-off-by: Amitay Isaacs <amitay at ozlabs.org>
---
libpdbg/hwunit.h | 1 +
libpdbg/p8chip.c | 1 +
libpdbg/p9chip.c | 1 +
3 files changed, 3 insertions(+)
diff --git a/libpdbg/hwunit.h b/libpdbg/hwunit.h
index ee825bb..c7d8edf 100644
--- a/libpdbg/hwunit.h
+++ b/libpdbg/hwunit.h
@@ -126,6 +126,7 @@ struct thread {
struct pdbg_target target;
struct thread_state status;
int id;
+ struct thread_state (*state)(struct thread *);
int (*step)(struct thread *, int);
int (*start)(struct thread *);
int (*stop)(struct thread *);
diff --git a/libpdbg/p8chip.c b/libpdbg/p8chip.c
index d7664b8..6349a38 100644
--- a/libpdbg/p8chip.c
+++ b/libpdbg/p8chip.c
@@ -649,6 +649,7 @@ static struct thread p8_thread = {
.probe = p8_thread_probe,
.release = p8_thread_release,
},
+ .state = p8_thread_state,
.step = p8_thread_step,
.start = p8_thread_start,
.stop = p8_thread_stop,
diff --git a/libpdbg/p9chip.c b/libpdbg/p9chip.c
index db6efd5..e72a16a 100644
--- a/libpdbg/p9chip.c
+++ b/libpdbg/p9chip.c
@@ -428,6 +428,7 @@ static struct thread p9_thread = {
.probe = p9_thread_probe,
.release = p9_thread_release,
},
+ .state = p9_thread_state,
.start = p9_thread_start,
.stop = p9_thread_stop,
.step = p9_thread_step,
--
2.26.2
More information about the Pdbg
mailing list