diff options
author | Andrew Cagney <cagney@redhat.com> | 2000-06-08 00:52:56 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2000-06-08 00:52:56 +0000 |
commit | 53904c9e670da0974aebfb6cdaa30e9c55876508 (patch) | |
tree | 05ca51eb0b7848a88993468318da40d301819565 /gdb/arch-utils.c | |
parent | 150f24a284293f28cc74a5469fb5d4b242336154 (diff) | |
download | gdb-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/arch-utils.c')
-rw-r--r-- | gdb/arch-utils.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/gdb/arch-utils.c b/gdb/arch-utils.c index d604bd4..ab0c2de 100644 --- a/gdb/arch-utils.c +++ b/gdb/arch-utils.c @@ -249,17 +249,17 @@ generic_register_convertible_not (num) int target_byte_order = TARGET_BYTE_ORDER_DEFAULT; int target_byte_order_auto = 1; -static char endian_big[] = "big"; -static char endian_little[] = "little"; -static char endian_auto[] = "auto"; -static char *endian_enum[] = +static const char endian_big[] = "big"; +static const char endian_little[] = "little"; +static const char endian_auto[] = "auto"; +static const char *endian_enum[] = { endian_big, endian_little, endian_auto, NULL, }; -static char *set_endian_string; +static const char *set_endian_string; /* Called by ``show endian''. */ @@ -352,7 +352,7 @@ enum set_arch { set_arch_auto, set_arch_manual }; int target_architecture_auto = 1; -char *set_architecture_string; +const char *set_architecture_string; /* Old way of changing the current architecture. */ @@ -585,7 +585,7 @@ initialize_current_architecture (void) of ``const char *''. We just happen to know that the casts are safe. */ c = add_set_enum_cmd ("architecture", class_support, - (char **) arches, (char **) &set_architecture_string, + arches, &set_architecture_string, "Set architecture of target.", &setlist); c->function.sfunc = set_architecture; |