Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Carlos Eduardo Seo <cseo@linux.vnet.ibm.com>
To: Pedro Alves <pedro_alves@portugalmail.pt>
Cc: gdb-patches@sourceware.org, eliz@gnu.org
Subject: Re: [patch] tui: initialize signal handler
Date: Sat, 22 Sep 2007 19:23:00 -0000	[thread overview]
Message-ID: <46F56BAE.80700@linux.vnet.ibm.com> (raw)
In-Reply-To: <46F564A4.3000407@portugalmail.pt>

[-- Attachment #1: Type: text/plain, Size: 429 bytes --]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Updated with you suggestions. Ok to commit now?

Regards,

- --
Carlos Eduardo Seo
Software Engineer
IBM Linux Technology Center
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFG9Wutqvq7Aov/qQARAmhKAJ9saBoP+CC/IuyIj+R1wA1QHFD5VACeKHtx
sfBjFEz6eoe9Vp7/5Uw5C6U=
=3Nhn
-----END PGP SIGNATURE-----


[-- Attachment #2: tui-sighandler.diff --]
[-- Type: text/x-patch, Size: 1888 bytes --]

2007-09-22  Carlos Eduardo Seo  <cseo@linux.vnet.ibm.com>

        * tui/tui-interp.c (tui_init): Initialize
        tui's SIGWINCH signal handler.
        * tui/tui-win.c (tui_initialize_win): New
        function for initializing tui's SIGWINCH signal
        handler.
        * tui/tui-win.h (tui_initialize_win): Declare


Index: src/gdb/tui/tui-interp.c
===================================================================
--- src.orig/gdb/tui/tui-interp.c
+++ src/gdb/tui/tui-interp.c
@@ -56,6 +56,7 @@ tui_init (void)
   tui_initialize_static_data ();
 
   tui_initialize_io ();
+  tui_initialize_win ();
   tui_initialize_readline ();
 
   return NULL;
Index: src/gdb/tui/tui-win.c
===================================================================
--- src.orig/gdb/tui/tui-win.c
+++ src/gdb/tui/tui-win.c
@@ -50,6 +50,8 @@
 #include <ctype.h>
 #include "readline/readline.h"
 
+#include <signal.h>
+
 /*******************************
 ** Static Local Decls
 ********************************/
@@ -813,6 +815,21 @@ tui_sigwinch_handler (int signal)
   tui_set_win_resized_to (TRUE);
 }
 
+/* Initializes SIGWINCH signal handler for the tui.  */
+void
+tui_initialize_win (void)
+{
+#ifdef SIGWINCH
+#ifdef SIGACTION
+  struct sigaction old_winch;
+  memset (&old_winch, 0, sizeof (old_winch));
+  old_winch.sa_handler = &tui_sigwinch_handler;
+  sigaction (SIGWINCH, &old_winch, NULL);
+#else
+  signal (SIGWINCH, &tui_sigwinch_handler);
+#endif
+#endif
+}
 
 
 /*************************
Index: src/gdb/tui/tui-win.h
===================================================================
--- src.orig/gdb/tui/tui-win.h
+++ src/gdb/tui/tui-win.h
@@ -49,6 +49,8 @@ extern int tui_active_border_attrs;
 
 extern int tui_update_variables (void);
 
+extern void tui_initialize_win (void);
+
 /* Update gdb's knowledge of the terminal size.  */
 extern void tui_update_gdb_sizes (void);
 

[-- Attachment #3: tui-sighandler.diff.sig --]
[-- Type: application/octet-stream, Size: 65 bytes --]

  reply	other threads:[~2007-09-22 19:23 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-22  1:24 Carlos Eduardo Seo
2007-09-22  7:34 ` Eli Zaretskii
2007-09-22 10:44 ` Pedro Alves
2007-09-22 17:13   ` Carlos Eduardo Seo
2007-09-22 18:30     ` Eli Zaretskii
2007-09-22 18:54     ` Pedro Alves
2007-09-22 19:23       ` Carlos Eduardo Seo [this message]
2007-09-22 23:10         ` Daniel Jacobowitz
2007-09-22 23:53           ` Carlos Eduardo Seo
2007-09-29  0:10             ` Carlos Eduardo Seo
2007-09-29  0:29               ` Daniel Jacobowitz
2007-10-02 16:51             ` Ulrich Weigand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=46F56BAE.80700@linux.vnet.ibm.com \
    --to=cseo@linux.vnet.ibm.com \
    --cc=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=pedro_alves@portugalmail.pt \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox