From patchwork Mon Sep 25 14:48:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 1839132 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=e+CwW3gt; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RvQtZ2qFgz1ynF for ; Tue, 26 Sep 2023 00:56:22 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qkmuu-0003Oa-6O; Mon, 25 Sep 2023 10:50:34 -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 ) id 1qkmtu-0001q3-LC for qemu-devel@nongnu.org; Mon, 25 Sep 2023 10:49:34 -0400 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qkmtV-0008Ks-Dz for qemu-devel@nongnu.org; Mon, 25 Sep 2023 10:49:30 -0400 Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-313e742a787so4463403f8f.1 for ; Mon, 25 Sep 2023 07:49:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1695653344; x=1696258144; 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=zo11DLU+8rquYH4lZEKdtepCDhuEE9DTjCn4uAyQoPU=; b=e+CwW3gtERnbhQc7HqRIdkR4/xI31YSvR6QYChat/Fs0uEsnr14uaMymruJLDOOKji 3RSutnJ0AhEMM5iZQRSvApT8aYV/NT6tJl/Tm9ST9tmpXN5uj5wRAGwX0FnQK+to8MAt yGDNtosknsF7ARib1HkwsO7xTQj9XVVyHBArAvxri6+o5+jdNxMYLoFsKsii1/SKYULX IBd3szXtpOeFQZRgToZnZzuOLRVlu4Z9+gxMAoTtMDXkLgkMmOzHp65Hep5KJ861LNML gmPzDPkNE6H0FXIXz1rGlfginxMJCQTWyPzeyzDUkp3iFedcJ+lRHJr/r9vL5WPQovUn PdPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695653344; x=1696258144; 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=zo11DLU+8rquYH4lZEKdtepCDhuEE9DTjCn4uAyQoPU=; b=jbw1WkQQ75bZ/ZY5+gRYe9UOmseWrmhugvoFwOJE7lMXlneUdUW2kMOupTiKQEsrJ4 gB1aR7MooXaSNeqqwzujsJfcgaAMUD5n4qyW02zOVBplQ5kevpyo5cE+lVH2d21Q9Q22 9+6tucoS+bz2/DPu4Z+KjXp/t9YDD6mmiAo0hm3TgxPHE0yDJVxbXsM4mUsUP9b8cdHe dMK2r8hDZ9/xVOpEznsY9g6OE92HrTDX+xGYQaTHobDNlTUzHm9wGEUJrHZTMSU4zHNM UvGUr5wRLyGeRcdkcJ3VpYkqJbZwFw8wowmNCFEdBaAU/OBJ5Gq1+r9yIuJmXacSsIae 2zYg== X-Gm-Message-State: AOJu0YxX/5pNoX1am3pFTFs45gMLfZimh0m3ahlGewudkaYL1ysv3gzD I/XZt5nIzK0++p7Z3XYxK28Ncw== X-Google-Smtp-Source: AGHT+IH5WEnpPHBw1XnsLzrdfo08FkSzYM+F5tTVEh0k6x1eVqECKHSqKZKha5HuVXzuyhuHYbRnqA== X-Received: by 2002:a5d:5a89:0:b0:323:1738:1c35 with SMTP id bp9-20020a5d5a89000000b0032317381c35mr5459173wrb.26.1695653343990; Mon, 25 Sep 2023 07:49:03 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id r2-20020adfe682000000b0031ff89af0e4sm12008603wrm.99.2023.09.25.07.48.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Sep 2023 07:49:01 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 5ED431FFCB; Mon, 25 Sep 2023 15:48:57 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Alistair Francis , =?utf-8?q?C=C3=A9dric_Le_Go?= =?utf-8?q?ater?= , Marcin Juszkiewicz , John Snow , libvir-list@redhat.com, =?utf-8?q?Marc-Andr?= =?utf-8?q?=C3=A9_Lureau?= , qemu-s390x@nongnu.org, Song Gao , Daniel Henrique Barboza , Marcel Apfelbaum , Bastian Koppelmann , Liu Zhiwei , Weiwei Li , Nicholas Piggin , Radoslaw Biernacki , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Eduardo Habkost , Cleber Rosa , Paolo Bonzini , Mahmoud Mandour , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Thomas Huth , Wainer dos Santos Moschetta , Richard Henderson , Bin Meng , Alexandre Iooss , Xiaojuan Yang , qemu-ppc@nongnu.org, David Hildenbrand , =?utf-8?q?Alex_Benn=C3=A9e?= , Yanan Wang , Peter Maydell , qemu-riscv@nongnu.org, qemu-arm@nongnu.org, Palmer Dabbelt , Ilya Leoshkevich , Laurent Vivier , Yoshinori Sato , Leif Lindholm , Beraldo Leal , Akihiko Odaki Subject: [PATCH 19/31] gdbstub: Remove gdb_has_xml variable Date: Mon, 25 Sep 2023 15:48:42 +0100 Message-Id: <20230925144854.1872513-20-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230925144854.1872513-1-alex.bennee@linaro.org> References: <20230925144854.1872513-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::429; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x429.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 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Akihiko Odaki GDB has XML support since 6.7 which was released in 2007. It's time to remove support for old GDB versions without XML support. Signed-off-by: Akihiko Odaki Message-Id: <20230912224107.29669-12-akihiko.odaki@daynix.com> Signed-off-by: Alex Bennée --- gdbstub/internals.h | 2 -- include/exec/gdbstub.h | 8 -------- gdbstub/gdbstub.c | 15 --------------- 3 files changed, 25 deletions(-) diff --git a/gdbstub/internals.h b/gdbstub/internals.h index fee243081f..7128c4aa85 100644 --- a/gdbstub/internals.h +++ b/gdbstub/internals.h @@ -32,8 +32,6 @@ enum { typedef struct GDBProcess { uint32_t pid; bool attached; - - /* If gdb sends qXfer:features:read:target.xml this will be populated */ char *target_xml; } GDBProcess; diff --git a/include/exec/gdbstub.h b/include/exec/gdbstub.h index 705be2c5d7..1a01c35f8e 100644 --- a/include/exec/gdbstub.h +++ b/include/exec/gdbstub.h @@ -45,14 +45,6 @@ int gdbserver_start(const char *port_or_device); void gdb_set_stop_cpu(CPUState *cpu); -/** - * gdb_has_xml() - report of gdb supports modern target descriptions - * - * This will report true if the gdb negotiated qXfer:features:read - * target descriptions. - */ -bool gdb_has_xml(void); - /* in gdbstub-xml.c, generated by scripts/feature_to_c.py */ extern const GDBFeature gdb_static_features[]; diff --git a/gdbstub/gdbstub.c b/gdbstub/gdbstub.c index a4f2bf3723..177dce9ba2 100644 --- a/gdbstub/gdbstub.c +++ b/gdbstub/gdbstub.c @@ -349,11 +349,6 @@ static CPUState *gdb_get_cpu(uint32_t pid, uint32_t tid) } } -bool gdb_has_xml(void) -{ - return !!gdb_get_cpu_process(gdbserver_state.g_cpu)->target_xml; -} - static const char *get_feature_xml(const char *p, const char **newp, GDBProcess *process) { @@ -1086,11 +1081,6 @@ static void handle_set_reg(GArray *params, void *user_ctx) { int reg_size; - if (!gdb_get_cpu_process(gdbserver_state.g_cpu)->target_xml) { - gdb_put_packet(""); - return; - } - if (params->len != 2) { gdb_put_packet("E22"); return; @@ -1107,11 +1097,6 @@ static void handle_get_reg(GArray *params, void *user_ctx) { int reg_size; - if (!gdb_get_cpu_process(gdbserver_state.g_cpu)->target_xml) { - gdb_put_packet(""); - return; - } - if (!params->len) { gdb_put_packet("E14"); return;