Include gdbtk.h to avoid declarations
authorChristian Biesinger <cbiesinger@google.com>
Thu, 10 Oct 2019 17:42:41 +0000 (12:42 -0500)
committerChristian Biesinger <cbiesinger@google.com>
Thu, 10 Oct 2019 17:42:41 +0000 (12:42 -0500)
Once https://sourceware.org/ml/insight/2019-q4/msg00000.html lands,
we can just include gdbtk.h to get the declarations for
external_editor_command and gdbtk_test, instead of having to
declare them here in main.c.

gdb/ChangeLog:

2019-10-07  Christian Biesinger  <cbiesinger@google.com>

* main.c (captured_main_1): Include gdbtk.h and remove declarations
for external_editor_command and gdbtk_test.

gdb/ChangeLog
gdb/main.c

index 2abae432dfe8ed0004d9bf9939ff56dcad42647f..fba57f3469bdc42dd5fb2812b79140d402679226 100644 (file)
@@ -1,3 +1,8 @@
+2019-10-10  Christian Biesinger  <cbiesinger@google.com>
+
+       * main.c (captured_main_1): Include gdbtk.h and remove declarations
+       for external_editor_command and gdbtk_test.
+
 2019-10-10  Christian Biesinger  <cbiesinger@google.com>
 
        * mi/mi-cmd-var.c (varobjdebug): Remove declaration.
index 14d9e7965384ccde20cf2dd0738b2ad3afa5baac..7f873630d63fbda7bd4c23af2cacf60ade98f5a9 100644 (file)
@@ -48,6 +48,9 @@
 #include <vector>
 #include "gdbsupport/pathstuff.h"
 #include "cli/cli-style.h"
+#ifdef GDBTK
+#include "gdbtk/generic/gdbtk.h"
+#endif
 
 /* The selected interpreter.  This will be used as a set command
    variable, so it should always be malloc'ed - since
@@ -764,8 +767,6 @@ captured_main_1 (struct captured_main_args *context)
 #ifdef GDBTK
          case 'z':
            {
-             extern int gdbtk_test (char *);
-
              if (!gdbtk_test (optarg))
                error (_("%s: unable to load tclcommand file \"%s\""),
                       gdb_program_name, optarg);
@@ -778,8 +779,6 @@ captured_main_1 (struct captured_main_args *context)
            {
              /* 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;
            }
This page took 0.029754 seconds and 4 git commands to generate.