On 20/4/23 14:31, Matheus Tavares Bernardino wrote:
From: Brian Cain <bc...@quicinc.com>
Signed-off-by: Brian Cain <bc...@quicinc.com>
Signed-off-by: Matheus Tavares Bernardino <quic_mathb...@quicinc.com>
---
target/hexagon/gdb_qreginfo.h | 124 ++++++++++++++++++++++++++++++++++
target/hexagon/cpu.c | 3 +
2 files changed, 127 insertions(+)
create mode 100644 target/hexagon/gdb_qreginfo.h
diff --git a/target/hexagon/gdb_qreginfo.h b/target/hexagon/gdb_qreginfo.h
new file mode 100644
index 0000000000..64631ddd58
--- /dev/null
+++ b/target/hexagon/gdb_qreginfo.h
This should be gdb_qreginfo.h.inc
+#ifndef HEXAGON_GDB_QREGINFO_H
+#define HEXAGON_GDB_QREGINFO_H
+
+const char * const hexagon_qreg_descs[] = {
...
+};
+
+#endif /* HEXAGON_GDB_QREGINFO_H */
diff --git a/target/hexagon/cpu.c b/target/hexagon/cpu.c
index ab40cfc283..aa470d9ee4 100644
--- a/target/hexagon/cpu.c
+++ b/target/hexagon/cpu.c
@@ -19,6 +19,7 @@
#include "qemu/qemu-print.h"
#include "cpu.h"
#include "internal.h"
+#include "gdb_qreginfo.h"
#include "exec/exec-all.h"
#include "qapi/error.h"
#include "hw/qdev-properties.h"
@@ -358,6 +359,8 @@ static void hexagon_cpu_class_init(ObjectClass *c, void
*data)
cc->get_pc = hexagon_cpu_get_pc;
cc->gdb_read_register = hexagon_gdb_read_register;
cc->gdb_write_register = hexagon_gdb_write_register;
+ cc->gdb_qreg_info_lines = (const char **)hexagon_qreg_descs;
No need to cast if fixing gdb_qreg_info_lines's prototype
(see previous patch review).
+ cc->gdb_qreg_info_line_count = ARRAY_SIZE(hexagon_qreg_descs);
cc->gdb_num_core_regs = TOTAL_PER_THREAD_REGS + NUM_VREGS + NUM_QREGS;
cc->gdb_stop_before_watchpoint = true;
cc->disas_set_info = hexagon_cpu_disas_set_info;