]> git.proxmox.com Git - mirror_qemu.git/commit - include/hw/core/cpu.h
hw/core/cpu: Return static value with gdb_arch_name()
authorAkihiko Odaki <akihiko.odaki@daynix.com>
Mon, 9 Oct 2023 16:40:53 +0000 (17:40 +0100)
committerAlex Bennée <alex.bennee@linaro.org>
Wed, 11 Oct 2023 07:46:33 +0000 (08:46 +0100)
commita650683871ba728ebce3d320941f48bac91f0f6a
treeb6f989a58d18eac06cb18751d168a147936f502b
parent48de6462809587a2165260b4daa8e6477fbd7b75
hw/core/cpu: Return static value with gdb_arch_name()

All implementations of gdb_arch_name() returns dynamic duplicates of
static strings. It's also unlikely that there will be an implementation
of gdb_arch_name() that returns a truly dynamic value due to the nature
of the function returning a well-known identifiers. Qualify the value
gdb_arch_name() with const and make all of its implementations return
static strings.

Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-Id: <20230912224107.29669-8-akihiko.odaki@daynix.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20231009164104.369749-15-alex.bennee@linaro.org>
gdbstub/gdbstub.c
include/hw/core/cpu.h
target/arm/cpu.c
target/arm/cpu64.c
target/i386/cpu.c
target/loongarch/cpu.c
target/ppc/gdbstub.c
target/ppc/internal.h
target/riscv/cpu.c
target/s390x/cpu.c
target/tricore/cpu.c