From: Richard Henderson <richard.henderson@linaro.org>
To: Akihiko Odaki <akihiko.odaki@daynix.com>
Cc: qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [PATCH v4 05/25] target/arm: Move the reference to arm-core.xml
Date: Wed, 16 Aug 2023 08:47:51 -0700 [thread overview]
Message-ID: <3461575d-6f5f-ffd0-4392-dbd9a84bfdc0@linaro.org> (raw)
In-Reply-To: <20230816145155.21049-6-akihiko.odaki@daynix.com>
On 8/16/23 07:51, Akihiko Odaki wrote:
> 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 <akihiko.odaki@daynix.com>
> ---
> 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)
I guess this is ok. I was going to say that the gdb_num_core_regs should be moved too
(into here and into the m-profile copy). But that gets fixed in the next patch.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
r~
next prev parent reply other threads:[~2023-08-16 15:48 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-16 14:51 [PATCH v4 00/25] plugins: Allow to read registers Akihiko Odaki
2023-08-16 14:51 ` [PATCH v4 01/25] contrib/plugins: Use GRWLock in execlog Akihiko Odaki
2023-08-16 15:24 ` Richard Henderson
2023-08-16 14:51 ` [PATCH v4 02/25] gdbstub: Introduce GDBFeature structure Akihiko Odaki
2023-08-16 15:31 ` Richard Henderson
2023-08-16 14:51 ` [PATCH v4 03/25] gdbstub: Add num_regs member to GDBFeature Akihiko Odaki
2023-08-16 14:51 ` [PATCH v4 04/25] gdbstub: Introduce gdb_find_static_feature() Akihiko Odaki
2023-08-16 15:37 ` Richard Henderson
2023-08-16 14:51 ` [PATCH v4 05/25] target/arm: Move the reference to arm-core.xml Akihiko Odaki
2023-08-16 15:47 ` Richard Henderson [this message]
2023-08-16 14:51 ` [PATCH v4 06/25] hw/core/cpu: Replace gdb_core_xml_file with gdb_core_feature Akihiko Odaki
2023-08-16 15:58 ` Richard Henderson
2023-08-16 16:31 ` Akihiko Odaki
2023-08-16 14:51 ` [PATCH v4 07/25] gdbstub: Introduce GDBFeatureBuilder Akihiko Odaki
2023-08-16 16:11 ` Richard Henderson
2023-08-16 14:51 ` [PATCH v4 08/25] target/arm: Use GDBFeature for dynamic XML Akihiko Odaki
2023-08-16 16:19 ` Richard Henderson
2023-08-16 14:51 ` [PATCH v4 09/25] target/ppc: " Akihiko Odaki
2023-08-16 16:24 ` Richard Henderson
2023-08-16 14:51 ` [PATCH v4 10/25] target/riscv: " Akihiko Odaki
2023-08-16 16:26 ` Richard Henderson
2023-08-16 14:51 ` [PATCH v4 11/25] gdbstub: Use GDBFeature for gdb_register_coprocessor Akihiko Odaki
2023-08-16 14:51 ` [PATCH v4 12/25] gdbstub: Use GDBFeature for GDBRegisterState Akihiko Odaki
2023-08-16 14:51 ` [PATCH v4 13/25] hw/core/cpu: Return static value with gdb_arch_name() Akihiko Odaki
2023-08-16 14:51 ` [PATCH v4 14/25] gdbstub: Dynamically allocate target.xml buffer Akihiko Odaki
2023-08-16 14:51 ` [PATCH v4 15/25] gdbstub: Simplify XML lookup Akihiko Odaki
2023-08-16 14:51 ` [PATCH v4 16/25] hw/core/cpu: Remove gdb_get_dynamic_xml member Akihiko Odaki
2023-08-16 14:51 ` [PATCH v4 17/25] gdbstub: Add members to identify registers to GDBFeature Akihiko Odaki
2023-08-16 14:51 ` [PATCH v4 18/25] hw/core/cpu: Add a parameter to gdb_read_register/gdb_write_register Akihiko Odaki
2023-08-16 14:51 ` [PATCH v4 19/25] gdbstub: Hide gdb_has_xml Akihiko Odaki
2023-08-16 14:51 ` [PATCH v4 20/25] gdbstub: Expose functions to read registers Akihiko Odaki
2023-08-16 14:51 ` [PATCH v4 21/25] cpu: Call plugin hooks only when ready Akihiko Odaki
2023-08-16 14:51 ` [PATCH v4 22/25] plugins: Allow to read registers Akihiko Odaki
2023-08-16 14:51 ` [PATCH v4 23/25] contrib/plugins: Allow to log registers Akihiko Odaki
2023-08-16 14:51 ` [PATCH v4 24/25] plugins: Support C++ Akihiko Odaki
2023-08-16 14:51 ` [PATCH v4 25/25] contrib/plugins: Add cc plugin Akihiko Odaki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3461575d-6f5f-ffd0-4392-dbd9a84bfdc0@linaro.org \
--to=richard.henderson@linaro.org \
--cc=akihiko.odaki@daynix.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).