Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [RFA] dwarf2read.c: Use make_function_type instead of lookup_function_type
@ 2004-10-05 16:21 Corinna Vinschen
  2004-10-05 16:41 ` Jim Blandy
  0 siblings, 1 reply; 3+ messages in thread
From: Corinna Vinschen @ 2004-10-05 16:21 UTC (permalink / raw)
  To: gdb-patches

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.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-10-06  8:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-05 16:21 [RFA] dwarf2read.c: Use make_function_type instead of lookup_function_type Corinna Vinschen
2004-10-05 16:41 ` Jim Blandy
2004-10-06  8:46   ` Corinna Vinschen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox