From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10221 invoked by alias); 19 Nov 2001 20:06:12 -0000 Mailing-List: contact gdb-patches-help@sourceware.cygnus.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 10198 invoked from network); 19 Nov 2001 20:06:10 -0000 Received: from unknown (HELO cygnus.com) (205.180.230.5) by sourceware.cygnus.com with SMTP; 19 Nov 2001 20:06:10 -0000 Received: from makita.cygnus.com (makita.cygnus.com [205.180.230.78]) by runyon.cygnus.com (8.8.7-cygnus/8.8.7) with ESMTP id MAA25096; Mon, 19 Nov 2001 12:06:07 -0800 (PST) Received: from localhost (keiths@localhost) by makita.cygnus.com (8.8.8+Sun/8.6.4) with ESMTP id MAA16751; Mon, 19 Nov 2001 12:06:07 -0800 (PST) X-Authentication-Warning: makita.cygnus.com: keiths owned process doing -bs Date: Wed, 07 Nov 2001 16:33:00 -0000 From: Keith Seitz To: cc: Elena Zannoni Subject: [RFA] top.c: initialize other UIs before cli Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-SW-Source: 2001-11/txt/msg00125.txt.bz2 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 * 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); }