From patchwork Tue Oct 2 06:04:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amitay Isaacs X-Patchwork-Id: 977652 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42PTP72kVXz9sCw for ; Tue, 2 Oct 2018 16:13:47 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=ozlabs.org header.i=@ozlabs.org header.b="KxS0hKBd"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 42PTP70dWdzF3FL for ; Tue, 2 Oct 2018 16:13:47 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.org Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=ozlabs.org header.i=@ozlabs.org header.b="KxS0hKBd"; dkim-atps=neutral X-Original-To: pdbg@lists.ozlabs.org Delivered-To: pdbg@lists.ozlabs.org Received: from ozlabs.org (bilbo.ozlabs.org [IPv6:2401:3900:2:1::2]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 42PTBd5xbVzF3DL for ; Tue, 2 Oct 2018 16:04:41 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.org Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=ozlabs.org header.i=@ozlabs.org header.b="KxS0hKBd"; dkim-atps=neutral Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPSA id 42PTBd1l8Qz9shx; Tue, 2 Oct 2018 16:04:41 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ozlabs.org; s=201707; t=1538460281; bh=T7J+JcrwhHb093TdSn/OmRazNf90DF6tCNogRsxrst0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KxS0hKBdu78VGuESiInWS8X7VaMDTvcOjRMqRg5B3d9NMqVvdODDLJTfoqW81QRB0 CZnaaXQAHw6ubimL4F2y1ZZ6DcDKAMfewTjliivX3vmjPLKshtNPAH3/tP5zKzTlEe i6FCk++Be835xbRRuo2De6T6JZTm/7RqaQYn9XhZ7IUyP9GsXJMhlGIIZGdGGRHBb7 MGgf/bOY3DbPFjtIznnQqj5RYkUOG0UOAAns9xFOm2z8Q3Zz+1dVsccum5cbkNTNcI vV/O8ULYQwCwcDh+DdkNZmY640T7a/J7Vul10JjqNi0fSEMLIBDekymUHc0GfY4Yff ACWiYBLZra6vg== From: Amitay Isaacs To: pdbg@lists.ozlabs.org Date: Tue, 2 Oct 2018 16:04:29 +1000 Message-Id: <20181002060430.3344784-9-amitay@ozlabs.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181002060430.3344784-1-amitay@ozlabs.org> References: <20181002060430.3344784-1-amitay@ozlabs.org> Subject: [Pdbg] [PATCH 08/10] main: Convert probe to use path style targeting X-BeenThere: pdbg@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "mailing list for https://github.com/open-power/pdbg development" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Amitay Isaacs MIME-Version: 1.0 Errors-To: pdbg-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Pdbg" Signed-off-by: Amitay Isaacs --- src/main.c | 15 ++++---------- tests/test_selection.sh | 43 +++-------------------------------------- 2 files changed, 7 insertions(+), 51 deletions(-) diff --git a/src/main.c b/src/main.c index feb24fa..95796b9 100644 --- a/src/main.c +++ b/src/main.c @@ -677,8 +677,6 @@ void print_target(struct pdbg_target *target, int level) struct pdbg_target *next; enum pdbg_target_status status; - pdbg_target_probe(target); - /* Does this target actually exist? */ status = pdbg_target_status(target); if (status != PDBG_TARGET_ENABLED) @@ -707,9 +705,6 @@ 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); } } @@ -718,16 +713,14 @@ static int probe(void) { struct pdbg_target *target; - pdbg_for_each_class_target("pib", target) { - if (!target_selected(target)) - continue; + for_each_path_target(target, false) { + pdbg_target_probe(target); + } + pdbg_for_each_class_target("pib", target) { 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"); - return 1; } OPTCMD_DEFINE_CMD(probe, probe); diff --git a/tests/test_selection.sh b/tests/test_selection.sh index 2b23ec1..8909796 100755 --- a/tests/test_selection.sh +++ b/tests/test_selection.sh @@ -13,10 +13,9 @@ do_skip () fi } -test_result 0 <