aboutsummaryrefslogtreecommitdiff
path: root/sim
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2022-11-10 02:06:48 +0700
committerMike Frysinger <vapier@gentoo.org>2022-11-10 14:27:40 +0700
commit23af236b63a96738c195d2544abfc85552abd0a2 (patch)
treeb5a80b657c8e6c592b1609b15500c74b0be9f9b0 /sim
parent5967ca921c88a09d7cec9d9864ae23799d88ffbb (diff)
downloadgdb-23af236b63a96738c195d2544abfc85552abd0a2.zip
gdb-23af236b63a96738c195d2544abfc85552abd0a2.tar.gz
gdb-23af236b63a96738c195d2544abfc85552abd0a2.tar.bz2
sim: ppc: constify spreg table
This internal table is only ever read, so constify it.
Diffstat (limited to 'sim')
-rw-r--r--sim/ppc/dgen.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sim/ppc/dgen.c b/sim/ppc/dgen.c
index caafe07..0f9b02f 100644
--- a/sim/ppc/dgen.c
+++ b/sim/ppc/dgen.c
@@ -196,14 +196,14 @@ gen_spreg_c(spreg_table *table, lf *file)
lf_printf(file, "\n");
lf_printf(file, "typedef struct _spreg_info {\n");
- lf_printf(file, " char *name;\n");
+ lf_printf(file, " const char *name;\n");
lf_printf(file, " int is_valid;\n");
lf_printf(file, " int length;\n");
lf_printf(file, " int is_readonly;\n");
lf_printf(file, " int index;\n");
lf_printf(file, "} spreg_info;\n");
lf_printf(file, "\n");
- lf_printf(file, "static spreg_info spr_info[nr_of_sprs+1] = {\n");
+ lf_printf(file, "static const spreg_info spr_info[nr_of_sprs+1] = {\n");
entry = table->sprs;
for (spreg_nr = 0; spreg_nr < nr_of_sprs+1; spreg_nr++) {
if (entry == NULL || spreg_nr < entry->spreg_nr)