aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDoug Evans <dje@google.com>2010-04-07 16:54:39 +0000
committerDoug Evans <dje@google.com>2010-04-07 16:54:39 +0000
commit05159abe9613acc8732e97494b327066bbd5e356 (patch)
treeecccf832664edcb6ae01df794c2ac41af6534064
parent2de7820f275d96335a4749e2239aace063e1087d (diff)
downloadgdb-05159abe9613acc8732e97494b327066bbd5e356.zip
gdb-05159abe9613acc8732e97494b327066bbd5e356.tar.gz
gdb-05159abe9613acc8732e97494b327066bbd5e356.tar.bz2
* top.c (source_file_name): Make const char *.
* top.h (source_file_name): Update. * cli/cli-script.c (source_cleanup_lines_args): Make old_file const char *. (script_from_file): Change `file' arg to const char *. * cli/cli-script.h (script_from_file): Update.
-rw-r--r--gdb/ChangeLog9
-rw-r--r--gdb/cli/cli-script.c4
-rw-r--r--gdb/cli/cli-script.h2
-rw-r--r--gdb/top.c2
-rw-r--r--gdb/top.h2
5 files changed, 14 insertions, 5 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 9ba91ff..7c1b1f0 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,12 @@
+2010-04-07 Doug Evans <dje@google.com>
+
+ * top.c (source_file_name): Make const char *.
+ * top.h (source_file_name): Update.
+ * cli/cli-script.c (source_cleanup_lines_args): Make old_file
+ const char *.
+ (script_from_file): Change `file' arg to const char *.
+ * cli/cli-script.h (script_from_file): Update.
+
2010-04-06 Doug Evans <dje@google.com>
* cli/cli-cmds.c (source_command): Run cleanups.
diff --git a/gdb/cli/cli-script.c b/gdb/cli/cli-script.c
index 0b85bab..198966f 100644
--- a/gdb/cli/cli-script.c
+++ b/gdb/cli/cli-script.c
@@ -1557,7 +1557,7 @@ document_command (char *comname, int from_tty)
struct source_cleanup_lines_args
{
int old_line;
- char *old_file;
+ const char *old_file;
};
static void
@@ -1584,7 +1584,7 @@ wrapped_read_command_file (struct ui_out *uiout, void *data)
/* Used to implement source_command */
void
-script_from_file (FILE *stream, char *file)
+script_from_file (FILE *stream, const char *file)
{
struct cleanup *old_cleanups;
struct source_cleanup_lines_args old_lines;
diff --git a/gdb/cli/cli-script.h b/gdb/cli/cli-script.h
index b051a17..6cdcfd2 100644
--- a/gdb/cli/cli-script.h
+++ b/gdb/cli/cli-script.h
@@ -24,7 +24,7 @@ struct cmd_list_element;
/* Exported to cli/cli-cmds.c */
-extern void script_from_file (FILE *stream, char *file);
+extern void script_from_file (FILE *stream, const char *file);
extern void document_command (char *, int);
diff --git a/gdb/top.c b/gdb/top.c
index 90e8f1e..dc2104c 100644
--- a/gdb/top.c
+++ b/gdb/top.c
@@ -298,7 +298,7 @@ quit_cover (void *s)
/* NOTE 1999-04-29: This variable will be static again, once we modify
gdb to use the event loop as the default command loop and we merge
event-top.c into this file, top.c */
-/* static */ char *source_file_name;
+/* static */ const char *source_file_name;
/* Clean up on error during a "source" command (or execution of a
user-defined command). */
diff --git a/gdb/top.h b/gdb/top.h
index 2de78bf..c180274 100644
--- a/gdb/top.h
+++ b/gdb/top.h
@@ -68,7 +68,7 @@ extern void gdb_init (char *);
/* For use by event-top.c */
/* Variables from top.c. */
extern int source_line_number;
-extern char *source_file_name;
+extern const char *source_file_name;
extern int history_expansion_p;
extern int server_command;
extern char *lim_at_start;