Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Corinna Vinschen <vinschen@redhat.com>
To: gdb-patches@sources.redhat.com
Subject: [RFA] dwarf2read.c: Use make_function_type instead of lookup_function_type
Date: Tue, 05 Oct 2004 16:21:00 -0000	[thread overview]
Message-ID: <20041005162205.GA31478@cygbert.vinschen.de> (raw)

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.


             reply	other threads:[~2004-10-05 16:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-05 16:21 Corinna Vinschen [this message]
2004-10-05 16:41 ` Jim Blandy
2004-10-06  8:46   ` Corinna Vinschen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20041005162205.GA31478@cygbert.vinschen.de \
    --to=vinschen@redhat.com \
    --cc=gdb-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox