Message ID | 20231103195956.1998255-10-alex.bennee@linaro.org |
---|---|
State | Superseded |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:adf:fd90:0:b0:32d:baff:b0ca with SMTP id d16csp8056wrr; Fri, 3 Nov 2023 13:02:21 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFJDcYw9oXHJnknj22/UpOQD9QCVlxx96cuE6p0PrIgcSBlk+E8eC6k4K+xmLc8FedCTsHr X-Received: by 2002:a05:6214:2b97:b0:66d:9f09:b69c with SMTP id kr23-20020a0562142b9700b0066d9f09b69cmr21052970qvb.29.1699041741554; Fri, 03 Nov 2023 13:02:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1699041741; cv=none; d=google.com; s=arc-20160816; b=Vjc4zaxXt5E8vjY9DIRnxVxDrr590kf5GVi7//fyBKC7WvI9vd6KNyckCga/lM0Fep wg+Vt0iAT01jswyOMEZbhOj+IhwsbVdEb23DrMKOxgnvg3pFEvhsghMIZzhcWQJYihkM yUf63CPEOQRRERfAMfU6VODLKbUoRj/ATNF8sDvObtafleXT337QULov7OKKkfAf/4rc el+affzJ+Mj3y+uG9/hO2ae0UIeNaT50mS/DHsgEE8KjQ6oxe2pCjVo4+Gamvm52ISfZ XS5/ihYBNS7r0xkVJDCFmSKYU2PxWLnrnPHc+aRKo3PME8i/1wtHJeURNpD/JB+tpfOl eiYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Ghs3EgBAGw158emkMP9920C3Uw5NjJncCpRRWZMRiCQ=; fh=+DJyABPrPOszaX8covAxj8Yhupz9POTwrYeebio0HgM=; b=y7QwbLsaeK1flh3S/QTUuTGwI8sCXWGI9BzMSJ/v6kG9Hgd7lrv5JfuagAWt4JVq8R lmZYPL28V3GSPKDejzgKYuEk5LfadWtEKixOYXOCJsavkaJgrDDXl9dUeZ/jWWhC6V1x b7hp9swl0550AUXkj1c3hArSdO0gdaOj4C0KWmsPT+SmZtYnPANCMcUr+TJmHcBXanVQ ylJhAiE7SDygLUj7Kiwcr4XQinPCdR1c/UmpJIUPwpWq03VUx9XFrOyrPSjpllAt8sUA V/EDTgklUJgCNdhTpR/2fRgdIcfwHrRzICwEmefxgSJXNFYn/XKUFkQNxSc8qfG5xXUo I/Sg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iJZ+yODm; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: <qemu-devel-bounces+patch=linaro.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id p8-20020a0cfd88000000b0065b176ed459si1925622qvr.154.2023.11.03.13.02.21 for <patch@linaro.org> (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 03 Nov 2023 13:02:21 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iJZ+yODm; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <qemu-devel-bounces@nongnu.org>) id 1qz0LT-0008Py-Dt; Fri, 03 Nov 2023 16:00:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <alex.bennee@linaro.org>) id 1qz0L3-00089i-4F for qemu-devel@nongnu.org; Fri, 03 Nov 2023 16:00:18 -0400 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <alex.bennee@linaro.org>) id 1qz0Kt-0005a8-Eb for qemu-devel@nongnu.org; Fri, 03 Nov 2023 16:00:16 -0400 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-407c3adef8eso21016705e9.2 for <qemu-devel@nongnu.org>; Fri, 03 Nov 2023 13:00:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1699041605; x=1699646405; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Ghs3EgBAGw158emkMP9920C3Uw5NjJncCpRRWZMRiCQ=; b=iJZ+yODmPaQB8LDfiQvHfif/WjF9FNaf0fXu6oYTXhBe7Flp1gXIeNSNp2G7cZXtBL oofsNV41BKwNkZCyRDx0UGJRn8bQlvkvNDIYtEH1hwXaqv+taQEzP2jP4KdPGNRIX50g iJcCbXo+2sGctHh0NRCy4VZDbL05F1ZalTqVjbp+ZeBcBJ921X4VxmLnPzxmr1NVOgUp tWRzHaicZgTCLUu2He/s9m3O/G8FQrIaJFr1syHOTOm+5qbkD+Vf4mXQlTveAdr5RXj3 JtPRtbvKUeHcnuuDCM75HCdch0uIko7Q3w/C4vqk/r9d0vlCsm3IE8JyUvHDEl+Xli3q cUrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699041605; x=1699646405; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Ghs3EgBAGw158emkMP9920C3Uw5NjJncCpRRWZMRiCQ=; b=ufnjM59S45xmWqHYXkslZ2yPZMFPp6sByugdbBrW7mzFXPJT1qHFZ8jQ/CMFNn1XRR wI2zMi8yXD8z1DLhGkoPJpypGuB8PiBZK2dPxZwv/E5hYZx4pt70FOlKK79skMKSLt4r Matzw5ZKKx71h87KAN34JizkGmf/4D1t/ml7NpkvxhSW73bN5VJNlByps9+Odzl22uUR oV61KJSaNjr+sTshtECRtP+6bxCNV0seO8ER2OiR8lvcYZhXiOeFmN50pVb/yZXSN/h8 bGe6iiiorReLK03LepUEwrWIgPUaYKkOKyeiC3z6zjVnVBb3OPKuz/J2DGOaA0erNpT7 9dkw== X-Gm-Message-State: AOJu0YzJTq3ea11Mc33721IDKz1TJhujRJ4AOMKIZgDNn5H5bkGDBypJ 1J0fkUilVk+eA/5wnIqsc4OU+Q== X-Received: by 2002:adf:e312:0:b0:31a:d4e4:4f63 with SMTP id b18-20020adfe312000000b0031ad4e44f63mr14339234wrj.18.1699041605580; Fri, 03 Nov 2023 13:00:05 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id o25-20020a5d58d9000000b0032db430fb9bsm2584236wrf.68.2023.11.03.12.59.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Nov 2023 13:00:00 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 8A23765748; Fri, 3 Nov 2023 19:59:57 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= <alex.bennee@linaro.org> To: qemu-devel@nongnu.org Cc: Peter Maydell <peter.maydell@linaro.org>, "Edgar E. Iglesias" <edgar.iglesias@gmail.com>, Song Gao <gaosong@loongson.cn>, qemu-arm@nongnu.org, =?utf-8?q?Marc-Andr?= =?utf-8?q?=C3=A9_Lureau?= <marcandre.lureau@redhat.com>, Wainer dos Santos Moschetta <wainersm@redhat.com>, Weiwei Li <liweiwei@iscas.ac.cn>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, Ilya Leoshkevich <iii@linux.ibm.com>, Daniel Henrique Barboza <danielhb413@gmail.com>, Yanan Wang <wangyanan55@huawei.com>, =?utf-8?q?Alex_Benn=C3=A9e?= <alex.bennee@linaro.org>, =?utf-8?q?C=C3=A9dri?= =?utf-8?q?c_Le_Goater?= <clg@kaod.org>, Paolo Bonzini <pbonzini@redhat.com>, David Hildenbrand <david@redhat.com>, Brian Cain <bcain@quicinc.com>, qemu-ppc@nongnu.org, Palmer Dabbelt <palmer@dabbelt.com>, qemu-riscv@nongnu.org, Eduardo Habkost <eduardo@habkost.net>, =?utf-8?q?Phi?= =?utf-8?q?lippe_Mathieu-Daud=C3=A9?= <philmd@linaro.org>, Alistair Francis <alistair.francis@wdc.com>, Liu Zhiwei <zhiwei_liu@linux.alibaba.com>, Cleber Rosa <crosa@redhat.com>, qemu-s390x@nongnu.org, Laurent Vivier <laurent@vivier.eu>, Yoshinori Sato <ysato@users.sourceforge.jp>, Nicholas Piggin <npiggin@gmail.com>, Thomas Huth <thuth@redhat.com>, John Snow <jsnow@redhat.com>, Alexandre Iooss <erdnaxe@crans.org>, =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= <berrange@redhat.com>, Mahmoud Mandour <ma.mandourr@gmail.com>, Daniel Henrique Barboza <dbarboza@ventanamicro.com>, Bin Meng <bin.meng@windriver.com>, Beraldo Leal <bleal@redhat.com>, Richard Henderson <richard.henderson@linaro.org>, Michael Rolnik <mrolnik@gmail.com>, Akihiko Odaki <akihiko.odaki@daynix.com> Subject: [PATCH 09/29] gdbstub: Introduce gdb_find_static_feature() Date: Fri, 3 Nov 2023 19:59:36 +0000 Message-Id: <20231103195956.1998255-10-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231103195956.1998255-1-alex.bennee@linaro.org> References: <20231103195956.1998255-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::32a; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org |
Series |
gdbstub and plugin read register and windows support
|
expand
|
diff --git a/include/exec/gdbstub.h b/include/exec/gdbstub.h index a43aa34dad..7fe00506c7 100644 --- a/include/exec/gdbstub.h +++ b/include/exec/gdbstub.h @@ -44,6 +44,14 @@ void gdb_register_coprocessor(CPUState *cpu, */ int gdbserver_start(const char *port_or_device); +/** + * gdb_find_static_feature() - Find a static feature. + * @xmlname: The name of the XML. + * + * Return: The static feature. + */ +const GDBFeature *gdb_find_static_feature(const char *xmlname); + void gdb_set_stop_cpu(CPUState *cpu); /* in gdbstub-xml.c, generated by scripts/feature_to_c.py */ diff --git a/gdbstub/gdbstub.c b/gdbstub/gdbstub.c index 29540a0284..ae24c4848f 100644 --- a/gdbstub/gdbstub.c +++ b/gdbstub/gdbstub.c @@ -422,6 +422,19 @@ static const char *get_feature_xml(const char *p, const char **newp, return NULL; } +const GDBFeature *gdb_find_static_feature(const char *xmlname) +{ + const GDBFeature *feature; + + for (feature = gdb_static_features; feature->xmlname; feature++) { + if (!strcmp(feature->xmlname, xmlname)) { + return feature; + } + } + + g_assert_not_reached(); +} + static int gdb_read_register(CPUState *cpu, GByteArray *buf, int reg) { CPUClass *cc = CPU_GET_CLASS(cpu);