[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 28/61] target/hppa: Drop attempted gdbstub support for hppa64
|
From: |
Richard Henderson |
|
Subject: |
[PATCH 28/61] target/hppa: Drop attempted gdbstub support for hppa64 |
|
Date: |
Wed, 18 Oct 2023 14:51:02 -0700 |
There is no support for hppa64 in gdb. Any attempt to provide the
data for the larger hppa64 registers results in an error from gdb.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/hppa/gdbstub.c | 26 +++++++++++---------------
1 file changed, 11 insertions(+), 15 deletions(-)
diff --git a/target/hppa/gdbstub.c b/target/hppa/gdbstub.c
index 48a514384f..748431097c 100644
--- a/target/hppa/gdbstub.c
+++ b/target/hppa/gdbstub.c
@@ -21,11 +21,17 @@
#include "cpu.h"
#include "gdbstub/helpers.h"
+/*
+ * GDB 15 only supports PA1.0 via the remote protocol, and ignores
+ * any provided xml. Which means that any attempt to provide more
+ * data results in "Remote 'g' packet reply is too long".
+ */
+
int hppa_cpu_gdb_read_register(CPUState *cs, GByteArray *mem_buf, int n)
{
HPPACPU *cpu = HPPA_CPU(cs);
CPUHPPAState *env = &cpu->env;
- target_ureg val;
+ uint32_t val;
switch (n) {
case 0:
@@ -139,24 +145,14 @@ int hppa_cpu_gdb_read_register(CPUState *cs, GByteArray
*mem_buf, int n)
break;
}
- if (TARGET_REGISTER_BITS == 64) {
- return gdb_get_reg64(mem_buf, val);
- } else {
- return gdb_get_reg32(mem_buf, val);
- }
+ return gdb_get_reg32(mem_buf, val);
}
int hppa_cpu_gdb_write_register(CPUState *cs, uint8_t *mem_buf, int n)
{
HPPACPU *cpu = HPPA_CPU(cs);
CPUHPPAState *env = &cpu->env;
- target_ureg val;
-
- if (TARGET_REGISTER_BITS == 64) {
- val = ldq_p(mem_buf);
- } else {
- val = ldl_p(mem_buf);
- }
+ uint32_t val = ldl_p(mem_buf);
switch (n) {
case 0:
@@ -166,7 +162,7 @@ int hppa_cpu_gdb_write_register(CPUState *cs, uint8_t
*mem_buf, int n)
env->gr[n] = val;
break;
case 32:
- env->cr[CR_SAR] = val;
+ env->cr[CR_SAR] = val & (cpu->is_pa20 ? 63 : 31);
break;
case 33:
env->iaoq_f = val;
@@ -278,5 +274,5 @@ int hppa_cpu_gdb_write_register(CPUState *cs, uint8_t
*mem_buf, int n)
}
break;
}
- return sizeof(target_ureg);
+ return 4;
}
--
2.34.1
- Re: [PATCH 06/61] target/hppa: Fix load in do_load_32, (continued)
- [PATCH 03/61] target/hppa: Remove get_temp_tl, Richard Henderson, 2023/10/18
- [PATCH 07/61] target/hppa: Truncate rotate count in trans_shrpw_sar, Richard Henderson, 2023/10/18
- [PATCH 08/61] target/hppa: Fix trans_ds for hppa64, Richard Henderson, 2023/10/18
- [PATCH 09/61] target/hppa: Fix do_add, do_sub for hppa64, Richard Henderson, 2023/10/18
- [PATCH 13/61] target/hppa: Make HPPA_BTLB_ENTRIES variable, Richard Henderson, 2023/10/18
- [PATCH 18/61] target/hppa: Adjust hppa_cpu_dump_state for hppa64, Richard Henderson, 2023/10/18
- [PATCH 12/61] target/hppa: Introduce TYPE_HPPA64_CPU, Richard Henderson, 2023/10/18
- [PATCH 28/61] target/hppa: Drop attempted gdbstub support for hppa64,
Richard Henderson <=
- [PATCH 31/61] target/hppa: Decode d for unit instructions, Richard Henderson, 2023/10/18
- [PATCH 11/61] target/hppa: Fix extrw and depw with sar for hppa64, Richard Henderson, 2023/10/18
- [PATCH 14/61] target/hppa: Implement cpu_list, Richard Henderson, 2023/10/18
- [PATCH 17/61] target/hppa: Handle absolute addresses for pa2.0, Richard Henderson, 2023/10/18
- [PATCH 30/61] target/hppa: Decode d for logical instructions, Richard Henderson, 2023/10/18
- [PATCH 27/61] linux-user/hppa: Fixes for TARGET_ABI32, Richard Henderson, 2023/10/18
- [PATCH 36/61] target/hppa: Decode d for cmpb instructions, Richard Henderson, 2023/10/18
- [PATCH 38/61] target/hppa: Decode ADDB double-word, Richard Henderson, 2023/10/18
- [PATCH 19/61] hw/hppa: Translate phys addresses for the cpu, Richard Henderson, 2023/10/18