diff options
| author | Amitay Isaacs <amitay@ozlabs.org> | 2018-08-09 15:19:27 +1000 |
|---|---|---|
| committer | Alistair Popple <alistair@popple.id.au> | 2018-08-13 15:38:28 +1000 |
| commit | ede74a4ed0631266bfcc1c9919cead2262b497a7 (patch) | |
| tree | 724088751220ee8209410f77349a4f414ac512c1 /src | |
| parent | bc92bf17a34bc364f477fd82722da97d29a6fc57 (diff) | |
| download | pdbg-ede74a4ed0631266bfcc1c9919cead2262b497a7.tar.gz pdbg-ede74a4ed0631266bfcc1c9919cead2262b497a7.zip | |
main: Fix print_target to only print selected targets
Signed-off-by: Amitay Isaacs <amitay@ozlabs.org>
Reviewed-by: Alistair Popple <alistair@popple.id.au>
Diffstat (limited to 'src')
| -rw-r--r-- | src/main.c | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -769,6 +769,9 @@ void print_target(struct pdbg_target *target, int level) } pdbg_for_each_child_target(target, next) { + if (!target_selected(next)) + continue; + print_target(next, level + 1); } } @@ -777,8 +780,12 @@ static int probe(void) { struct pdbg_target *target; - pdbg_for_each_class_target("pib", target) + pdbg_for_each_class_target("pib", target) { + if (!target_selected(target)) + continue; + print_target(target, 0); + } printf("\nNote that only selected targets will be shown above. If none are shown\n" "try adding '-a' to select all targets\n"); |

