From: "Alex Bennée" <alex.bennee@linaro.org>
To: "Philippe Mathieu-Daudé" <philmd@linaro.org>
Cc: qemu-devel@nongnu.org, qemu-arm@nongnu.org,
Richard Henderson <richard.henderson@linaro.org>
Subject: Re: [PATCH v2 02/10] gdbstub: Clarify no more than @gdb_num_core_regs can be accessed
Date: Wed, 22 Jan 2025 20:55:44 +0000 [thread overview]
Message-ID: <8734hamuun.fsf@draig.linaro.org> (raw)
In-Reply-To: <20250122093028.52416-3-philmd@linaro.org> ("Philippe Mathieu-Daudé"'s message of "Wed, 22 Jan 2025 10:30:20 +0100")
Philippe Mathieu-Daudé <philmd@linaro.org> writes:
> Both CPUClass::gdb_read_register() and CPUClass::gdb_write_register()
> handlers are called from common gdbstub code, and won't be called with
> register index over CPUClass::gdb_num_core_regs:
>
> int gdb_read_register(CPUState *cpu, GByteArray *buf, int reg)
> {
> CPUClass *cc = CPU_GET_CLASS(cpu);
>
> if (reg < cc->gdb_num_core_regs) {
> return cc->gdb_read_register(cpu, buf, reg);
> }
> ...
> }
>
> static int gdb_write_register(CPUState *cpu, uint8_t *mem_buf, int reg)
> {
> CPUClass *cc = CPU_GET_CLASS(cpu);
>
> if (reg < cc->gdb_num_core_regs) {
> return cc->gdb_write_register(cpu, mem_buf, reg);
> }
> ...
> }
>
> Clarify that in CPUClass docstring, and remove unreachable code on
> the microblaze and tricore implementations.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
--
Alex Bennée
Virtualisation Tech Lead @ Linaro
next prev parent reply other threads:[~2025-01-22 20:55 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-22 9:30 [PATCH v2 00/10] cpus: Prefer cached CpuClass over CPU_GET_CLASS() macro Philippe Mathieu-Daudé
2025-01-22 9:30 ` [PATCH v2 01/10] hw/core/generic-loader: Do not open-code cpu_set_pc() Philippe Mathieu-Daudé
2025-01-24 19:25 ` Richard Henderson
2025-01-22 9:30 ` [PATCH v2 02/10] gdbstub: Clarify no more than @gdb_num_core_regs can be accessed Philippe Mathieu-Daudé
2025-01-22 9:32 ` Philippe Mathieu-Daudé
2025-01-22 20:55 ` Alex Bennée [this message]
2025-01-22 9:30 ` [PATCH v2 03/10] cpus: Cache CPUClass early in instance_init() handler Philippe Mathieu-Daudé
2025-01-22 9:30 ` [PATCH v2 04/10] cpus: Prefer cached CpuClass over CPU_GET_CLASS() macro Philippe Mathieu-Daudé
2025-01-22 9:30 ` [PATCH v2 05/10] accel: " Philippe Mathieu-Daudé
2025-01-22 9:30 ` [PATCH v2 06/10] user: " Philippe Mathieu-Daudé
2025-01-22 9:30 ` [PATCH v2 07/10] disas: " Philippe Mathieu-Daudé
2025-01-22 9:30 ` [PATCH v2 08/10] gdbstub: " Philippe Mathieu-Daudé
2025-01-22 21:34 ` Alex Bennée
2025-01-22 9:30 ` [PATCH v2 09/10] hw/acpi: " Philippe Mathieu-Daudé
2025-01-22 9:30 ` [PATCH v2 10/10] target/arm: " Philippe Mathieu-Daudé
2025-02-10 21:56 ` [PATCH v2 00/10] cpus: " Philippe Mathieu-Daudé
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=8734hamuun.fsf@draig.linaro.org \
--to=alex.bennee@linaro.org \
--cc=philmd@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.