[Pdbg] [PATCH] pdbg: Fix the scommable definition to work for any target attached to a pib
Alistair Popple
alistair at popple.id.au
Tue Jun 23 16:33:06 AEST 2020
Signed-off-by: Alistair Popple <alistair at popple.id.au>
---
src/scom.c | 11 ++---------
1 file changed, 2 insertions(+), 9 deletions(-)
diff --git a/src/scom.c b/src/scom.c
index 277f05c..1647b13 100644
--- a/src/scom.c
+++ b/src/scom.c
@@ -29,15 +29,8 @@
/* Check if a target has scom region */
static bool scommable(struct pdbg_target *target)
{
- const char *classname;
-
- classname = pdbg_target_class_name(target);
- if (!strcmp(classname, "pib") ||
- !strcmp(classname, "core") ||
- !strcmp(classname, "thread"))
- return true;
-
- return false;
+ return !strcmp(pdbg_target_class_name(target), "pib") ||
+ !!pdbg_target_parent("pib", target);
}
int getscom(uint64_t addr)
--
2.20.1
More information about the Pdbg
mailing list