[Pdbg] [PATCH 3/3] htm: Setup targetting for nest htm

Michael Neuling mikey at neuling.org
Tue Sep 4 16:12:31 AEST 2018


Without this, nest HTM commands target nothing.

Signed-off-by: Michael Neuling <mikey at neuling.org>
---
 src/htm.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/src/htm.c b/src/htm.c
index 97c7d14434..8dd7303696 100644
--- a/src/htm.c
+++ b/src/htm.c
@@ -255,7 +255,7 @@ fail:
 
 int run_htm(int optind, int argc, char *argv[])
 {
-	struct pdbg_target *target;
+	struct pdbg_target *target, *nhtm;
 	enum htm_type type;
 	struct pdbg_target *core_target = NULL;
 	int i, rc = 0;
@@ -322,6 +322,16 @@ int run_htm(int optind, int argc, char *argv[])
 		}
 	}
 
+	if (type == HTM_NEST) {
+		pdbg_for_each_class_target("pib", target) {
+			if (!target_selected(target))
+				continue;
+
+			pdbg_for_each_target("nhtm", target, nhtm)
+				target_select(nhtm);
+		}
+	}
+
 	optind++;
 	for (i = 0; i < ARRAY_SIZE(actions); i++) {
 		if (strcmp(argv[optind], actions[i].name) == 0) {
-- 
2.17.1



More information about the Pdbg mailing list