public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [FYI 3/3] remove obsolete declaration
  2014-01-13 21:32 [FYI 0/3] trivial unused fixes Tom Tromey
@ 2014-01-13 21:32 ` Tom Tromey
  2014-01-13 21:32 ` [FYI 2/3] remove use_windows Tom Tromey
  2014-01-13 21:32 ` [FYI 1/3] remove unused deprecated_flush_hook declaration Tom Tromey
  2 siblings, 0 replies; 4+ messages in thread
From: Tom Tromey @ 2014-01-13 21:32 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

deprecated_core_resize_section_table is declared but never defined.
This patch removes the stale declaration.

2014-01-13  Tom Tromey  <tromey@redhat.com>

	* gdbcore.h (deprecated_core_resize_section_table): Remove.
---
 gdb/ChangeLog | 4 ++++
 gdb/gdbcore.h | 2 --
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/gdb/gdbcore.h b/gdb/gdbcore.h
index acf785c..5a3ed45 100644
--- a/gdb/gdbcore.h
+++ b/gdb/gdbcore.h
@@ -229,6 +229,4 @@ extern void deprecated_add_core_fns (struct core_fns *cf);
 extern int default_core_sniffer (struct core_fns *cf, bfd * abfd);
 extern int default_check_format (bfd * abfd);
 
-struct target_section *deprecated_core_resize_section_table (int num_added);
-
 #endif /* !defined (GDBCORE_H) */
-- 
1.8.1.4

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

* [FYI 0/3] trivial unused fixes
@ 2014-01-13 21:32 Tom Tromey
  2014-01-13 21:32 ` [FYI 3/3] remove obsolete declaration Tom Tromey
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Tom Tromey @ 2014-01-13 21:32 UTC (permalink / raw)
  To: gdb-patches

I'm checking these in.

Two of these patches just remove declarations that no longer have
corresponding definitions.

The third removes the "use_windows" global and the corresponding field
from struct capture_main_args.  I had long assumed that this was used
by Insight, but recently I checked the sources and I found that
nothing checks this variable.

Tested by rebuilding and grep.

Tom

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

* [FYI 1/3] remove unused deprecated_flush_hook declaration
  2014-01-13 21:32 [FYI 0/3] trivial unused fixes Tom Tromey
  2014-01-13 21:32 ` [FYI 3/3] remove obsolete declaration Tom Tromey
  2014-01-13 21:32 ` [FYI 2/3] remove use_windows Tom Tromey
@ 2014-01-13 21:32 ` Tom Tromey
  2 siblings, 0 replies; 4+ messages in thread
From: Tom Tromey @ 2014-01-13 21:32 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

deprecated_flush_hook is declared in defs.h but never defined.
This patch removes the stale declaration.

2014-01-13  Tom Tromey  <tromey@redhat.com>

	* defs.h (deprecated_flush_hook): Remove.
---
 gdb/ChangeLog | 4 ++++
 gdb/defs.h    | 1 -
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/gdb/defs.h b/gdb/defs.h
index 4aee7bb..7a7d474 100644
--- a/gdb/defs.h
+++ b/gdb/defs.h
@@ -710,7 +710,6 @@ extern int (*deprecated_query_hook) (const char *, va_list)
      ATTRIBUTE_FPTR_PRINTF(1,0);
 extern void (*deprecated_warning_hook) (const char *, va_list)
      ATTRIBUTE_FPTR_PRINTF(1,0);
-extern void (*deprecated_flush_hook) (struct ui_file * stream);
 extern void (*deprecated_interactive_hook) (void);
 extern void (*deprecated_readline_begin_hook) (char *, ...)
      ATTRIBUTE_FPTR_PRINTF_1;
-- 
1.8.1.4

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

* [FYI 2/3] remove use_windows
  2014-01-13 21:32 [FYI 0/3] trivial unused fixes Tom Tromey
  2014-01-13 21:32 ` [FYI 3/3] remove obsolete declaration Tom Tromey
@ 2014-01-13 21:32 ` Tom Tromey
  2014-01-13 21:32 ` [FYI 1/3] remove unused deprecated_flush_hook declaration Tom Tromey
  2 siblings, 0 replies; 4+ messages in thread
From: Tom Tromey @ 2014-01-13 21:32 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

Nothing actually uses use_windows, not even Insight.  So, this patch
removes it.

2014-01-13  Tom Tromey  <tromey@redhat.com>

	* defs.h (use_windows): Remove.
	* gdb.c (main): Update.
	* main.c (captured_main, gdb_main): Update.
	* main.h (struct captured_main_args) <use_windows>: Remove.
	* top.c (use_windows): Remove.
