2017-09-27 Tom Tromey <tom@tromey.com>
+ * symfile.c (symbol_file_command): Constify.
+ * gdbcore.h (deprecated_file_changed_hook): Constify.
+ * exec.c (deprecated_file_changed_hook, exec_file_command)
+ (file_command): Constify.
+ * defs.h (symbol_file_command): Constify.
+
+2017-09-27 Tom Tromey <tom@tromey.com>
+
* remote-fileio.c (set_system_call_allowed)
(show_system_call_allowed): Constify.
/* From symfile.c */
-extern void symbol_file_command (char *, int);
+extern void symbol_file_command (const char *, int);
/* * Remote targets may wish to use this as their load function. */
extern void generic_load (const char *name, int from_tty);
#include "solist.h"
#include <algorithm>
-void (*deprecated_file_changed_hook) (char *);
+void (*deprecated_file_changed_hook) (const char *);
/* Prototypes for local functions */
-static void file_command (char *, int);
-
static void set_section_command (char *, int);
static void exec_files_info (struct target_ops *);
If ARGS is NULL, we just want to close the exec file. */
static void
-exec_file_command (char *args, int from_tty)
+exec_file_command (const char *args, int from_tty)
{
char *filename;
command was added? */
static void
-file_command (char *arg, int from_tty)
+file_command (const char *arg, int from_tty)
{
/* FIXME, if we lose on reading the symbol file, we should revert
the exec file, but that's rough. */
/* Hook for "file_command", which is more useful than above
(because it is invoked AFTER symbols are read, not before). */
-extern void (*deprecated_file_changed_hook) (char *filename);
+extern void (*deprecated_file_changed_hook) (const char *filename);
extern void specify_exec_file_hook (void (*hook) (const char *filename));
conventions (because it is confusing and inconvenient). */
void
-symbol_file_command (char *args, int from_tty)
+symbol_file_command (const char *args, int from_tty)
{
dont_repeat ();