[Qemu-devel] [PATCH 1/2] target/arm: Put system registers in "system" group

Richard Henderson posted 2 patches 6 years, 11 months ago
Maintainers: Peter Maydell <peter.maydell@linaro.org>
[Qemu-devel] [PATCH 1/2] target/arm: Put system registers in "system" group
Posted by Richard Henderson 6 years, 11 months ago
The system group is predefined within gdb.  While the spec
seems to allow arbitrary group names, that seems to mess up
the addition of all registers to any groups.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 target/arm/gdbstub.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/arm/gdbstub.c b/target/arm/gdbstub.c
index 0c64c0292e..67c8874b3b 100644
--- a/target/arm/gdbstub.c
+++ b/target/arm/gdbstub.c
@@ -113,7 +113,7 @@ static void arm_gen_one_xml_reg_tag(GString *s, DynamicGDBXMLInfo *dyn_xml,
 {
     g_string_append_printf(s, "<reg name=\"%s\"", ri->name);
     g_string_append_printf(s, " bitsize=\"%d\"", bitsize);
-    g_string_append_printf(s, " group=\"cp_regs\"/>");
+    g_string_append_printf(s, " group=\"system\"/>");
     dyn_xml->num_cpregs++;
     dyn_xml->cpregs_keys[dyn_xml->num_cpregs - 1] = ri_key;
 }
-- 
2.17.2


Re: [Qemu-devel] [PATCH 1/2] target/arm: Put system registers in "system" group
Posted by Peter Maydell 6 years, 10 months ago
On Thu, 7 Mar 2019 at 20:12, Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> The system group is predefined within gdb.  While the spec
> seems to allow arbitrary group names, that seems to mess up
> the addition of all registers to any groups.
>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>  target/arm/gdbstub.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/target/arm/gdbstub.c b/target/arm/gdbstub.c
> index 0c64c0292e..67c8874b3b 100644
> --- a/target/arm/gdbstub.c
> +++ b/target/arm/gdbstub.c
> @@ -113,7 +113,7 @@ static void arm_gen_one_xml_reg_tag(GString *s, DynamicGDBXMLInfo *dyn_xml,
>  {
>      g_string_append_printf(s, "<reg name=\"%s\"", ri->name);
>      g_string_append_printf(s, " bitsize=\"%d\"", bitsize);
> -    g_string_append_printf(s, " group=\"cp_regs\"/>");
> +    g_string_append_printf(s, " group=\"system\"/>");
>      dyn_xml->num_cpregs++;
>      dyn_xml->cpregs_keys[dyn_xml->num_cpregs - 1] = ri_key;
>  }

I don't intrinsically object to this, but I think we should
get gdb upstream to nail down what they actually expect out
of a debug stub for the register XML and fix any bugs on
their end before we tweak what we're doing.

thanks
-- PMM