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]

[RFA] top.c: initialize other UIs before cli


Hi,

There is currently a little problem with init_ui_hook: if the UI fails to
initialize (and we should fall back to "gdb -nw"), then the CLI will NOT
get initialized properly.

This results because init_ui_hook does not return any status indicating
the failure.

This simple change will correct this anomaly without altering init_ui_hook
semantics, i.e., it is absolutely the least intrusive.

?
Keith

ChangeLog
2001-11-19  Keith Seitz  <keiths@redhat.com>

	* top.c (gdb_init): Call init_ui_hook before initializing
	the default UI.

Patch
Index: top.c
===================================================================
RCS file: /cvs/src/src/gdb/top.c,v
retrieving revision 1.48
diff -u -p -r1.48 top.c
--- top.c	2001/11/10 21:34:56	1.48
+++ top.c	2001/11/19 20:01:19
@@ -2034,6 +2034,9 @@ gdb_init (char *argv0)
   set_language (language_c);
   expected_language = current_language;		/* don't warn about the change.  */

+  if (init_ui_hook)
+    init_ui_hook (argv0);
+
 #ifdef UI_OUT
   /* Install the default UI */
   if (!init_ui_hook)
@@ -2050,7 +2053,4 @@ gdb_init (char *argv0)
 	}
     }
 #endif
-
-  if (init_ui_hook)
-    init_ui_hook (argv0);
 }


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