summaryrefslogtreecommitdiff
path: root/gdb/main.c
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2012-02-20 19:44:00 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2012-02-20 19:44:00 +0000
commitbf81adff97045acb9c3a11ea645e46117a40cc34 (patch)
tree5248950eb5146265bd775657cfeba7437efa48a1 /gdb/main.c
parent61d8161b33b1e7dbc80ba6f7a92500a1594da55c (diff)
downloadgdb-bf81adff97045acb9c3a11ea645e46117a40cc34.tar.gz
gdb/
Code cleanup. * main.c (write_files): Remove the declaration. (external_editor_command): Move the declaration ... [GDBTK] (external_editor_command): ... here. Fix the comment.
Diffstat (limited to 'gdb/main.c')
-rw-r--r--gdb/main.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/gdb/main.c b/gdb/main.c
index 8b45c25b4f4..e46f8233d92 100644
--- a/gdb/main.c
+++ b/gdb/main.c
@@ -84,19 +84,12 @@ int batch_silent = 0;
int return_child_result = 0;
int return_child_result_value = -1;
-/* Whether to enable writing into executable and core files. */
-extern int write_files;
/* GDB as it has been invoked from the command line (i.e. argv[0]). */
static char *gdb_program_name;
static void print_gdb_help (struct ui_file *);
-/* These two are used to set the external editor commands when gdb is
- farming out files to be edited by another program. */
-
-extern char *external_editor_command;
-
/* Relocate a file or directory. PROGNAME is the name by which gdb
was invoked (i.e., argv[0]). INITIAL is the default value for the
file or directory. FLAG is true if the value is relocatable, false
@@ -588,6 +581,10 @@ captured_main (void *data)
break;
case 'w':
{
+ /* Set the external editor commands when gdb is farming out files
+ to be edited by another program. */
+ extern char *external_editor_command;
+
external_editor_command = xstrdup (optarg);
break;
}