diff mbox series

[16/25] target/arm: Remove references to gdb_has_xml

Message ID 20231009164104.369749-17-alex.bennee@linaro.org
State Superseded
Headers show
Series October maintainer omnibus pre-PR (tests, gdbstub, plugins) | expand

Commit Message

Alex Bennée Oct. 9, 2023, 4:40 p.m. UTC
From: Akihiko Odaki <akihiko.odaki@daynix.com>

GDB has XML support since 6.7 which was released in 2007.
It's time to remove support for old GDB versions without XML support.

Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Acked-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20230912224107.29669-10-akihiko.odaki@daynix.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 target/arm/gdbstub.c | 32 ++------------------------------
 1 file changed, 2 insertions(+), 30 deletions(-)

Comments

Alistair Francis Oct. 11, 2023, 1:03 a.m. UTC | #1
On Tue, Oct 10, 2023 at 3:52 AM Alex Bennée <alex.bennee@linaro.org> wrote:
>
> From: Akihiko Odaki <akihiko.odaki@daynix.com>
>
> GDB has XML support since 6.7 which was released in 2007.
> It's time to remove support for old GDB versions without XML support.
>
> Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
> Acked-by: Alex Bennée <alex.bennee@linaro.org>
> Message-Id: <20230912224107.29669-10-akihiko.odaki@daynix.com>
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>

Reviewed-by: Alistair Francis <alistair.francis@wdc.com>

Alistair

> ---
>  target/arm/gdbstub.c | 32 ++------------------------------
>  1 file changed, 2 insertions(+), 30 deletions(-)
>
> diff --git a/target/arm/gdbstub.c b/target/arm/gdbstub.c
> index 8fc8351df7..b7ace24bfc 100644
> --- a/target/arm/gdbstub.c
> +++ b/target/arm/gdbstub.c
> @@ -46,21 +46,7 @@ int arm_cpu_gdb_read_register(CPUState *cs, GByteArray *mem_buf, int n)
>          /* Core integer register.  */
>          return gdb_get_reg32(mem_buf, env->regs[n]);
>      }
> -    if (n < 24) {
> -        /* FPA registers.  */
> -        if (gdb_has_xml()) {
> -            return 0;
> -        }
> -        return gdb_get_zeroes(mem_buf, 12);
> -    }
> -    switch (n) {
> -    case 24:
> -        /* FPA status register.  */
> -        if (gdb_has_xml()) {
> -            return 0;
> -        }
> -        return gdb_get_reg32(mem_buf, 0);
> -    case 25:
> +    if (n == 25) {
>          /* CPSR, or XPSR for M-profile */
>          if (arm_feature(env, ARM_FEATURE_M)) {
>              return gdb_get_reg32(mem_buf, xpsr_read(env));
> @@ -100,21 +86,7 @@ int arm_cpu_gdb_write_register(CPUState *cs, uint8_t *mem_buf, int n)
>          env->regs[n] = tmp;
>          return 4;
>      }
> -    if (n < 24) { /* 16-23 */
> -        /* FPA registers (ignored).  */
> -        if (gdb_has_xml()) {
> -            return 0;
> -        }
> -        return 12;
> -    }
> -    switch (n) {
> -    case 24:
> -        /* FPA status register (ignored).  */
> -        if (gdb_has_xml()) {
> -            return 0;
> -        }
> -        return 4;
> -    case 25:
> +    if (n == 25) {
>          /* CPSR, or XPSR for M-profile */
>          if (arm_feature(env, ARM_FEATURE_M)) {
>              /*
> --
> 2.39.2
>
>
diff mbox series

Patch

diff --git a/target/arm/gdbstub.c b/target/arm/gdbstub.c
index 8fc8351df7..b7ace24bfc 100644
--- a/target/arm/gdbstub.c
+++ b/target/arm/gdbstub.c
@@ -46,21 +46,7 @@  int arm_cpu_gdb_read_register(CPUState *cs, GByteArray *mem_buf, int n)
         /* Core integer register.  */
         return gdb_get_reg32(mem_buf, env->regs[n]);
     }
-    if (n < 24) {
-        /* FPA registers.  */
-        if (gdb_has_xml()) {
-            return 0;
-        }
-        return gdb_get_zeroes(mem_buf, 12);
-    }
-    switch (n) {
-    case 24:
-        /* FPA status register.  */
-        if (gdb_has_xml()) {
-            return 0;
-        }
-        return gdb_get_reg32(mem_buf, 0);
-    case 25:
+    if (n == 25) {
         /* CPSR, or XPSR for M-profile */
         if (arm_feature(env, ARM_FEATURE_M)) {
             return gdb_get_reg32(mem_buf, xpsr_read(env));
@@ -100,21 +86,7 @@  int arm_cpu_gdb_write_register(CPUState *cs, uint8_t *mem_buf, int n)
         env->regs[n] = tmp;
         return 4;
     }
-    if (n < 24) { /* 16-23 */
-        /* FPA registers (ignored).  */
-        if (gdb_has_xml()) {
-            return 0;
-        }
-        return 12;
-    }
-    switch (n) {
-    case 24:
-        /* FPA status register (ignored).  */
-        if (gdb_has_xml()) {
-            return 0;
-        }
-        return 4;
-    case 25:
+    if (n == 25) {
         /* CPSR, or XPSR for M-profile */
         if (arm_feature(env, ARM_FEATURE_M)) {
             /*