This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH]: Add detach_hook for TUI


Hi!

This patch adds a hook for TUI to know when a process is detached or dies.
The status line is refreshed.

Committed on mainline.

	Stephane

2002-09-01  Stephane Carrez  <stcarrez@nerim.fr>

	* tui-hooks.c (tui_detach_hook): New hook to know when a process dies.
	(tui_install_hooks): Install it.
	(tui_remove_hooks): Remove it.
Index: tui-hooks.c
===================================================================
RCS file: /cvs/src/src/gdb/tui/tui-hooks.c,v
retrieving revision 1.6
diff -u -p -r1.6 tui-hooks.c
--- tui-hooks.c	30 Aug 2002 20:07:05 -0000	1.6
+++ tui-hooks.c	1 Sep 2002 12:44:23 -0000
@@ -277,6 +277,15 @@ tui_print_frame_info_listing_hook (struc
   tuiShowFrameInfo (selected_frame);
 }
 
+/* Called when the target process died or is detached.
+   Update the status line.  */
+static void
+tui_detach_hook (void)
+{
+  tuiShowFrameInfo (0);
+  tui_display_main ();
+}
+
 /* Install the TUI specific hooks.  */
 void
 tui_install_hooks (void)
@@ -292,6 +301,7 @@ tui_install_hooks (void)
 
   registers_changed_hook = tui_registers_changed_hook;
   register_changed_hook = tui_register_changed_hook;
+  detach_hook = tui_detach_hook;
 }
 
 /* Remove the TUI specific hooks.  */
@@ -304,6 +314,7 @@ tui_remove_hooks (void)
   query_hook = 0;
   registers_changed_hook = 0;
   register_changed_hook = 0;
+  detach_hook = 0;
 
   /* Restore the previous event hooks.  */
   set_gdb_event_hooks (tui_old_event_hooks);

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]