From patchwork Mon Feb 26 16:56:30 2024 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: 775886 Delivered-To: patch@linaro.org Received: by 2002:ab3:621a:0:b0:258:3251:9e33 with SMTP id w26csp1475743lte; Mon, 26 Feb 2024 09:01:49 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUQHh+6zYxzLRcWaTqXfwtLwcnuKUUeQ9UhVJb9L0bTtwQYV3+eJZDb5sxtizki3q0AcNJNYL+THSlQKThFHNMS X-Google-Smtp-Source: AGHT+IGusqxkKGOtHcDDY/7T0fv7IcJ/2RlxJPxJ2JLI0im/mWtMrEk5/U677PuKBulx2oPMr2Rs X-Received: by 2002:a05:6808:f8e:b0:3c1:aa19:47fa with SMTP id o14-20020a0568080f8e00b003c1aa1947famr1177164oiw.56.1708966909649; Mon, 26 Feb 2024 09:01:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708966909; cv=none; d=google.com; s=arc-20160816; b=wpsuULS+EMVZj88DD/0mFGNxSOkcmBhykeUY7c6YeGHJetwGdaKaGj9lcYoNBw0nRU kgb2ROzkfEqAO1c6GFPW+pTbgIX1yuuXI4IF7rTnDy34ZdxIhk3f2nZm7rF0uzGyL3JK ulynmypwkIspEB3byMep7sXTnnnUr2lFEzCL8Nz8Wl1udc1YnwuG+84oCCLco6MoWabH qrHheU4BPn7HYyZ5vUy5mOSWmsTOBp+rEdAFjSeSXHhJgDz4dHbjsCRRRiVL6GZNOQ9R vFanyIotq/vqPMwwqBstwgvtiuq5R7/nFVs97flxRVhv+aI2RLd9O21lot/XBBLx5l2i pd1Q== 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=m5QrhORKQXYv0pzCl6ansjRiTWdObzMQswF5xvhKoks=; fh=inHz/qE9VTgeXyA0ge5D6fVYa/Mfhts5ntNvtYndEVE=; b=JPhv3KCqfdIPsc80YQisIlsR38j3J+rQVtBqIoy9EzPH7qKpjyBU8j1srJ+WZObuc5 S3nDrbub2LNOEbiV8mYPje0Wb+W8EF7bSYbefn/MZvMn1oazBBkGaqatODWQstISjjjD J3AJsVZan9tSIEpnr0CjKwpH7b4CIjsyXNI06vYKQ1zFRTlSjm2M6Iwo1jhfJQZ9RR6/ TfeXei+RBO2dc00UMgOhoIwHWaFfXIa58NRgcs+9wA/YoDZ2RS/H8Jm/YBeE1fMTd8tU JlTQBoW6TgAtStI1cb8t30Gm3stPYX02U8DSi/ZIxNoXtGL09PtAFDC69VyjtK5okR6Z yKxA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=X7SKPAwA; 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: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id t26-20020a0561020a1a00b004704c57af5esi524047vsa.672.2024.02.26.09.01.49 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 26 Feb 2024 09:01:49 -0800 (PST) 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=X7SKPAwA; 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 ) id 1reeIS-0006H7-AM; Mon, 26 Feb 2024 11:57:44 -0500 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 1reeIJ-00061v-0G for qemu-devel@nongnu.org; Mon, 26 Feb 2024 11:57:35 -0500 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1reeHl-0007fh-9d for qemu-devel@nongnu.org; Mon, 26 Feb 2024 11:57:34 -0500 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-412a3371133so9900915e9.2 for ; Mon, 26 Feb 2024 08:57:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708966619; x=1709571419; 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=m5QrhORKQXYv0pzCl6ansjRiTWdObzMQswF5xvhKoks=; b=X7SKPAwAyHgiEK+tichAFVkzIO8A3p8GwCbB6azSz/lrbGaoGI/dZ5RM8HUv7URtr/ KMkQ89VDG7bhlHDpS5GBTTr5pVTnmTUIWGz2icoYXo6HbQnr/ozt55Nxqjow3FNFT4gD 5AIBleucU8tTrw2VLbjIsswPXMC0wB5lEFl+hveYlSl0S4qFelMfGQqrVeCeMOXuyH1O h7hKGZENAOHxaqFvfdasnyrj0kXZAmdu4crofYUISASsQSjj6WB0AWVV/nP5HlOPxCX7 ZngutXEbr1hXs1B2fw6smKaUEuTsrgGoo31rpn2CfwiBBfAyXU0KjgLdHJQ85qUDu4ai nOZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708966619; x=1709571419; 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=m5QrhORKQXYv0pzCl6ansjRiTWdObzMQswF5xvhKoks=; b=OJsrspJv9VPrSO2TgRxfbstJx1yRvlE7hl6DEUUvY3rOIFZG+RoQqmfvw34FK5g+x1 Ynsr4PAs/jfnJVpVspTlcBEA1ptl5ppROHT+HMlaMO5k3bf6f6p2pq2Xeyj4CzSUsArO u6Hgv/YqNdFyGm1NvaEIyJSGdtuk2bwoNIh2zc1XAw4bXjlV6lF/qKwfADcFaAp1Jf/0 cJYzFDNmiZp1zsLu6U6YdNTwYa0JDpAvXgWbjghckERYbrzQFbqjd3AUYY3WK06B19wU A/GqqfIBECLDUYFB5l6/saCloDcqgSOmk3ORNFsEzUqw1hHYMg/L6D8s+2e7qXxvWZSD XeXQ== X-Gm-Message-State: AOJu0YwUmyXPTYG+vvlDjksEEdtnQu5A+9Zdx6olxOKCxTHPA0aaY4Ew 50oxtRPC//B1Gcu2I9Gwql3KByQvimqYbeQrk/jNUerXbXW2Ha2lBTKJNxMXegQ= X-Received: by 2002:a05:600c:4504:b0:412:77a4:d7c with SMTP id t4-20020a05600c450400b0041277a40d7cmr6303737wmo.9.1708966619040; Mon, 26 Feb 2024 08:56:59 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id k35-20020a05600c1ca300b00412a7d9fb9csm2412668wms.45.2024.02.26.08.56.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 08:56:55 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id DD8715F8A4; Mon, 26 Feb 2024 16:56:47 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Nicholas Piggin , Liu Zhiwei , =?utf-8?q?C=C3=A9dric_Le_Goater?= , Peter Maydell , =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-riscv@nongnu.org, Michael Rolnik , Song Gao , Alexandre Iooss , Marcel Apfelbaum , David Hildenbrand , Pierrick Bouvier , John Snow , Eduardo Habkost , Mahmoud Mandour , qemu-arm@nongnu.org, =?utf-8?q?Phi?= =?utf-8?q?lippe_Mathieu-Daud=C3=A9?= , Paolo Bonzini , Cleber Rosa , qemu-ppc@nongnu.org, Richard Henderson , qemu-s390x@nongnu.org, Daniel Henrique Barboza , Thomas Huth , Yoshinori Sato , Yanan Wang , Brian Cain , Ilya Leoshkevich , Weiwei Li , "Edgar E. Iglesias" , Bin Meng , Laurent Vivier , Palmer Dabbelt , Daniel Henrique Barboza , Alistair Francis , Akihiko Odaki Subject: [PATCH v3 11/27] hw/core/cpu: Remove gdb_get_dynamic_xml member Date: Mon, 26 Feb 2024 16:56:30 +0000 Message-Id: <20240226165646.425600-12-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240226165646.425600-1-alex.bennee@linaro.org> References: <20240226165646.425600-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32c.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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Akihiko Odaki This function is no longer used. Signed-off-by: Akihiko Odaki Reviewed-by: Alex Bennée Message-Id: <20240103173349.398526-35-alex.bennee@linaro.org> Message-Id: <20231213-gdb-v17-9-777047380591@daynix.com> Signed-off-by: Alex Bennée --- include/hw/core/cpu.h | 4 ---- target/arm/cpu.h | 6 ------ target/ppc/cpu.h | 1 - target/arm/cpu.c | 1 - target/arm/gdbstub.c | 18 ------------------ target/ppc/cpu_init.c | 3 --- target/ppc/gdbstub.c | 10 ---------- target/riscv/cpu.c | 14 -------------- 8 files changed, 57 deletions(-) diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h index 1bbf21b2201..4b659799b00 100644 --- a/include/hw/core/cpu.h +++ b/include/hw/core/cpu.h @@ -133,9 +133,6 @@ struct SysemuCPUOps; * before the insn which triggers a watchpoint rather than after it. * @gdb_arch_name: Optional callback that returns the architecture name known * to GDB. The caller must free the returned string with g_free. - * @gdb_get_dynamic_xml: Callback to return dynamically generated XML for the - * gdb stub. Returns a pointer to the XML contents for the specified XML file - * or NULL if the CPU doesn't have a dynamically generated content for it. * @disas_set_info: Setup architecture specific components of disassembly info * @adjust_watchpoint_address: Perform a target-specific adjustment to an * address before attempting to match it against watchpoints. @@ -167,7 +164,6 @@ struct CPUClass { const char *gdb_core_xml_file; const gchar * (*gdb_arch_name)(CPUState *cpu); - const char * (*gdb_get_dynamic_xml)(CPUState *cpu, const char *xmlname); void (*disas_set_info)(CPUState *cpu, disassemble_info *info); diff --git a/target/arm/cpu.h b/target/arm/cpu.h index 508a9c1e0d6..a5b3d8f7da7 100644 --- a/target/arm/cpu.h +++ b/target/arm/cpu.h @@ -1159,12 +1159,6 @@ hwaddr arm_cpu_get_phys_page_attrs_debug(CPUState *cpu, vaddr addr, int arm_cpu_gdb_read_register(CPUState *cpu, GByteArray *buf, int reg); int arm_cpu_gdb_write_register(CPUState *cpu, uint8_t *buf, int reg); -/* Returns the dynamically generated XML for the gdb stub. - * Returns a pointer to the XML contents for the specified XML file or NULL - * if the XML name doesn't match the predefined one. - */ -const char *arm_gdb_get_dynamic_xml(CPUState *cpu, const char *xmlname); - int arm_cpu_write_elf64_note(WriteCoreDumpFunction f, CPUState *cs, int cpuid, DumpState *s); int arm_cpu_write_elf32_note(WriteCoreDumpFunction f, CPUState *cs, diff --git a/target/ppc/cpu.h b/target/ppc/cpu.h index c66989a5e60..0133da4e079 100644 --- a/target/ppc/cpu.h +++ b/target/ppc/cpu.h @@ -1545,7 +1545,6 @@ int ppc_cpu_gdb_write_register(CPUState *cpu, uint8_t *buf, int reg); int ppc_cpu_gdb_write_register_apple(CPUState *cpu, uint8_t *buf, int reg); #ifndef CONFIG_USER_ONLY hwaddr ppc_cpu_get_phys_page_debug(CPUState *cpu, vaddr addr); -const char *ppc_gdb_get_dynamic_xml(CPUState *cs, const char *xml_name); #endif int ppc64_cpu_write_elf64_note(WriteCoreDumpFunction f, CPUState *cs, int cpuid, DumpState *s); diff --git a/target/arm/cpu.c b/target/arm/cpu.c index 84887084d95..b2ea5d65132 100644 --- a/target/arm/cpu.c +++ b/target/arm/cpu.c @@ -2516,7 +2516,6 @@ static void arm_cpu_class_init(ObjectClass *oc, void *data) cc->sysemu_ops = &arm_sysemu_ops; #endif cc->gdb_arch_name = arm_gdb_arch_name; - cc->gdb_get_dynamic_xml = arm_gdb_get_dynamic_xml; cc->gdb_stop_before_watchpoint = true; cc->disas_set_info = arm_disas_set_info; diff --git a/target/arm/gdbstub.c b/target/arm/gdbstub.c index 059d84f98e5..a3bb73cfa7c 100644 --- a/target/arm/gdbstub.c +++ b/target/arm/gdbstub.c @@ -474,24 +474,6 @@ static GDBFeature *arm_gen_dynamic_m_secextreg_feature(CPUState *cs, #endif #endif /* CONFIG_TCG */ -const char *arm_gdb_get_dynamic_xml(CPUState *cs, const char *xmlname) -{ - ARMCPU *cpu = ARM_CPU(cs); - - if (strcmp(xmlname, "system-registers.xml") == 0) { - return cpu->dyn_sysreg_feature.desc.xml; - } else if (strcmp(xmlname, "sve-registers.xml") == 0) { - return cpu->dyn_svereg_feature.desc.xml; - } else if (strcmp(xmlname, "arm-m-system.xml") == 0) { - return cpu->dyn_m_systemreg_feature.desc.xml; -#ifndef CONFIG_USER_ONLY - } else if (strcmp(xmlname, "arm-m-secext.xml") == 0) { - return cpu->dyn_m_secextreg_feature.desc.xml; -#endif - } - return NULL; -} - void arm_cpu_register_gdb_regs_for_features(ARMCPU *cpu) { CPUState *cs = CPU(cpu); diff --git a/target/ppc/cpu_init.c b/target/ppc/cpu_init.c index 5f0ecf443d8..1d3d1db7c31 100644 --- a/target/ppc/cpu_init.c +++ b/target/ppc/cpu_init.c @@ -7385,9 +7385,6 @@ static void ppc_cpu_class_init(ObjectClass *oc, void *data) #endif cc->gdb_num_core_regs = 71; -#ifndef CONFIG_USER_ONLY - cc->gdb_get_dynamic_xml = ppc_gdb_get_dynamic_xml; -#endif #ifdef USE_APPLE_GDB cc->gdb_read_register = ppc_cpu_gdb_read_register_apple; cc->gdb_write_register = ppc_cpu_gdb_write_register_apple; diff --git a/target/ppc/gdbstub.c b/target/ppc/gdbstub.c index 43f61130c5f..122ea9d0c00 100644 --- a/target/ppc/gdbstub.c +++ b/target/ppc/gdbstub.c @@ -342,16 +342,6 @@ static void gdb_gen_spr_feature(CPUState *cs) gdb_feature_builder_end(&builder); } - -const char *ppc_gdb_get_dynamic_xml(CPUState *cs, const char *xml_name) -{ - PowerPCCPUClass *pcc = POWERPC_CPU_GET_CLASS(cs); - - if (strcmp(xml_name, "power-spr.xml") == 0) { - return pcc->gdb_spr.xml; - } - return NULL; -} #endif #if !defined(CONFIG_USER_ONLY) diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c index dd8a0e94897..5ff0192c527 100644 --- a/target/riscv/cpu.c +++ b/target/riscv/cpu.c @@ -2300,19 +2300,6 @@ static const gchar *riscv_gdb_arch_name(CPUState *cs) } } -static const char *riscv_gdb_get_dynamic_xml(CPUState *cs, const char *xmlname) -{ - RISCVCPU *cpu = RISCV_CPU(cs); - - if (strcmp(xmlname, "riscv-csr.xml") == 0) { - return cpu->dyn_csr_feature.xml; - } else if (strcmp(xmlname, "riscv-vector.xml") == 0) { - return cpu->dyn_vreg_feature.xml; - } - - return NULL; -} - #ifndef CONFIG_USER_ONLY static int64_t riscv_get_arch_id(CPUState *cs) { @@ -2359,7 +2346,6 @@ static void riscv_cpu_common_class_init(ObjectClass *c, void *data) cc->get_arch_id = riscv_get_arch_id; #endif cc->gdb_arch_name = riscv_gdb_arch_name; - cc->gdb_get_dynamic_xml = riscv_gdb_get_dynamic_xml; device_class_set_props(dc, riscv_cpu_properties); }