diff mbox series

[1/2] target/arm: Put system registers in "system" group

Message ID 20190307201244.8971-2-richard.henderson@linaro.org
State New
Headers show
Series target/arm: gdbstub system registers refinement | expand

Commit Message

Richard Henderson March 7, 2019, 8:12 p.m. UTC
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(-)

-- 
2.17.2

Comments

Peter Maydell March 26, 2019, 1:44 p.m. UTC | #1
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
diff mbox series

Patch

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;
 }