public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Include gdbtk.h to avoid declarations
@ 2019-10-07 21:22 Christian Biesinger via gdb-patches
  2019-10-08 13:12 ` Tom Tromey
  0 siblings, 1 reply; 3+ messages in thread
From: Christian Biesinger via gdb-patches @ 2019-10-07 21:22 UTC (permalink / raw)
  To: gdb-patches; +Cc: Christian Biesinger

From: Christian Biesinger <cbiesinger@chromium.org>

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@chromium.org>

	* main.c (captured_main_1): Include gdbtk.h and remove declarations
	for external_editor_command and gdbtk_test.
---
 gdb/main.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/gdb/main.c b/gdb/main.c
index 14d9e79653..7f873630d6 100644
--- a/gdb/main.c
+++ b/gdb/main.c
@@ -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;
 	    }
-- 
2.23.0.581.g78d2f28ef7-goog

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Include gdbtk.h to avoid declarations
  2019-10-07 21:22 [PATCH] Include gdbtk.h to avoid declarations Christian Biesinger via gdb-patches
@ 2019-10-08 13:12 ` Tom Tromey
  2019-10-10 17:44   ` Christian Biesinger via gdb-patches
  0 siblings, 1 reply; 3+ messages in thread
From: Tom Tromey @ 2019-10-08 13:12 UTC (permalink / raw)
  To: Christian Biesinger via gdb-patches
  Cc: Christian Biesinger, Christian Biesinger

>>>>> "Christian" == Christian Biesinger via gdb-patches <gdb-patches@sourceware.org> writes:

Christian> From: Christian Biesinger <cbiesinger@chromium.org>
Christian> Once https://sourceware.org/ml/insight/2019-q4/msg00000.html lands,
Christian> we can just include gdbtk.h to get the declarations for
Christian> external_editor_command and gdbtk_test, instead of having to
Christian> declare them here in main.c.

Christian> gdb/ChangeLog:

Christian> 2019-10-07  Christian Biesinger  <cbiesinger@chromium.org>

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

Looks good to me, thanks.

Tom

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Include gdbtk.h to avoid declarations
  2019-10-08 13:12 ` Tom Tromey
@ 2019-10-10 17:44   ` Christian Biesinger via gdb-patches
  0 siblings, 0 replies; 3+ messages in thread
From: Christian Biesinger via gdb-patches @ 2019-10-10 17:44 UTC (permalink / raw)
  To: Tom Tromey; +Cc: Christian Biesinger via gdb-patches

On Tue, Oct 8, 2019 at 8:11 AM Tom Tromey <tom@tromey.com> wrote:
>
> >>>>> "Christian" == Christian Biesinger via gdb-patches <gdb-patches@sourceware.org> writes:
>
> Christian> From: Christian Biesinger <cbiesinger@chromium.org>
> Christian> Once https://sourceware.org/ml/insight/2019-q4/msg00000.html lands,
> Christian> we can just include gdbtk.h to get the declarations for
> Christian> external_editor_command and gdbtk_test, instead of having to
> Christian> declare them here in main.c.
>
> Christian> gdb/ChangeLog:
>
> Christian> 2019-10-07  Christian Biesinger  <cbiesinger@chromium.org>
>
> Christian>      * main.c (captured_main_1): Include gdbtk.h and remove declarations
> Christian>      for external_editor_command and gdbtk_test.
>
> Looks good to me, thanks.

Thanks, pushed now that the change to insight landed.

To ssh://sourceware.org/git/binutils-gdb.git
   c2c440a9038..26344e0c532  HEAD -> master

Christian

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-10-10 17:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-07 21:22 [PATCH] Include gdbtk.h to avoid declarations Christian Biesinger via gdb-patches
2019-10-08 13:12 ` Tom Tromey
2019-10-10 17:44   ` Christian Biesinger via gdb-patches

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).