From patchwork Fri Oct 9 03:59:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amitay Isaacs X-Patchwork-Id: 1378976 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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4C6vVs3rVfz9sTR for ; Fri, 9 Oct 2020 15:00:37 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=fail (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.a=rsa-sha256 header.s=201707 header.b=mwzjJLje; dkim-atps=neutral Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 4C6vVr5VKJzDqW8 for ; Fri, 9 Oct 2020 15:00:36 +1100 (AEDT) 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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4C6vVL0MqSzDqWq for ; Fri, 9 Oct 2020 15:00:10 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dmarc=pass (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.a=rsa-sha256 header.s=201707 header.b=mwzjJLje; dkim-atps=neutral Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4C6vVK0S6bz9sS8; Fri, 9 Oct 2020 15:00:09 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ozlabs.org; s=201707; t=1602216009; bh=e3H/iuD+Qx4x9t33slpsjt3i+7PB+XU8tjBhccOM/28=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mwzjJLjeF3OUJ2zFIc/T6RknZMwZQJ6I7HMyQMTbdQ8bO8HAv9QUVuBHzhx0xYJRW 0M7CEqaFCqDD8nzEcuif2545eRfDYsmtlQZrAOwa5MkHtryYhN8woE+lahwsflaqEx /PxbhUMMyCy7DiDP5kXHCFvK0cMkR/bIOepV2k+zpuFk+t77eyZbPAieEvNe/0utvk nsCpzZF5enyzj5ra81hF+9eozZFz4X8iJRqCN6EhqOr5hcbUISjFEUSgUz0IbyxuFw rg2BEze4+CrauxvkPg55GJhE6dDrxsymGOyNnoOrXPZ+cybDo7z5rSSecdEtgt1T0j 4hBV/PBV0pkDg== From: Amitay Isaacs To: pdbg@lists.ozlabs.org Date: Fri, 9 Oct 2020 14:59:56 +1100 Message-Id: <20201009040001.310868-4-amitay@ozlabs.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201009040001.310868-1-amitay@ozlabs.org> References: <20201009040001.310868-1-amitay@ozlabs.org> MIME-Version: 1.0 Subject: [Pdbg] [PATCH 3/8] libpdbg: Add state() method to thread 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 Errors-To: pdbg-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Pdbg" Signed-off-by: Amitay Isaacs Reviewed-by: Joel Stanley --- libpdbg/hwunit.h | 1 + libpdbg/p8chip.c | 1 + libpdbg/p9chip.c | 1 + 3 files changed, 3 insertions(+) diff --git a/libpdbg/hwunit.h b/libpdbg/hwunit.h index ee825bb..c7d8edf 100644 --- a/libpdbg/hwunit.h +++ b/libpdbg/hwunit.h @@ -126,6 +126,7 @@ struct thread { struct pdbg_target target; struct thread_state status; int id; + struct thread_state (*state)(struct thread *); int (*step)(struct thread *, int); int (*start)(struct thread *); int (*stop)(struct thread *); diff --git a/libpdbg/p8chip.c b/libpdbg/p8chip.c index d7664b8..6349a38 100644 --- a/libpdbg/p8chip.c +++ b/libpdbg/p8chip.c @@ -649,6 +649,7 @@ static struct thread p8_thread = { .probe = p8_thread_probe, .release = p8_thread_release, }, + .state = p8_thread_state, .step = p8_thread_step, .start = p8_thread_start, .stop = p8_thread_stop, diff --git a/libpdbg/p9chip.c b/libpdbg/p9chip.c index db6efd5..e72a16a 100644 --- a/libpdbg/p9chip.c +++ b/libpdbg/p9chip.c @@ -428,6 +428,7 @@ static struct thread p9_thread = { .probe = p9_thread_probe, .release = p9_thread_release, }, + .state = p9_thread_state, .start = p9_thread_start, .stop = p9_thread_stop, .step = p9_thread_step,