---
 gdb/ChangeLog |  8 ++++++++
 gdb/defs.h    |  4 ----
 gdb/gdb.c     |  1 -
 gdb/main.c    | 13 -------------
 gdb/main.h    |  1 -
 gdb/top.c     |  5 -----
 6 files changed, 8 insertions(+), 24 deletions(-)

diff --git a/gdb/defs.h b/gdb/defs.h
index 7a7d474..d86f4a9 100644
--- a/gdb/defs.h
+++ b/gdb/defs.h
@@ -729,10 +729,6 @@ extern void (*deprecated_call_command_hook) (struct cmd_list_element * c,
 extern int (*deprecated_ui_load_progress_hook) (const char *section,
 						unsigned long num);
 
-/* Inhibit window interface if non-zero.  */
-
-extern int use_windows;
-
 /* If this definition isn't overridden by the header files, assume
    that isatty and fileno exist on this system.  */
 #ifndef ISATTY
diff --git a/gdb/gdb.c b/gdb/gdb.c
index e708b34..78cfb12 100644
--- a/gdb/gdb.c
+++ b/gdb/gdb.c
@@ -29,7 +29,6 @@ main (int argc, char **argv)
   memset (&args, 0, sizeof args);
   args.argc = argc;
   args.argv = argv;
-  args.use_windows = 0;
   args.interpreter_p = INTERP_CONSOLE;
   return gdb_main (&args);
 }
diff --git a/gdb/main.c b/gdb/main.c
index 0c8349e..efb49f5 100644
--- a/gdb/main.c
+++ b/gdb/main.c
@@ -588,19 +588,14 @@ captured_main (void *data)
 	    xfree (interpreter_p);
 	    interpreter_p = xstrdup (INTERP_INSIGHT);
 #endif
-	    use_windows = 1;
 	    break;
 	  case OPT_NOWINDOWS:
 	    /* -nw is equivalent to -i=console.  */
 	    xfree (interpreter_p);
 	    interpreter_p = xstrdup (INTERP_CONSOLE);
-	    use_windows = 0;
 	    break;
 	  case 'f':
 	    annotation_level = 1;
-	    /* We have probably been invoked from emacs.  Disable
-	       window interface.  */
-	    use_windows = 0;
 	    break;
 	  case 's':
 	    symarg = optarg;
@@ -744,13 +739,6 @@ captured_main (void *data)
 	  }
       }
 
-    /* If --help or --version or --configuration, disable window
-       interface.  */
-    if (print_help || print_version || print_configuration)
-      {
-	use_windows = 0;
-      }
-
     if (batch_flag)
       quiet = 1;
   }
@@ -1072,7 +1060,6 @@ captured_main (void *data)
 int
 gdb_main (struct captured_main_args *args)
 {
-  use_windows = args->use_windows;
   catch_errors (captured_main, args, "", RETURN_MASK_ALL);
   /* The only way to end up here is by an error (normal exit is
      handled by quit_force()), hence always return an error status.  */
diff --git a/gdb/main.h b/gdb/main.h
index cc97bcb..089e1c8 100644
--- a/gdb/main.h
+++ b/gdb/main.h
@@ -24,7 +24,6 @@ struct captured_main_args
 {
   int argc;
   char **argv;
-  int use_windows;
   const char *interpreter_p;
 };
 
diff --git a/gdb/top.c b/gdb/top.c
index d5ef034..f92043d 100644
--- a/gdb/top.c
+++ b/gdb/top.c
@@ -86,11 +86,6 @@ const char gdbinit[] = GDBINIT;
 
 int inhibit_gdbinit = 0;
 
-/* If nonzero, and GDB has been configured to be able to use windows,
-   attempt to open them upon startup.  */
-
-int use_windows = 0;
-
 extern char lang_frame_mismatch_warn[];		/* language.c */
 
 /* Flag for whether we want to confirm potentially dangerous
-- 
1.8.1.4

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

end of thread, other threads:[~2014-01-13 21:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-13 21:32 [FYI 0/3] trivial unused fixes Tom Tromey
2014-01-13 21:32 ` [FYI 3/3] remove obsolete declaration Tom Tromey
2014-01-13 21:32 ` [FYI 2/3] remove use_windows Tom Tromey
2014-01-13 21:32 ` [FYI 1/3] remove unused deprecated_flush_hook declaration Tom Tromey

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).