This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[RFA] dwarf2read.c: Use make_function_type instead of lookup_function_type
- From: Corinna Vinschen <vinschen at redhat dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Tue, 5 Oct 2004 18:22:05 +0200
- Subject: [RFA] dwarf2read.c: Use make_function_type instead of lookup_function_type
- Reply-to: gdb-patches at sources dot redhat dot com
Hi,
the below patch uses make_function_type instead of lookup_function_type
in read_subroutine_type. The reason is that it's important that `ftype'
is a new type structure for each function and so it shouldn't get reused
by other function types. The comment for lookup_function_type indicates
that it's made to do exactly that, reusing already existing function
types as they fit. That's not implemented so far, but it might happen
at one point, so I suggest to switch to make_function_type in
read_subroutine_type before something weird happens.
Ok to check in?
Corinna
* dwarf2read.c (read_subroutine_type): Call make_function_type
instead of lookup_function_type.
Index: dwarf2read.c
===================================================================
RCS file: /cvs/src/src/gdb/dwarf2read.c,v
retrieving revision 1.164
diff -u -p -r1.164 dwarf2read.c
--- dwarf2read.c 3 Oct 2004 16:16:01 -0000 1.164
+++ dwarf2read.c 5 Oct 2004 16:07:04 -0000
@@ -4413,7 +4413,7 @@ read_subroutine_type (struct die_info *d
return;
}
type = die_type (die, cu);
- ftype = lookup_function_type (type);
+ ftype = make_function_type (type, (struct type **) 0);
/* All functions in C++ and Java have prototypes. */
attr = dwarf2_attr (die, DW_AT_prototyped, cu);
--
Corinna Vinschen
Cygwin Project Co-Leader
Red Hat, Inc.