This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Fix for Minor dbxout.c changes
- To: gcc-patches at gcc dot gnu dot org, kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- Subject: Fix for Minor dbxout.c changes
- From: Geoff Keating <geoffk at geoffk dot org>
- Date: 25 May 2001 11:34:27 -0700
- References: <10105182051.AA05548@vlsi1.ultra.nyu.edu>
kenner@vlsi1.ultra.nyu.edu (Richard Kenner) writes:
> This mostly fixes a bug where we generate tags on variable-length
> record that causes objdump to crash, but also does some cleanup
> in using host_integerp instead of checking for INTEGER_CST.
>
> Fri May 18 07:26:34 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
>
> * dbxout.c (dbxout_type): Use host_integerp and fix typo in testing
> for INTEGER_TYPE.
> (dbxout_symbol, case TYPE_DECL): Don't generate tag for records of
> variable size.
This fixes a bug in the above patch; it was causing tags to be
generated only for variable-length records, which had surprisingly
little effect on the GDB testsuite. Plus, a gratuitous whitespace
change.
It is being tested on powerpc-eabisim; I'll commit when the test run
completes and perhaps allow a little while for comments.
--
- Geoffrey Keating <geoffk@geoffk.org>
--------------------
2001-05-24 Geoff Keating <geoffk@redhat.com>
* dbxout.c (dbxout_symbol): Invert previous patch, which was
outputting a tag only for variable-size records.
Index: dbxout.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/dbxout.c,v
retrieving revision 1.85
diff -p -u -u -p -r1.85 dbxout.c
--- dbxout.c 2001/05/23 17:37:50 1.85
+++ dbxout.c 2001/05/24 08:24:55
@@ -1707,7 +1707,7 @@ dbxout_symbol (decl, local)
/* Do not generate a tag for records of variable size,
since this type can not be properly described in the
DBX format, and it confuses some tools such as objdump. */
- && ! host_integerp (TYPE_SIZE (type), 1))
+ && host_integerp (TYPE_SIZE (type), 1))
{
tree name = TYPE_NAME (type);
if (TREE_CODE (name) == TYPE_DECL)
@@ -1758,7 +1758,7 @@ dbxout_symbol (decl, local)
/* Don't output a tag if this is an incomplete type. This prevents
the sun4 Sun OS 4.x dbx from crashing. */
-
+
if (tag_needed && TYPE_NAME (type) != 0
&& (TREE_CODE (TYPE_NAME (type)) == IDENTIFIER_NODE
|| (DECL_NAME (TYPE_NAME (type)) != 0))
--------------------