diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2011-08-28 20:39:29 +0000 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2011-08-28 20:39:29 +0000 |
commit | 91174723392cfb8acc1394c4d5e2bc35dd7980d0 (patch) | |
tree | 5101b44ff8e9487bb02de7abd60140b1d57954aa /gdb/mi | |
parent | 78662a6e677a967c9a45f6584f1f1fdeaf73c9e2 (diff) | |
download | gdb-91174723392cfb8acc1394c4d5e2bc35dd7980d0.zip gdb-91174723392cfb8acc1394c4d5e2bc35dd7980d0.tar.gz gdb-91174723392cfb8acc1394c4d5e2bc35dd7980d0.tar.bz2 |
gdb/
Code cleanup - make mi_opt const.
* mi/mi-cmd-break.c (mi_cmd_break_insert, mi_cmd_break_watch): Make
opts const.
* mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
* mi/mi-cmd-env.c (mi_cmd_env_path): Likewise.
(mi_cmd_env_dir): Likewise.
* mi/mi-cmd-target.c (mi_cmd_target_file_get): Likewise.
(mi_cmd_target_file_put): Likewise.
* mi/mi-cmd-target.c (mi_cmd_target_file_delete): Likewise.
* mi/mi-cmd-var.c (mi_cmd_var_evaluate_expression): Likewise.
* mi/mi-getopt.c (mi_getopt): Make opts and opt const.
(mi_valid_noargs): Make opts const.
* mi/mi-getopt.h (mi_getopt): Make opts and opt const.
* mi/mi-main.c (mi_cmd_list_thread_groups): Make opts const.
(mi_cmd_data_read_memory): Likewise.
(mi_cmd_data_read_memory_bytes): Likewise.
(mi_cmd_data_write_memory): Likewise.
Diffstat (limited to 'gdb/mi')
-rw-r--r-- | gdb/mi/mi-cmd-break.c | 4 | ||||
-rw-r--r-- | gdb/mi/mi-cmd-disas.c | 2 | ||||
-rw-r--r-- | gdb/mi/mi-cmd-env.c | 4 | ||||
-rw-r--r-- | gdb/mi/mi-cmd-target.c | 6 | ||||
-rw-r--r-- | gdb/mi/mi-cmd-var.c | 2 | ||||
-rw-r--r-- | gdb/mi/mi-getopt.c | 6 | ||||
-rw-r--r-- | gdb/mi/mi-getopt.h | 2 | ||||
-rw-r--r-- | gdb/mi/mi-main.c | 8 |
8 files changed, 17 insertions, 17 deletions
diff --git a/gdb/mi/mi-cmd-break.c b/gdb/mi/mi-cmd-break.c index 2c9d16b..b3bd5da 100644 --- a/gdb/mi/mi-cmd-break.c +++ b/gdb/mi/mi-cmd-break.c @@ -84,7 +84,7 @@ mi_cmd_break_insert (char *command, char **argv, int argc) IGNORE_COUNT_OPT, THREAD_OPT, PENDING_OPT, DISABLE_OPT, TRACEPOINT_OPT, }; - static struct mi_opt opts[] = + static const struct mi_opt opts[] = { {"h", HARDWARE_OPT, 0}, {"t", TEMP_OPT, 0}, @@ -221,7 +221,7 @@ mi_cmd_break_watch (char *command, char **argv, int argc) { READ_OPT, ACCESS_OPT }; - static struct mi_opt opts[] = + static const struct mi_opt opts[] = { {"r", READ_OPT, 0}, {"a", ACCESS_OPT, 0}, diff --git a/gdb/mi/mi-cmd-disas.c b/gdb/mi/mi-cmd-disas.c index 6cc0a83..c2e8265 100644 --- a/gdb/mi/mi-cmd-disas.c +++ b/gdb/mi/mi-cmd-disas.c @@ -83,7 +83,7 @@ mi_cmd_disassemble (char *command, char **argv, int argc) { FILE_OPT, LINE_OPT, NUM_OPT, START_OPT, END_OPT }; - static struct mi_opt opts[] = { + static const struct mi_opt opts[] = { {"f", FILE_OPT, 1}, {"l", LINE_OPT, 1}, {"n", NUM_OPT, 1}, diff --git a/gdb/mi/mi-cmd-env.c b/gdb/mi/mi-cmd-env.c index 9676e83..d9e5088 100644 --- a/gdb/mi/mi-cmd-env.c +++ b/gdb/mi/mi-cmd-env.c @@ -125,7 +125,7 @@ mi_cmd_env_path (char *command, char **argv, int argc) { RESET_OPT }; - static struct mi_opt opts[] = + static const struct mi_opt opts[] = { {"r", RESET_OPT, 0}, { 0, 0, 0 } @@ -197,7 +197,7 @@ mi_cmd_env_dir (char *command, char **argv, int argc) { RESET_OPT }; - static struct mi_opt opts[] = + static const struct mi_opt opts[] = { {"r", RESET_OPT, 0}, { 0, 0, 0 } diff --git a/gdb/mi/mi-cmd-target.c b/gdb/mi/mi-cmd-target.c index 295a38b..14b22de 100644 --- a/gdb/mi/mi-cmd-target.c +++ b/gdb/mi/mi-cmd-target.c @@ -29,7 +29,7 @@ mi_cmd_target_file_get (char *command, char **argv, int argc) int optind = 0; char *optarg; const char *remote_file, *local_file; - static struct mi_opt opts[] = + static const struct mi_opt opts[] = { { 0, 0, 0 } }; @@ -53,7 +53,7 @@ mi_cmd_target_file_put (char *command, char **argv, int argc) int optind = 0; char *optarg; const char *remote_file, *local_file; - static struct mi_opt opts[] = + static const struct mi_opt opts[] = { { 0, 0, 0 } }; @@ -77,7 +77,7 @@ mi_cmd_target_file_delete (char *command, char **argv, int argc) int optind = 0; char *optarg; const char *remote_file; - static struct mi_opt opts[] = + static const struct mi_opt opts[] = { { 0, 0, 0 } }; diff --git a/gdb/mi/mi-cmd-var.c b/gdb/mi/mi-cmd-var.c index c50f863..16fbb85 100644 --- a/gdb/mi/mi-cmd-var.c +++ b/gdb/mi/mi-cmd-var.c @@ -561,7 +561,7 @@ mi_cmd_var_evaluate_expression (char *command, char **argv, int argc) { OP_FORMAT }; - static struct mi_opt opts[] = + static const struct mi_opt opts[] = { {"f", OP_FORMAT, 1}, { 0, 0, 0 } diff --git a/gdb/mi/mi-getopt.c b/gdb/mi/mi-getopt.c index 81b833a..1748688 100644 --- a/gdb/mi/mi-getopt.c +++ b/gdb/mi/mi-getopt.c @@ -25,11 +25,11 @@ int mi_getopt (const char *prefix, int argc, char **argv, - struct mi_opt *opts, + const struct mi_opt *opts, int *optind, char **optarg) { char *arg; - struct mi_opt *opt; + const struct mi_opt *opt; /* We assume that argv/argc are ok. */ if (*optind > argc || *optind < 0) @@ -80,7 +80,7 @@ mi_valid_noargs (const char *prefix, int argc, char **argv) { int optind = 0; char *optarg; - static struct mi_opt opts[] = + static const struct mi_opt opts[] = { { 0, 0, 0 } }; diff --git a/gdb/mi/mi-getopt.h b/gdb/mi/mi-getopt.h index a34a354..10b2906 100644 --- a/gdb/mi/mi-getopt.h +++ b/gdb/mi/mi-getopt.h @@ -42,7 +42,7 @@ struct mi_opt; extern int mi_getopt (const char *prefix, int argc, char **argv, - struct mi_opt *opt, int *optind, char **optarg); + const struct mi_opt *opt, int *optind, char **optarg); /* The option list. Terminated by NAME==NULL. ARG_P that the option requires an argument. INDEX is returned to identify th option. */ diff --git a/gdb/mi/mi-main.c b/gdb/mi/mi-main.c index 04a1c97..7a9b4db 100644 --- a/gdb/mi/mi-main.c +++ b/gdb/mi/mi-main.c @@ -799,7 +799,7 @@ mi_cmd_list_thread_groups (char *command, char **argv, int argc) { AVAILABLE_OPT, RECURSE_OPT }; - static struct mi_opt opts[] = + static const struct mi_opt opts[] = { {"-available", AVAILABLE_OPT, 0}, {"-recurse", RECURSE_OPT, 1}, @@ -1307,7 +1307,7 @@ mi_cmd_data_read_memory (char *command, char **argv, int argc) { OFFSET_OPT }; - static struct mi_opt opts[] = + static const struct mi_opt opts[] = { {"o", OFFSET_OPT, 1}, { 0, 0, 0 } @@ -1493,7 +1493,7 @@ mi_cmd_data_read_memory_bytes (char *command, char **argv, int argc) { OFFSET_OPT }; - static struct mi_opt opts[] = + static const struct mi_opt opts[] = { {"o", OFFSET_OPT, 1}, { 0, 0, 0 } @@ -1594,7 +1594,7 @@ mi_cmd_data_write_memory (char *command, char **argv, int argc) { OFFSET_OPT }; - static struct mi_opt opts[] = + static const struct mi_opt opts[] = { {"o", OFFSET_OPT, 1}, { 0, 0, 0 } |