summaryrefslogtreecommitdiffstats
path: root/src/htm.c
diff options
context:
space:
mode:
authorMichael Neuling <mikey@neuling.org>2018-09-04 16:12:31 +1000
committerAlistair Popple <alistair@popple.id.au>2018-09-07 13:52:15 +1000
commit95a7cb669646ef02dc8647818383bc557e0bf7f1 (patch)
tree4875396413f410f660dd9ea6bb55acbbdecfdb67 /src/htm.c
parentc13ef4b94437f57152ebc235b3976f8c42a6dad8 (diff)
downloadpdbg-95a7cb669646ef02dc8647818383bc557e0bf7f1.tar.gz
pdbg-95a7cb669646ef02dc8647818383bc557e0bf7f1.zip
htm: Setup targetting for nest htm
Without this, nest HTM commands target nothing. Signed-off-by: Michael Neuling <mikey@neuling.org>
Diffstat (limited to 'src/htm.c')
-rw-r--r--src/htm.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/htm.c b/src/htm.c
index 97c7d14..8dd7303 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) {
OpenPOWER on IntegriCloud