From: Joel Brobecker <brobecker@gnat.com>
To: Elena Zannoni <ezannoni@redhat.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [RFA] stabs: remember types that cross reference another type
Date: Fri, 05 Dec 2003 00:47:00 -0000 [thread overview]
Message-ID: <20031205004703.GK1652@gnat.com> (raw)
In-Reply-To: <16335.53518.757219.89681@localhost.redhat.com>
[-- Attachment #1: Type: text/plain, Size: 261 bytes --]
> yep
Great!
For the record, here is the patch I ended up committing.
2003-12-04 J. Brobecker <brobecker@gnat.com>
* stabsread.c (read_type): Save a reference to types that are defined
as cross references to other types.
Thanks,
--
Joel
[-- Attachment #2: stabsread.c.diff --]
[-- Type: text/plain, Size: 1106 bytes --]
Index: stabsread.c
===================================================================
RCS file: /cvs/src/src/gdb/stabsread.c,v
retrieving revision 1.68
diff -u -p -r1.68 stabsread.c
--- stabsread.c 15 Nov 2003 21:49:30 -0000 1.68
+++ stabsread.c 5 Dec 2003 00:31:35 -0000
@@ -1564,11 +1564,9 @@ again:
*pp = from + 1;
}
- /* Now check to see whether the type has already been
- declared. This was written for arrays of cross-referenced
- types before we had TYPE_CODE_TARGET_STUBBED, so I'm pretty
- sure it is not necessary anymore. But it might be a good
- idea, to save a little memory. */
+ /* If this type has already been declared, then reuse the same
+ type, rather than allocating a new one. This saves some
+ memory. */
for (ppt = file_symbols; ppt; ppt = ppt->next)
for (i = 0; i < ppt->nsyms; i++)
@@ -1582,6 +1580,8 @@ again:
{
obstack_free (&objfile->type_obstack, type_name);
type = SYMBOL_TYPE (sym);
+ if (typenums[0] != -1)
+ *dbx_lookup_type (typenums) = type;
return type;
}
}
prev parent reply other threads:[~2003-12-05 0:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-10-31 20:08 Joel Brobecker
2003-11-03 18:16 ` Daniel Jacobowitz
2003-11-03 22:59 ` Joel Brobecker
2003-12-04 5:20 ` Elena Zannoni
2003-12-05 0:22 ` Joel Brobecker
2003-12-05 0:27 ` Elena Zannoni
2003-12-05 0:47 ` Joel Brobecker [this message]
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=20031205004703.GK1652@gnat.com \
--to=brobecker@gnat.com \
--cc=ezannoni@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