From patchwork Wed Aug 16 14:51:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akihiko Odaki X-Patchwork-Id: 1821879 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=daynix-com.20221208.gappssmtp.com header.i=@daynix-com.20221208.gappssmtp.com header.a=rsa-sha256 header.s=20221208 header.b=xCImB5v5; 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 4RQrjZ1nBwz1yXY for ; Thu, 17 Aug 2023 00:53:22 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qWHtW-0006Xy-Sz; Wed, 16 Aug 2023 10:53:10 -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 1qWHtV-0006Ux-7n for qemu-devel@nongnu.org; Wed, 16 Aug 2023 10:53:09 -0400 Received: from mail-pf1-x42c.google.com ([2607:f8b0:4864:20::42c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qWHtR-0001NO-8h for qemu-devel@nongnu.org; Wed, 16 Aug 2023 10:53:08 -0400 Received: by mail-pf1-x42c.google.com with SMTP id d2e1a72fcca58-68891000f34so484901b3a.0 for ; Wed, 16 Aug 2023 07:53:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=daynix-com.20221208.gappssmtp.com; s=20221208; t=1692197584; x=1692802384; 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=Z8QC8ufyB7xcDBCvHI4qa5+GakxSnSbOuWxZo6h21Sw=; b=xCImB5v5maAEizBxYrL++QyPLtpfkKhGwmGWVebpN15hlVtBjPauFwhD5ixf0KBwMk sIKtdNEvH2wQOesAAQsf5FA98L5Cmi2AghDnnPAoOuxLtMM7ibKpgdHsFNIM00eg4/eV M1Tng7gTNhUmHYwJX70f3otQYGkNNwuQuq7syuxlkaO6YrFSDji2yMTCxo0WVlQtAL2o v1Z0Jr1xQBYUXURz0ACmoVGysez/cKx5aJbnABv+4zFDs9kHTRrdfTZCOMm0E5S39pdT e5tMSJaK1udB5tB7QP3qYBYwR2hwFor9AeW0hebaEERIXsqlDoOJsUKL8JA9ty0t2Na1 0Q9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692197584; x=1692802384; 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=Z8QC8ufyB7xcDBCvHI4qa5+GakxSnSbOuWxZo6h21Sw=; b=ZVg/DhOunMpvoIdMkv1pWDJySTFP07JzKq0b3ru2fBS6bKhQ+m5jeqJ7txTIDr+uTN katGAILXt4MD3iVHbTD1kGcwL7JN7lT64mSZYHo7Smhl2M6fz3mPH33uMTNjsnIirzVY wkheUXkshak30GPT4iSVmiLb3IpjoNg6lQkbJE5ev0+Fw1Es1hZvDyqwFsCbqNelnvUh qUBj41Qt8dSdyY4vDU3oBXwanWRTJzZNwTcC/3s2H0XDjJuRsgBQDSFGNlrnQAVELmti 6xL6JGG+gqbQy1ETGPBj9DTM5UMQUipNzpxLeGX09VAWfc2L6czXo1hxL8Cmh0bhkPja QT8A== X-Gm-Message-State: AOJu0Yy5CFu+qyZWUl5xlxJTirjuAix+4zyF/rZZyYS2DP7IkqKifF9x /bncV/wb5rDaL8Lh0KLL8Px9Yw== X-Google-Smtp-Source: AGHT+IF136Ut7u8F19vMuGhsXspxaXkVuzAyk+qpMrK6l25QgUWT+DrFPsCrMtLv5a3md/bGqcreAw== X-Received: by 2002:a05:6a00:1587:b0:687:1c2c:7cf7 with SMTP id u7-20020a056a00158700b006871c2c7cf7mr2738945pfk.19.1692197583989; Wed, 16 Aug 2023 07:53:03 -0700 (PDT) Received: from alarm.flets-east.jp ([2400:4050:a840:1e00:78d2:b862:10a7:d486]) by smtp.gmail.com with ESMTPSA id fk26-20020a056a003a9a00b0068892c40253sm1156568pfb.216.2023.08.16.07.52.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Aug 2023 07:53:03 -0700 (PDT) From: Akihiko Odaki To: Cc: Paolo Bonzini , =?utf-8?q?Alex_Benn=C3=A9e?= , Thomas Huth , Alexandre Iooss , Mahmoud Mandour , Eduardo Habkost , Marcel Apfelbaum , =?utf-8?q?Philippe_Mathieu-D?= =?utf-8?q?aud=C3=A9?= , Yanan Wang , Richard Henderson , =?utf-8?q?Marc-Andr=C3=A9?= =?utf-8?q?_Lureau?= , =?utf-8?q?Daniel_P_=2E_B?= =?utf-8?q?errang=C3=A9?= , John Snow , Cleber Rosa , Peter Maydell , Michael Rolnik , "Edgar E . Iglesias" , Brian Cain , Song Gao , Xiaojuan Yang , Laurent Vivier , Aurelien Jarno , Jiaxun Yang , Aleksandar Rikalo , Chris Wulff , Marek Vasut , Stafford Horne , Daniel Henrique Barboza , =?utf-8?q?C=C3=A9dric_Le_G?= =?utf-8?q?oater?= , David Gibson , Greg Kurz , Nicholas Piggin , Palmer Dabbelt , Alistair Francis , Bin Meng , Weiwei Li , Liu Zhiwei , Yoshinori Sato , David Hildenbrand , Ilya Leoshkevich , Mark Cave-Ayland , Artyom Tarasenko , Bastian Koppelmann , Max Filippov , qemu-devel@nongnu.org, qemu-arm@nongnu.org, qemu-ppc@nongnu.org, qemu-riscv@nongnu.org, qemu-s390x@nongnu.org, Anton Kochkov , Akihiko Odaki Subject: [PATCH v4 05/25] target/arm: Move the reference to arm-core.xml Date: Wed, 16 Aug 2023 23:51:26 +0900 Message-ID: <20230816145155.21049-6-akihiko.odaki@daynix.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230816145155.21049-1-akihiko.odaki@daynix.com> References: <20230816145155.21049-1-akihiko.odaki@daynix.com> MIME-Version: 1.0 Received-SPF: none client-ip=2607:f8b0:4864:20::42c; envelope-from=akihiko.odaki@daynix.com; helo=mail-pf1-x42c.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=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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Some subclasses overwrite gdb_core_xml_file member but others don't. Always initialize the member in the subclasses for consistency. This especially helps for AArch64; in a following change, the file specified by gdb_core_xml_file is always looked up even if it's going to be overwritten later. Looking up arm-core.xml results in an error as it will not be embedded in the AArch64 build. Signed-off-by: Akihiko Odaki Reviewed-by: Richard Henderson --- target/arm/cpu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target/arm/cpu.c b/target/arm/cpu.c index 93c28d50e5..d71a162070 100644 --- a/target/arm/cpu.c +++ b/target/arm/cpu.c @@ -2354,7 +2354,6 @@ static void arm_cpu_class_init(ObjectClass *oc, void *data) cc->sysemu_ops = &arm_sysemu_ops; #endif cc->gdb_num_core_regs = 26; - cc->gdb_core_xml_file = "arm-core.xml"; cc->gdb_arch_name = arm_gdb_arch_name; cc->gdb_get_dynamic_xml = arm_gdb_get_dynamic_xml; cc->gdb_stop_before_watchpoint = true; @@ -2376,8 +2375,10 @@ static void arm_cpu_instance_init(Object *obj) static void cpu_register_class_init(ObjectClass *oc, void *data) { ARMCPUClass *acc = ARM_CPU_CLASS(oc); + CPUClass *cc = CPU_CLASS(acc); acc->info = data; + cc->gdb_core_xml_file = "arm-core.xml"; } void arm_cpu_register(const ARMCPUInfo *info)