diff options
author | Michael Neuling <mikey@neuling.org> | 2018-09-04 16:12:31 +1000 |
---|---|---|
committer | Alistair Popple <alistair@popple.id.au> | 2018-09-07 13:52:15 +1000 |
commit | 95a7cb669646ef02dc8647818383bc557e0bf7f1 (patch) | |
tree | 4875396413f410f660dd9ea6bb55acbbdecfdb67 /src/htm.c | |
parent | c13ef4b94437f57152ebc235b3976f8c42a6dad8 (diff) | |
download | pdbg-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.c | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -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) { |