aboutsummaryrefslogtreecommitdiff
path: root/gdb/arm-tdep.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2000-06-08 00:52:56 +0000
committerAndrew Cagney <cagney@redhat.com>2000-06-08 00:52:56 +0000
commit53904c9e670da0974aebfb6cdaa30e9c55876508 (patch)
tree05ca51eb0b7848a88993468318da40d301819565 /gdb/arm-tdep.c
parent150f24a284293f28cc74a5469fb5d4b242336154 (diff)
downloadgdb-53904c9e670da0974aebfb6cdaa30e9c55876508.zip
gdb-53904c9e670da0974aebfb6cdaa30e9c55876508.tar.gz
gdb-53904c9e670da0974aebfb6cdaa30e9c55876508.tar.bz2
Change signature of function add_set_enum_cmd() so that it uses
constant character pointers. Update everything. As a consequence fix infrun's follow-fork plugging a small memory leak.
Diffstat (limited to 'gdb/arm-tdep.c')
-rw-r--r--gdb/arm-tdep.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c
index 84a350a..7cc53e0 100644
--- a/gdb/arm-tdep.c
+++ b/gdb/arm-tdep.c
@@ -52,10 +52,10 @@ static char * arm_register_name_strings[] =
char **arm_register_names = arm_register_name_strings;
/* Valid register name flavors. */
-static char **valid_flavors;
+static const char **valid_flavors;
/* Disassembly flavor to use. Default to "std" register names. */
-static char *disassembly_flavor;
+static const char *disassembly_flavor;
static int current_option; /* Index to that option in the opcodes table. */
/* This is used to keep the bfd arch_info in sync with the disassembly
@@ -2037,7 +2037,9 @@ _initialize_arm_tdep (void)
struct ui_file *stb;
long length;
struct cmd_list_element *new_cmd;
- const char *setname, *setdesc, **regnames;
+ const char *setname;
+ const char *setdesc;
+ const char **regnames;
int numregs, i, j;
static char *helptext;
@@ -2059,13 +2061,13 @@ The valid values are:\n");
for (i = 0; i < num_flavor_options; i++)
{
numregs = get_arm_regnames (i, &setname, &setdesc, &regnames);
- valid_flavors[i] = (char *) setname;
+ valid_flavors[i] = setname;
fprintf_unfiltered (stb, "%s - %s\n", setname,
setdesc);
/* Copy the default names (if found) and synchronize disassembler. */
if (!strcmp (setname, "std"))
{
- disassembly_flavor = (char *) setname;
+ disassembly_flavor = setname;
current_option = i;
for (j = 0; j < numregs; j++)
arm_register_names[j] = (char *) regnames[j];