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]: Update TUI window contents when entering TUI mode


Hi!

When we enter in TUI mode the windows are not updated and they display
the information when we left the TUI mode.  This is confusing if we do
stepping/continue outside TUI mode and then switch to TUI (still see where
we were before).

I've committed this patch to update the windows according to the
current gdb selected frame.  Also fixes a warning.

	Stephane

2002-08-24  Stephane Carrez  <stcarrez@nerim.fr>

	* tui.c (strcat_to_buf): Use const char* for source item.
	(tui_enable): Update the windows if there is a selected frame.
	* tui.h (strcat_to_buf): Update prototype.
	(strcat_to_buf_with_fmt): Remove.

Index: tui.c
===================================================================
RCS file: /cvs/src/src/gdb/tui/tui.c,v
retrieving revision 1.19
diff -u -p -r1.19 tui.c
--- tui.c	24 Aug 2002 16:43:08 -0000	1.19
+++ tui.c	24 Aug 2002 16:59:44 -0000
@@ -261,6 +261,9 @@ tui_enable (void)
 
   tui_version = 1;
   tui_active = 1;
+  if (selected_frame)
+     tuiShowFrameInfo (selected_frame);
+
   refresh ();
   tui_update_gdb_sizes ();
 }
@@ -327,7 +330,7 @@ tuiGetLowDisassemblyAddress (CORE_ADDR l
 }
 
 void
-strcat_to_buf (char *buf, int buflen, char *itemToAdd)
+strcat_to_buf (char *buf, int buflen, const char *itemToAdd)
 {
   if (itemToAdd != (char *) NULL && buf != (char *) NULL)
     {
Index: tui.h
===================================================================
RCS file: /cvs/src/src/gdb/tui/tui.h,v
retrieving revision 1.12
diff -u -p -r1.12 tui.h
--- tui.h	24 Aug 2002 10:15:54 -0000	1.12
+++ tui.h	24 Aug 2002 16:59:44 -0000
@@ -48,8 +48,7 @@ Opaque (*OpaqueFuncPtr) (va_list);
  */
      typedef OpaqueFuncPtr TuiOpaqueFuncPtr;
 
-extern void strcat_to_buf (char *, int, char *);
-extern void strcat_to_buf_with_fmt (char *, int, char *, ...);
+extern void strcat_to_buf (char *, int, const char *);
 
 /* Types of error returns */
      typedef enum

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