This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: COFF debugging info bug
- To: Laurynas Biveinis <lauras at softhome dot net>
- Subject: Re: COFF debugging info bug
- From: Richard Henderson <rth at redhat dot com>
- Date: Mon, 29 Jan 2001 17:28:40 -0800
- Cc: gcc at gcc dot gnu dot org, gcc-bugs at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- References: <3A228BD7.12CCFD10@softhome.net> <3A22A877.1BF345B0@softhome.net>
On Mon, Nov 27, 2000 at 07:31:19PM +0100, Laurynas Biveinis wrote:
> * sdbout.c (sdbout_field_types, sdbout_one_type): Skip
> zero-sized data types.
Applied.
As an aside, the use of host_integerp within sdbout_field_types
was incorrect. The actual patch applied follows.
r~
Index: sdbout.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/sdbout.c,v
retrieving revision 1.38
diff -u -p -r1.38 sdbout.c
--- sdbout.c 2001/01/28 01:50:06 1.38
+++ sdbout.c 2001/01/30 01:23:03
@@ -1056,9 +1056,10 @@ sdbout_field_types (type)
/* This condition should match the one for emitting the actual members
below. */
if (TREE_CODE (tail) == FIELD_DECL
- && DECL_NAME (tail) != 0
- && ! host_integerp (DECL_SIZE (tail), 1)
- && ! host_integerp (bit_position (tail), 0))
+ && DECL_NAME (tail)
+ && DECL_SIZE (tail)
+ && host_integerp (DECL_SIZE (tail), 1)
+ && host_integerp (bit_position (tail), 0))
{
if (POINTER_TYPE_P (TREE_TYPE (tail)))
sdbout_one_type (TREE_TYPE (TREE_TYPE (tail)));
@@ -1237,7 +1238,8 @@ sdbout_one_type (type)
Also omit fields with variable size or position.
Also omit non FIELD_DECL nodes that GNU C++ may put here. */
if (TREE_CODE (tem) == FIELD_DECL
- && DECL_NAME (tem) != 0
+ && DECL_NAME (tem)
+ && DECL_SIZE (tem)
&& host_integerp (DECL_SIZE (tem), 1)
&& host_integerp (bit_position (tem), 0))
{