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]

Re: [patch rfc] use typedef opaque type implementations


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 <stcarrez at nerim dot fr>

* tui-out.c (tui_out_data): Fix typedef.
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 */
 

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