From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 632 invoked by alias); 13 Mar 2003 20:28:45 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 623 invoked from network); 13 Mar 2003 20:28:45 -0000 Received: from unknown (HELO mallaury.noc.nerim.net) (62.4.17.102) by sources.redhat.com with SMTP; 13 Mar 2003 20:28:45 -0000 Received: from nerim.fr (stcarrez.net1.nerim.net [62.212.108.40]) by mallaury.noc.nerim.net (Postfix) with ESMTP id 84C7562D1D; Thu, 13 Mar 2003 21:28:41 +0100 (CET) Message-ID: <3E70E9F8.4020702@nerim.fr> Date: Thu, 13 Mar 2003 20:28:00 -0000 From: Stephane Carrez User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.8) Gecko/20020204 X-Accept-Language: en-us MIME-Version: 1.0 To: Andrew Cagney Cc: gdb-patches@sources.redhat.com Subject: Re: [patch rfc] use typedef opaque type implementations References: <3E623567.3060508@redhat.com> Content-Type: multipart/mixed; boundary="------------090700050908020803060905" X-SW-Source: 2003-03/txt/msg00307.txt.bz2 This is a multi-part message in MIME format. --------------090700050908020803060905 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-length: 844 Hi Andrew, Andrew Cagney wrote: > This patch follows up an earlier thread that pointed out that GDB is > pretty broken when it comes to debugging a program that contains > multiple struct definitions (e.g., gdb). > > The attached patch implements the suggested `fix'. Declare a file-local > typedef and then use that. I've applied it to the ui-out code. A quick > debug suggests that it works well. > > comments? I'll table this for a week ... > Andrew > Hum... yes. You broke the TUI because the following typedef: > @@ -35,6 +36,7 @@ > int line; > int start_of_line; > }; > +struct ui_out_data tui_out_data; > is not a typedef but a global variable declaration :-) I've committed this patch to fix the TUI. Stephane 2003-03-13 Stephane Carrez * tui-out.c (tui_out_data): Fix typedef. --------------090700050908020803060905 Content-Type: text/plain; name="tui-out.c.diffs" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="tui-out.c.diffs" Content-length: 468 Index: tui-out.c =================================================================== RCS file: /cvs/src/src/gdb/tui/tui-out.c,v retrieving revision 1.4 diff -u -p -r1.4 tui-out.c --- tui-out.c 8 Mar 2003 20:04:27 -0000 1.4 +++ tui-out.c 13 Mar 2003 20:22:30 -0000 @@ -36,7 +36,7 @@ struct ui_out_data int line; int start_of_line; }; -struct ui_out_data tui_out_data; +typedef struct ui_out_data tui_out_data; /* These are the CLI output functions */ --------------090700050908020803060905--