From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29104 invoked by alias); 7 Nov 2005 12:48:47 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 28994 invoked by uid 22791); 7 Nov 2005 12:48:39 -0000 Received: from fra-del-02.spheriq.net (HELO fra-del-02.spheriq.net) (195.46.51.98) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Mon, 07 Nov 2005 12:48:39 +0000 Received: from fra-out-02.spheriq.net (fra-out-02.spheriq.net [195.46.51.130]) by fra-del-02.spheriq.net with ESMTP id jA7CmOva032153 for ; Mon, 7 Nov 2005 12:48:24 GMT Received: from fra-cus-01.spheriq.net (fra-cus-01.spheriq.net [195.46.51.37]) by fra-out-02.spheriq.net with ESMTP id jA7CmMgP026491 for ; Mon, 7 Nov 2005 12:48:23 GMT Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by fra-cus-01.spheriq.net with ESMTP id jA7CmLLq032758 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Mon, 7 Nov 2005 12:48:21 GMT Received: from zeta.dmz-eu.st.com (ns2.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 807BBDA41; Mon, 7 Nov 2005 12:48:20 +0000 (GMT) Received: by zeta.dmz-eu.st.com (STMicroelectronics, from userid 60012) id 2CFE247359; Mon, 7 Nov 2005 12:51:15 +0000 (GMT) Received: from zeta.dmz-eu.st.com (localhost [127.0.0.1]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id DA0767599B; Mon, 7 Nov 2005 12:51:14 +0000 (UTC) Received: from mail1.bri.st.com (mail1.bri.st.com [164.129.8.218]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 5757A47276; Mon, 7 Nov 2005 12:51:14 +0000 (GMT) Received: from [164.129.15.13] (terrorhawk.bri.st.com [164.129.15.13]) by mail1.bri.st.com (MOS 3.5.8-GR) with ESMTP id CGG00274 (AUTH "andrew stubbs"); Mon, 7 Nov 2005 12:48:18 GMT Message-ID: <436F4C8E.5070303@st.com> Date: Mon, 07 Nov 2005 15:04:00 -0000 From: Andrew STUBBS User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) MIME-Version: 1.0 To: Jim Blandy Cc: gdb-patches@sources.redhat.com Subject: Re: PATCH: Fix -w option References: <435E2756.8060103@st.com> <436B4BE3.7060201@st.com> In-Reply-To: Content-Type: multipart/mixed; boundary="------------000406020106010001030205" X-O-Spoofed: Not Scanned X-O-General-Status: No X-O-Spam1-Status: Not Scanned X-O-Spam2-Status: Not Scanned X-O-URL-Status: Not Scanned X-O-Virus1-Status: No X-O-Virus2-Status: Not Scanned X-O-Virus3-Status: No X-O-Virus4-Status: No X-O-Virus5-Status: Not Scanned X-O-Image-Status: Not Scanned X-O-Attach-Status: Not Scanned X-SpheriQ-Ver: 4.1.07 X-SW-Source: 2005-11/txt/msg00078.txt.bz2 This is a multi-part message in MIME format. --------------000406020106010001030205 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 515 Jim Blandy wrote: > Andrew STUBBS writes: > >>Andrew Stubbs wrote: >> >>>Hi, >>>The -w option does not do anything anymore. >>>The attached patch fixes the problem and allows it to open Insight >>>once more. It also tidies up the use of interpreter_p a little wrt >>>the tui. >> >>No word on this one yet. Is it OK? > > > Yes, it looks fine. Could you correct the use of "tui" instead of > INTERP_TUI in tui/tui-interp.c, too? > Certainly, I have commited the attached. Thanks Andrew --------------000406020106010001030205 Content-Type: text/plain; name="option_-w_fix.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="option_-w_fix.patch" Content-length: 2353 2005-11-07 Andrew Stubbs * main.c (main): Use INTERP_TUI instead of "tui". Set interpreter to INTERP_INSIGHT when '-w' given. * interps.h (INTERP_INSIGHT): New define. * tui/tui-interp.c (_initialize_tui_interp): Use INTERP_TUI instead of "tui". Index: src/gdb/main.c =================================================================== --- src.orig/gdb/main.c 2005-11-07 11:50:25.000000000 +0000 +++ src/gdb/main.c 2005-11-07 12:24:25.000000000 +0000 @@ -350,11 +350,16 @@ captured_main (void *data) case OPT_TUI: /* --tui is equivalent to -i=tui. */ xfree (interpreter_p); - interpreter_p = xstrdup ("tui"); + interpreter_p = xstrdup (INTERP_TUI); break; case OPT_WINDOWS: /* FIXME: cagney/2003-03-01: Not sure if this option is actually useful, and if it is, what it should do. */ +#ifdef GDBTK + /* --windows is equivalent to -i=insight. */ + xfree (interpreter_p); + interpreter_p = xstrdup (INTERP_INSIGHT); +#endif use_windows = 1; break; case OPT_NOWINDOWS: Index: src/gdb/interps.h =================================================================== --- src.orig/gdb/interps.h 2005-11-07 11:50:25.000000000 +0000 +++ src/gdb/interps.h 2005-11-07 12:24:25.000000000 +0000 @@ -76,5 +76,6 @@ extern void clear_interpreter_hooks (voi #define INTERP_MI3 "mi3" #define INTERP_MI "mi" #define INTERP_TUI "tui" +#define INTERP_INSIGHT "insight" #endif Index: src/gdb/tui/tui-interp.c =================================================================== --- src.orig/gdb/tui/tui-interp.c 2005-04-26 06:03:41.000000000 +0100 +++ src/gdb/tui/tui-interp.c 2005-11-07 12:25:44.000000000 +0000 @@ -199,13 +199,13 @@ _initialize_tui_interp (void) /* Create a default uiout builder for the TUI. */ tui_out = tui_out_new (gdb_stdout); - interp_add (interp_new ("tui", NULL, tui_out, &procs)); - if (interpreter_p && strcmp (interpreter_p, "tui") == 0) + interp_add (interp_new (INTERP_TUI, NULL, tui_out, &procs)); + if (interpreter_p && strcmp (interpreter_p, INTERP_TUI) == 0) tui_start_enabled = 1; if (interpreter_p && strcmp (interpreter_p, INTERP_CONSOLE) == 0) { xfree (interpreter_p); - interpreter_p = xstrdup ("tui"); + interpreter_p = xstrdup (INTERP_TUI); } } --------------000406020106010001030205--