From nobody Thu Nov 28 08:34:07 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1693715596; cv=none; d=zohomail.com; s=zohoarc; b=bWvt9xkPnaYmRpfqXdbuMG2FD5UddXfYx/GOObfwsAF+W/Tcy3/IOM0yaMM/Xx9gS6IyszvmoIceA6gqRBLWUCeJOrtlllR53i8lnpfBpHgqjJHE+oMkIZm4EKby1yqGbyPEwGXHDfqUXFgiHX/t0NeNJhNW47r5FRs6MmKmyEM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1693715596; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject; bh=VEpkefa+vwrcbEzUpVuiGVWFL+7pW2dZSw9F43I190M=; b=QgT8CrOqT/sRd6nDkVPYSuz83EOcVV4gCFMRrMnccFOnBc0XkUFR3GuAm1P5KwYk+DXjEDIlVsN38czNtl26yXFt7gCXMyOCQKey0zTfl9mMDuxtZmc3h1JV7nO79T4SjNdTZX9dsp2x4GVIBjNR/Sx/Divb5NuJfKarMcJEc1Y= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 169371559616826.749367231604424; Sat, 2 Sep 2023 21:33:16 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qcem8-0002IB-Ne; Sun, 03 Sep 2023 00:31:52 -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 1qcem0-0002Ep-RP for qemu-devel@nongnu.org; Sun, 03 Sep 2023 00:31:45 -0400 Received: from mail-pg1-x532.google.com ([2607:f8b0:4864:20::532]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qcely-00070G-BH for qemu-devel@nongnu.org; Sun, 03 Sep 2023 00:31:44 -0400 Received: by mail-pg1-x532.google.com with SMTP id 41be03b00d2f7-56c2e840e70so268747a12.3 for ; Sat, 02 Sep 2023 21:31:42 -0700 (PDT) Received: from alarm.flets-east.jp ([2400:4050:a840:1e00:78d2:b862:10a7:d486]) by smtp.gmail.com with ESMTPSA id iz2-20020a170902ef8200b001bb9f104328sm5295792plb.146.2023.09.02.21.31.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 02 Sep 2023 21:31:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=daynix-com.20230601.gappssmtp.com; s=20230601; t=1693715501; x=1694320301; 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=VEpkefa+vwrcbEzUpVuiGVWFL+7pW2dZSw9F43I190M=; b=piHSXw+43F7E7TGvLNqsL84Tg8UAHzpuxPzUuyBQSAPvdXkj1AbZf55qxtQwqCcM1z nB1QODNUHV86by+FPyPulWdQsYwnbEswq+PKbGQzsvg+b+hjFEsXEQb96WbGyLR13h8g Jz+vNt9u7CrUjbBsAkb5Yba8ruhDz9APRg/PiVqSVUWXj0YTbzqplhoCa3NT8VJq+hGA y49j7mYtV8eHWYjMh/KiEWKiLGJrsq79as31PfGXqEJ8pCCuXtMFzw52SeC/HMwB7bPa ZYaJXuVKA/SLIaa36aNpg/CUgLl4x36un5ATbHBYkzZFkh01CGMjNffM+gQ7uG/goAKm Ch2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693715501; x=1694320301; 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=VEpkefa+vwrcbEzUpVuiGVWFL+7pW2dZSw9F43I190M=; b=JTGxcsK2QuCOmmJYraWVcz3Pc5iXE+7NuavYWWpHaWC7JKT4n7omPfSfHZ1RQeLlkN t2nPZ0cudc69UjCq/dUJGYh6yH1TFhFbyC5tVguGQy03f/JwzUE5hQHIlsPTtT7ZjnC7 a9l48mBj24ILSRtyWxj2dMyASD8/qecH4K9AaZaleoJ39ZT5Twg/4bXXWLvScfeD4lJG mNrk/5gGaPmR0Vwc1aoU9cZv/O2A1Q/MGLDo6evMBvZUjThCmPhBTnhe5YN+VTSdkPE4 CV9JTEmajwVEXk4dcRfyEBl2laEcR1KdZeMSexPlqjunTmfvVfFoQot5MrzDylC+aayC Nv5Q== X-Gm-Message-State: AOJu0YxRnUN4/EXoam6gavqQDvvvR5Z0HErxlAWeSe1bgD08PcTRPeqL J6o1gAGHRip0Sfzhv5QhBzwLrw== X-Google-Smtp-Source: AGHT+IGgh+1VfKLQaHmCsegaxJ/N/F1rIFb0Lzv4WKdJJBl902/x/DzzoZawowmQ7cAg86Skg0i2QA== X-Received: by 2002:a17:902:d3d5:b0:1b6:c229:c350 with SMTP id w21-20020a170902d3d500b001b6c229c350mr7414253plb.18.1693715501143; Sat, 02 Sep 2023 21:31:41 -0700 (PDT) From: Akihiko Odaki To: Cc: =?UTF-8?q?Alex=20Benn=C3=A9e?= , Mikhail Tyutin , Aleksandr Anenkov , qemu-devel@nongnu.org, Akihiko Odaki , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 8/8] gdbstub: Remove gdb_has_xml variable Date: Sun, 3 Sep 2023 13:30:18 +0900 Message-ID: <20230903043030.20708-9-akihiko.odaki@daynix.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230903043030.20708-1-akihiko.odaki@daynix.com> References: <20230903043030.20708-1-akihiko.odaki@daynix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: none client-ip=2607:f8b0:4864:20::532; envelope-from=akihiko.odaki@daynix.com; helo=mail-pg1-x532.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @daynix-com.20230601.gappssmtp.com) X-ZM-MESSAGEID: 1693715596622100001 Content-Type: text/plain; charset="utf-8" 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 --- include/exec/gdbstub.h | 8 -------- gdbstub/gdbstub.c | 13 ------------- gdbstub/softmmu.c | 1 - gdbstub/user.c | 1 - 4 files changed, 23 deletions(-) diff --git a/include/exec/gdbstub.h b/include/exec/gdbstub.h index 3f08093321..ecbc60a934 100644 --- a/include/exec/gdbstub.h +++ b/include/exec/gdbstub.h @@ -35,14 +35,6 @@ int gdbserver_start(const char *port_or_device); =20 void gdb_set_stop_cpu(CPUState *cpu); =20 -/** - * gdb_has_xml: - * This is an ugly hack to cope with both new and old gdb. - * If gdb sends qXfer:features:read then assume we're talking to a newish - * gdb that understands target descriptions. - */ -extern bool gdb_has_xml; - /* in gdbstub-xml.c, generated by scripts/feature_to_c.py */ extern const GDBFeature gdb_static_features[]; =20 diff --git a/gdbstub/gdbstub.c b/gdbstub/gdbstub.c index 3f97dc66e5..61c811f42b 100644 --- a/gdbstub/gdbstub.c +++ b/gdbstub/gdbstub.c @@ -75,8 +75,6 @@ void gdb_init_gdbserver_state(void) gdbserver_state.sstep_flags &=3D gdbserver_state.supported_sstep_flags; } =20 -bool gdb_has_xml; - /* writes 2*len+1 bytes in buf */ void gdb_memtohex(GString *buf, const uint8_t *mem, int len) { @@ -1054,11 +1052,6 @@ static void handle_set_reg(GArray *params, void *use= r_ctx) { int reg_size; =20 - if (!gdb_has_xml) { - gdb_put_packet(""); - return; - } - if (params->len !=3D 2) { gdb_put_packet("E22"); return; @@ -1075,11 +1068,6 @@ static void handle_get_reg(GArray *params, void *use= r_ctx) { int reg_size; =20 - if (!gdb_has_xml) { - gdb_put_packet(""); - return; - } - if (!params->len) { gdb_put_packet("E14"); return; @@ -1542,7 +1530,6 @@ static void handle_query_xfer_features(GArray *params= , void *user_ctx) return; } =20 - gdb_has_xml =3D true; p =3D get_param(params, 0)->data; xml =3D get_feature_xml(p, &p, process); if (!xml) { diff --git a/gdbstub/softmmu.c b/gdbstub/softmmu.c index 5282324764..42645d2220 100644 --- a/gdbstub/softmmu.c +++ b/gdbstub/softmmu.c @@ -97,7 +97,6 @@ static void gdb_chr_event(void *opaque, QEMUChrEvent even= t) =20 vm_stop(RUN_STATE_PAUSED); replay_gdb_attached(); - gdb_has_xml =3D false; break; default: break; diff --git a/gdbstub/user.c b/gdbstub/user.c index 5b375be1d9..7ab6e5d975 100644 --- a/gdbstub/user.c +++ b/gdbstub/user.c @@ -198,7 +198,6 @@ static void gdb_accept_init(int fd) gdbserver_state.c_cpu =3D gdb_first_attached_cpu(); gdbserver_state.g_cpu =3D gdbserver_state.c_cpu; gdbserver_user_state.fd =3D fd; - gdb_has_xml =3D false; } =20 static bool gdb_accept_socket(int gdb_fd) --=20 2.42.0