diff options
author | Ulrich Weigand <uweigand@de.ibm.com> | 2007-10-02 16:50:08 +0000 |
---|---|---|
committer | Ulrich Weigand <uweigand@de.ibm.com> | 2007-10-02 16:50:08 +0000 |
commit | 9612b5ec136fc465a91c191be08b37060bb18e2f (patch) | |
tree | 995495b1de699b012352fd0dcc0bdd1f06824890 /gdb | |
parent | 407f1a2e1727b611f2f36645b23300b4f15cf402 (diff) | |
download | gdb-9612b5ec136fc465a91c191be08b37060bb18e2f.zip gdb-9612b5ec136fc465a91c191be08b37060bb18e2f.tar.gz gdb-9612b5ec136fc465a91c191be08b37060bb18e2f.tar.bz2 |
2007-10-02 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.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 8 | ||||
-rw-r--r-- | gdb/tui/tui-interp.c | 1 | ||||
-rw-r--r-- | gdb/tui/tui-win.c | 17 | ||||
-rw-r--r-- | gdb/tui/tui-win.h | 2 |
4 files changed, 28 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 0276e2c..387661a 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,11 @@ +2007-10-02 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. + 2007-10-02 Ulrich Weigand <uweigand@de.ibm.com> * ppc-linux-nat.c (ppc_linux_stopped_data_address): Cast diff --git a/gdb/tui/tui-interp.c b/gdb/tui/tui-interp.c index 9725899..4b2b91a 100644 --- a/gdb/tui/tui-interp.c +++ b/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; diff --git a/gdb/tui/tui-win.c b/gdb/tui/tui-win.c index d90bb05..aea6b3e 100644 --- a/gdb/tui/tui-win.c +++ b/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 HAVE_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 +} /************************* diff --git a/gdb/tui/tui-win.h b/gdb/tui/tui-win.h index b6c73d5..4a8da1e 100644 --- a/gdb/tui/tui-win.h +++ b/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); |