aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2017-09-12 21:14:41 -0600
committerTom Tromey <tom@tromey.com>2017-09-27 08:44:59 -0600
commit6663cf9161f7ed9cbd1ac1c0afba36c952d84140 (patch)
treed6c87ede8b48fbf74f34e44d940b3ca4cb4112a3
parent34e5fa26b758250fca879799375f27c1fd8ed36d (diff)
downloadgdb-6663cf9161f7ed9cbd1ac1c0afba36c952d84140.zip
gdb-6663cf9161f7ed9cbd1ac1c0afba36c952d84140.tar.gz
gdb-6663cf9161f7ed9cbd1ac1c0afba36c952d84140.tar.bz2
Constify some commands in compile.c
gdb/ChangeLog 2017-09-27 Tom Tromey <tom@tromey.com> * compile/compile.c (check_raw_argument, compile_file_command) (compile_code_command, compile_print_command): Constify.
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/compile/compile.c9
2 files changed, 9 insertions, 5 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 32d1ee2..9a77b0d 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
2017-09-27 Tom Tromey <tom@tromey.com>
+ * compile/compile.c (check_raw_argument, compile_file_command)
+ (compile_code_command, compile_print_command): Constify.
+
+2017-09-27 Tom Tromey <tom@tromey.com>
+
* reggroups.c (maintenance_print_reggroups): Constify.
2017-09-27 Tom Tromey <tom@tromey.com>
diff --git a/gdb/compile/compile.c b/gdb/compile/compile.c
index 4a2f339..35d8c86 100644
--- a/gdb/compile/compile.c
+++ b/gdb/compile/compile.c
@@ -71,7 +71,7 @@ show_compile_debug (struct ui_file *file, int from_tty,
Return 1 if seen and update *ARG. */
static int
-check_raw_argument (char **arg)
+check_raw_argument (const char **arg)
{
*arg = skip_spaces (*arg);
@@ -87,7 +87,7 @@ check_raw_argument (char **arg)
that may contain calls to the GCC compiler. */
static void
-compile_file_command (char *arg, int from_tty)
+compile_file_command (const char *arg, int from_tty)
{
enum compile_i_scope_types scope = COMPILE_I_SIMPLE_SCOPE;
@@ -124,7 +124,7 @@ compile_file_command (char *arg, int from_tty)
compile command is the language currently set in GDB. */
static void
-compile_code_command (char *arg, int from_tty)
+compile_code_command (const char *arg, int from_tty)
{
enum compile_i_scope_types scope = COMPILE_I_SIMPLE_SCOPE;
@@ -171,9 +171,8 @@ compile_print_value (struct value *val, void *data_voidp)
compile command is the language currently set in GDB. */
static void
-compile_print_command (char *arg_param, int from_tty)
+compile_print_command (const char *arg, int from_tty)
{
- const char *arg = arg_param;
enum compile_i_scope_types scope = COMPILE_I_PRINT_ADDRESS_SCOPE;
struct format_data fmt;