Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* RFC: remove SIGWINCH_HANDLER and SIGWINCH_HANDLER_BODY
@ 2012-08-15 15:36 Tom Tromey
  2012-08-15 15:44 ` Mark Kettenis
  2012-08-22 14:21 ` Tom Tromey
  0 siblings, 2 replies; 4+ messages in thread
From: Tom Tromey @ 2012-08-15 15:36 UTC (permalink / raw)
  To: gdb-patches

As far as I can tell, nothing ever defines SIGWINCH_HANDLER or
SIGWINCH_HANDLER_BODY, so the code referring to it is dead.
    
Tested by rebuilding and also grepping to make sure that it isn't
defined somewhere.  I also checked Insight.

Tom

    	* event-top.c (sigwinch_token, handle_sigwinch): Remove.
    	(async_init_signals): Update.
    	* utils.c (init_page_info): Don't use SIGWINCH_HANDLER.
    	(SIGWINCH_HANDLER_BODY): Remove.

diff --git a/gdb/event-top.c b/gdb/event-top.c
index 52e7852..b4a6790 100644
--- a/gdb/event-top.c
+++ b/gdb/event-top.c
@@ -58,9 +58,6 @@ static void handle_sigquit (int sig);
 static void handle_sighup (int sig);
 #endif
 static void handle_sigfpe (int sig);
-#if defined(SIGWINCH) && defined(SIGWINCH_HANDLER)
-static void handle_sigwinch (int sig);
-#endif
 
 /* Functions to be invoked by the event loop in response to
    signals.  */
@@ -134,9 +131,6 @@ void *sighup_token;
 void *sigquit_token;
 #endif
 void *sigfpe_token;
-#if defined(SIGWINCH) && defined(SIGWINCH_HANDLER)
-void *sigwinch_token;
-#endif
 #ifdef STOP_SIGNAL
 void *sigtstp_token;
 #endif
@@ -769,11 +763,6 @@ async_init_signals (void)
   sigfpe_token =
     create_async_signal_handler (async_float_handler, NULL);
 
-#if defined(SIGWINCH) && defined(SIGWINCH_HANDLER)
-  signal (SIGWINCH, handle_sigwinch);
-  sigwinch_token =
-    create_async_signal_handler (SIGWINCH_HANDLER, NULL);
-#endif
 #ifdef STOP_SIGNAL
   sigtstp_token =
     create_async_signal_handler (async_stop_sig, NULL);
@@ -950,17 +939,6 @@ async_float_handler (gdb_client_data arg)
      divide by zero causes this, so "float" is a misnomer.  */
   error (_("Erroneous arithmetic operation."));
 }
-
-/* Tell the event loop what to do if SIGWINCH is received.
-   See event-signal.c.  */
-#if defined(SIGWINCH) && defined(SIGWINCH_HANDLER)
-static void
-handle_sigwinch (int sig)
-{
-  mark_async_signal_handler_wrapper (sigwinch_token);
-  signal (sig, handle_sigwinch);
-}
-#endif
 \f
 
 /* Called by do_setshow_command.  */
diff --git a/gdb/utils.c b/gdb/utils.c
index 607d7bc..b9e76ab 100644
--- a/gdb/utils.c
+++ b/gdb/utils.c
@@ -1714,11 +1714,6 @@ init_page_info (void)
 	  lines_per_page = UINT_MAX;
 	}
 
-      /* FIXME: Get rid of this junk.  */
-#if defined(SIGWINCH) && defined(SIGWINCH_HANDLER)
-      SIGWINCH_HANDLER (SIGWINCH);
-#endif
-
       /* If the output is not a terminal, don't paginate it.  */
       if (!ui_file_isatty (gdb_stdout))
 	lines_per_page = UINT_MAX;
@@ -2743,11 +2738,6 @@ When set, debugging messages will be marked with seconds and microseconds."),
 			   &setdebuglist, &showdebuglist);
 }
 
-/* Machine specific function to handle SIGWINCH signal.  */
-
-#ifdef  SIGWINCH_HANDLER_BODY
-SIGWINCH_HANDLER_BODY
-#endif
 /* Print routines to handle variable size regs, etc.  */
 /* Temporary storage using circular buffer.  */
 #define NUMCELLS 16


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

