From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AEA96C001B0 for ; Mon, 14 Aug 2023 13:22:36 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qVXWH-0007Ma-Ns; Mon, 14 Aug 2023 09:22:07 -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 1qVXVX-0007Bd-Fs for qemu-devel@nongnu.org; Mon, 14 Aug 2023 09:21:20 -0400 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qVXVV-00073q-EH for qemu-devel@nongnu.org; Mon, 14 Aug 2023 09:21:19 -0400 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-3fe4a89e7efso38723925e9.3 for ; Mon, 14 Aug 2023 06:21:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1692019276; x=1692624076; h=content-transfer-encoding:mime-version:message-id:in-reply-to:date :subject:cc:to:from:user-agent:references:from:to:cc:subject:date :message-id:reply-to; bh=Z4nJVgw3EKNj4eUFiyNtS/fu7ofeVBJbbuOt5lEFfwY=; b=SPtDEjQVrqfI4B3/X28mkB6k4EeJzqkL2ietC9cDXNkC20n5EuKbAM/hzo72cJtETI iQIwoNfa+Kno/dxZOquRxo2xMeMBKgNB7tozepw3Dv48JL4Icr+2wn9Sn1LbQ9LxgIkC dpp83y6zwoiCQSTvXu39Dvfk8i4dph8PKTsJHwOkTUQ6QFGgGT96B5jZhNHf/T3RCqVw qHCV/KtHW8CpE94Y17hs0/5BgbAkriRXSlAhH2/xbcm8Knhn+I7xpYez/fI0Q2HAi22+ /k3ITNXkjnOzqfNDF4Mitj77zXE2q5bSWQkFVk7ILxLS9qV78jJ7q6WpiThNcMJPZZs4 mVCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692019276; x=1692624076; h=content-transfer-encoding:mime-version:message-id:in-reply-to:date :subject:cc:to:from:user-agent:references:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=Z4nJVgw3EKNj4eUFiyNtS/fu7ofeVBJbbuOt5lEFfwY=; b=UTWA043dUTQtfF+iHctc45jxAKuRSk9GSpo3P8Ti8H6Vp2U/LuJ3/CmbwT+kgOCAHw q0xWf4NG2wMbc3jOYOvusyZn5rDiLnCbh67Myky7+LiUPmQWmfFpgaib1lC4R4/f2np3 4OujuMPq0X1bvx2/BGBE+cWEgOvKgNVwqPI0u9yEcDpsQrQzTPl6HjJ0HgwAysMnvtji 07ruaunnHmrLpbB+qSsawbGXadzSYlox7BeGOVuFP/cVD7i7S1zJLB2OeooNNRDH/mZs US7mOjVe96Z7qaRSzYhemTNB9mhun3C9/kl6IELQebL5A8/y+IvQcMDHR+/iZcV+HN88 JB6Q== X-Gm-Message-State: AOJu0YzBKlTe6f0k/ozcCQInmso/Vvi30ivFD6XoQImmYY7gip9DIxPB LNq5JelSOCSkTA98CPr0h9cBAw== X-Google-Smtp-Source: AGHT+IGgreBaHMtZZun+d1o4/Q9asn7JwUVNlE4S6QMkpLLqqMWrzY9FvqUx1HsvXXmae4wsQuhbDA== X-Received: by 2002:a1c:7c05:0:b0:3f8:fc2a:c7eb with SMTP id x5-20020a1c7c05000000b003f8fc2ac7ebmr7182761wmc.5.1692019275654; Mon, 14 Aug 2023 06:21:15 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id q5-20020a7bce85000000b003fe17e04269sm14281629wmj.40.2023.08.14.06.21.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Aug 2023 06:21:15 -0700 (PDT) Received: from zen (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id D93D21FFBB; Mon, 14 Aug 2023 14:21:14 +0100 (BST) References: <20230731084354.115015-1-akihiko.odaki@daynix.com> <20230731084354.115015-7-akihiko.odaki@daynix.com> User-agent: mu4e 1.11.14; emacs 29.1.50 From: Alex =?utf-8?Q?Benn=C3=A9e?= To: Akihiko Odaki Cc: Paolo Bonzini , Thomas Huth , Alexandre Iooss , Mahmoud Mandour , Eduardo Habkost , Marcel Apfelbaum , Philippe =?utf-8?Q?Mathieu-Daud?= =?utf-8?Q?=C3=A9?= , Yanan Wang , Richard Henderson , =?utf-8?Q?Marc-Andr=C3=A9?= Lureau , =?utf-8?Q?Daniel_P=2E_Berrang=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 Goater , 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 Subject: Re: [RFC PATCH 06/24] hw/core/cpu: Replace gdb_core_xml_file with gdb_core_feature Date: Mon, 14 Aug 2023 14:19:38 +0100 In-reply-to: <20230731084354.115015-7-akihiko.odaki@daynix.com> Message-ID: <87o7j9rc8l.fsf@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x333.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=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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Akihiko Odaki writes: > This is a tree-wide change to replace gdb_core_xml_file, the path to > GDB XML file with gdb_core_feature, the pointer to GDBFeature. This > also replaces the values assigned to gdb_num_core_regs with the > num_regs member of GDBFeature where applicable to remove magic numbers. > > A following change will utilize additional information provided by > GDBFeature to simplify XML file lookup. re: other comment about assert(). Maybe gdb_find_static_feature() needs to = assert success because: Thread 1 "qemu-loongarch6" received signal SIGSEGV, Segmentation fault. loongarch_cpu_class_init (c=3D, data=3D) at .= ./../target/loongarch/cpu.c:726 726 cc->gdb_num_core_regs =3D cc->gdb_core_feature->num_regs; (gdb) p/x cc->gdb_core_feature=20 $1 =3D 0x0 (gdb) l 721 cc->disas_set_info =3D loongarch_cpu_disas_set_info; 722 cc->gdb_read_register =3D loongarch_cpu_gdb_read_register; 723 cc->gdb_write_register =3D loongarch_cpu_gdb_write_register; 724 cc->disas_set_info =3D loongarch_cpu_disas_set_info; 725 cc->gdb_core_feature =3D gdb_find_static_feature("loongarch-bas= e64.xml"); 726 cc->gdb_num_core_regs =3D cc->gdb_core_feature->num_regs; 727 cc->gdb_stop_before_watchpoint =3D true; 728 cc->gdb_arch_name =3D loongarch_gdb_arch_name; 729 730 #ifdef CONFIG_TCG --=20 Alex Benn=C3=A9e Virtualisation Tech Lead @ Linaro