On 4/9/23 07:54, Michael Tokarev wrote:
03.09.2023 07:30, Akihiko Odaki wrote:
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.

Why it needs to be a function, can't it be a char pointer
initialized at the cpu init time?

For x86_gdb_arch_name() or ppc_gdb_arch_name() we could by
moving the #ifdef'ry, but for arm_gdb_arch_name() we'd need
to add a specific class for the iwMMXt CPU. Not sure worth
it...

Reply via email to