* Re: RFC: remove SIGWINCH_HANDLER and SIGWINCH_HANDLER_BODY
  2012-08-15 15:36 RFC: remove SIGWINCH_HANDLER and SIGWINCH_HANDLER_BODY Tom Tromey
@ 2012-08-15 15:44 ` Mark Kettenis
  2012-08-22 14:21 ` Tom Tromey
  1 sibling, 0 replies; 4+ messages in thread
From: Mark Kettenis @ 2012-08-15 15:44 UTC (permalink / raw)
  To: tromey; +Cc: gdb-patches

> From: Tom Tromey <tromey@redhat.com>
> Date: Wed, 15 Aug 2012 09:35:41 -0600
> 
> As far as I can tell, nothing ever defines SIGWINCH_HANDLER or
> SIGWINCH_HANDLER_BODY, so the code referring to it is dead.
>     
> Tested by rebuilding and also grepping to make sure that it isn't
> defined somewhere.  I also checked Insight.
> 
> Tom
> 
>     	* event-top.c (sigwinch_token, handle_sigwinch): Remove.
>     	(async_init_signals): Update.
>     	* utils.c (init_page_info): Don't use SIGWINCH_HANDLER.
>     	(SIGWINCH_HANDLER_BODY): Remove.

Great!


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

* Re: RFC: remove SIGWINCH_HANDLER and SIGWINCH_HANDLER_BODY
  2012-08-15 15:36 RFC: remove SIGWINCH_HANDLER and SIGWINCH_HANDLER_BODY Tom Tromey
  2012-08-15 15:44 ` Mark Kettenis
@ 2012-08-22 14:21 ` Tom Tromey
  2012-08-22 17:16   ` Eli Zaretskii
  1 sibling, 1 reply; 4+ messages in thread
From: Tom Tromey @ 2012-08-22 14:21 UTC (permalink / raw)
  To: gdb-patches

>>>>> "Tom" == Tom Tromey <tromey@redhat.com> writes:

Tom> As far as I can tell, nothing ever defines SIGWINCH_HANDLER or
Tom> SIGWINCH_HANDLER_BODY, so the code referring to it is dead.
    
Tom> Tested by rebuilding and also grepping to make sure that it isn't
Tom> defined somewhere.  I also checked Insight.

I was about to put this in when I realized I emailed the wrong version
of the patch.  These macros were documented in gdbint.texinfo, and I had
removed that, but not sent it.

So, here is the real patch.
It needs a doc review.

Tom

    	* event-top.c (sigwinch_token, handle_sigwinch): Remove.
    	(async_init_signals): Update.
    	* utils.c (init_page_info): Don't use SIGWINCH_HANDLER.
    	(SIGWINCH_HANDLER_BODY): Remove.
    
    	* gdbint.texinfo (Host Definition): Remove documentation for
    	SIGWINCH_HANDLER and SIGWINCH_HANDLER_BODY.

diff --git a/gdb/doc/gdbint.texinfo b/gdb/doc/gdbint.texinfo
index c4c1cc9..0749319 100644
--- a/gdb/doc/gdbint.texinfo
+++ b/gdb/doc/gdbint.texinfo
@@ -2739,14 +2739,6 @@ are:
 The default name of @value{GDBN}'s initialization file (normally
 @file{.gdbinit}).
 
-@item SIGWINCH_HANDLER
-If your host defines @code{SIGWINCH}, you can define this to be the name
-of a function to be called if @code{SIGWINCH} is received.
-
-@item SIGWINCH_HANDLER_BODY
-Define this to expand into code that will define the function named by
-the expansion of @code{SIGWINCH_HANDLER}.
-
 @item CRLF_SOURCE_FILES
 @cindex DOS text files
 Define this if host files use @code{\r\n} rather than @code{\n} as a
diff --git a/gdb/event-top.c b/gdb/event-top.c
index 52e7852..b4a6790 100644
--- a/gdb/event-top.c
+++ b/gdb/event-top.c
@@ -58,9 +58,6 @@ static void handle_sigquit (int sig);
 static void handle_sighup (int sig);
 #endif
 static void handle_sigfpe (int sig);
-#if defined(SIGWINCH) && defined(SIGWINCH_HANDLER)
-static void handle_sigwinch (int sig);
-#endif
 
 /* Functions to be invoked by the event loop in response to
    signals.  */
@@ -134,9 +131,6 @@ void *sighup_token;
 void *sigquit_token;
 #endif
 void *sigfpe_token;
-#if defined(SIGWINCH) && defined(SIGWINCH_HANDLER)
-void *sigwinch_token;
-#endif
 #ifdef STOP_SIGNAL
 void *sigtstp_token;
 #endif
@@ -769,11 +763,6 @@ async_init_signals (void)
   sigfpe_token =
     create_async_signal_handler (async_float_handler, NULL);
 
-#if defined(SIGWINCH) && defined(SIGWINCH_HANDLER)
-  signal (SIGWINCH, handle_sigwinch);
-  sigwinch_token =
-    create_async_signal_handler (SIGWINCH_HANDLER, NULL);
-#endif
 #ifdef STOP_SIGNAL
   sigtstp_token =
     create_async_signal_handler (async_stop_sig, NULL);
@@ -950,17 +939,6 @@ async_float_handler (gdb_client_data arg)
      divide by zero causes this, so "float" is a misnomer.  */
   error (_("Erroneous arithmetic operation."));
 }
-
-/* Tell the event loop what to do if SIGWINCH is received.
-   See event-signal.c.  */
-#if defined(SIGWINCH) && defined(SIGWINCH_HANDLER)
-static void
-handle_sigwinch (int sig)
-{
-  mark_async_signal_handler_wrapper (sigwinch_token);
-  signal (sig, handle_sigwinch);
-}
-#endif
 \f
 
 /* Called by do_setshow_command.  */
diff --git a/gdb/utils.c b/gdb/utils.c
index 607d7bc..b9e76ab 100644
--- a/gdb/utils.c
+++ b/gdb/utils.c
@@ -1714,11 +1714,6 @@ init_page_info (void)
 	  lines_per_page = UINT_MAX;
 	}
 
-      /* FIXME: Get rid of this junk.  */
-#if defined(SIGWINCH) && defined(SIGWINCH_HANDLER)
-      SIGWINCH_HANDLER (SIGWINCH);
-#endif
-
       /* If the output is not a terminal, don't paginate it.  */
       if (!ui_file_isatty (gdb_stdout))
 	lines_per_page = UINT_MAX;
@@ -2743,11 +2738,6 @@ When set, debugging messages will be marked with seconds and microseconds."),
 			   &setdebuglist, &showdebuglist);
 }
 
-/* Machine specific function to handle SIGWINCH signal.  */
-
-#ifdef  SIGWINCH_HANDLER_BODY
-SIGWINCH_HANDLER_BODY
-#endif
 /* Print routines to handle variable size regs, etc.  */
 /* Temporary storage using circular buffer.  */
 #define NUMCELLS 16


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

* Re: RFC: remove SIGWINCH_HANDLER and SIGWINCH_HANDLER_BODY
  2012-08-22 14:21 ` Tom Tromey
@ 2012-08-22 17:16   ` Eli Zaretskii
  0 siblings, 0 replies; 4+ messages in thread
From: Eli Zaretskii @ 2012-08-22 17:16 UTC (permalink / raw)
  To: Tom Tromey; +Cc: gdb-patches

> From: Tom Tromey <tromey@redhat.com>
> Date: Wed, 22 Aug 2012 08:21:30 -0600
> 
> So, here is the real patch.
> It needs a doc review.

The documentation change is pretty obvious, so it's fine with me.
Thanks.


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

end of thread, other threads:[~2012-08-22 17:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-15 15:36 RFC: remove SIGWINCH_HANDLER and SIGWINCH_HANDLER_BODY Tom Tromey
2012-08-15 15:44 ` Mark Kettenis
2012-08-22 14:21 ` Tom Tromey
2012-08-22 17:16   ` Eli Zaretskii

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox