|
From: | Philippe Mathieu-Daudé |
Subject: | Re: [PATCH 4/8] hw/core/cpu: Return static value with gdb_arch_name() |
Date: | Mon, 4 Sep 2023 11:52:18 +0200 |
User-agent: | Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.15.0 |
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...
[Prev in Thread] | Current Thread | [Next in Thread] |