Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: John Steele Scott <toojays@toojays.net>
Cc: gdb-patches@sourceware.org
Subject: Re: [patch] PR symtab/13277: Resolving opaque structures in ICC generated binaries.
Date: Wed, 19 Oct 2011 09:01:00 -0000	[thread overview]
Message-ID: <20111019084011.GA9326@host1.jankratochvil.net> (raw)
In-Reply-To: <4E9A6F3C.6010400@toojays.net>

On Sun, 16 Oct 2011 07:44:28 +0200, John Steele Scott wrote:
> --- a/gdb/dwarf2read.c
> +++ b/gdb/dwarf2read.c
> @@ -7636,6 +7636,11 @@ read_structure_type (struct die_info *die, struct dwarf2_cu *cu)
>      /* RealView does not output the required DW_AT_declaration
>         on incomplete types.  */
>      TYPE_STUB (type) = 1;
> +  else if (attr != NULL&&  die->child == NULL&&  TYPE_LENGTH (type) == 0
> +	&&  producer_is_icc (cu->producer))

the formatting should be:
  else if (attr != NULL && die->child == NULL && TYPE_LENGTH (type) == 0
	   && producer_is_icc (cu->producer))

> +    /* ICC does not output the required DW_AT_declaration
> +       on incomplete types, but gives them a size of zero.  */
> +    TYPE_STUB (type) = 1;
> 
>    /* We need to add the type field to the die immediately so we don't
>       infinitely recurse when dealing with pointers to the structure
> diff --git a/gdb/symtab.c b/gdb/symtab.c
> index 9447bd9..ffaa035 100644
> --- a/gdb/symtab.c
> +++ b/gdb/symtab.c

/* Return non-zero if PRODUCER is Intel C Compiler.  */

> +int
> +producer_is_icc (const char *producer)

This function should have some comment.  And it should be static in
dwarf2read.c itself as it is not used from any other source file now.

OK with those changes.


One could make a testcase by hand based for example on
gdb.dwarf2/dw2-struct-optimized-out.* .  I am not much fond of the `gcc -S'
output testcases.  But neither is required for a check-in.


Thanks,
Jan


  reply	other threads:[~2011-10-19  8:40 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-16  8:03 John Steele Scott
2011-10-19  9:01 ` Jan Kratochvil [this message]
2011-10-19 13:54   ` Jan Kratochvil
2011-10-23 18:29     ` John Steele Scott
2011-10-24  0:13       ` Joel Brobecker
2011-10-27 19:57       ` Tom Tromey
2011-10-23 10:26   ` John Steele Scott
2011-10-26 23:09     ` Jan Kratochvil
2011-11-13 11:38       ` [patch] PR symtab/13277: Resolving opaque structures in ICC generated binaries. (testcase) John Steele Scott
2011-11-15 17:04         ` Tom Tromey
2012-05-05  2:40           ` John Steele Scott
2012-05-05 15:16             ` Joel Brobecker
2012-05-05 15:36               ` Jan Kratochvil
2012-05-12  9:00               ` John Steele Scott
2012-05-12 18:38                 ` Jan Kratochvil
2012-05-12 19:09                   ` Joel Brobecker
2012-05-21 12:05                   ` John Steele Scott
2012-05-21 12:08                     ` John Steele Scott
2012-05-24 23:06                       ` [commit] " Jan Kratochvil
2012-05-21 12:17                     ` Jan Kratochvil
2011-11-13 12:13       ` [patch] PR symtab/13277: Resolving opaque structures in ICC generated binaries John Steele Scott
2011-11-15 17:19         ` Tom Tromey
2011-11-15 23:58           ` Jan Kratochvil
2012-05-05  2:32           ` John Steele Scott
2012-05-12 18:37             ` Jan Kratochvil
2012-05-14 13:55               ` John Steele Scott
     [not found]                 ` <20120518144642.GA19690@host2.jankratochvil.net>
2012-05-20 12:34                   ` John Steele Scott
     [not found]                     ` <20120520130919.GA6990@host2.jankratochvil.net>
2012-05-20 13:17                       ` Jan Kratochvil
2012-05-20 13:44                         ` John Steele Scott
2012-05-23 23:29                         ` John Steele Scott
2012-05-24 15:16                           ` Pedro Alves
2012-05-24 22:13                           ` [commit] " Jan Kratochvil
2012-05-24 23:05                             ` John Steele Scott
2012-05-24 22:16                         ` [commit TYPE_OPAQUE] " Jan Kratochvil
2012-05-21  0:12                     ` Doug Evans
2012-05-20 13:17                   ` Jan Kratochvil
  -- strict thread matches above, loose matches on Subject: below --
2011-10-16  7:58 John Steele Scott

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=20111019084011.GA9326@host1.jankratochvil.net \
    --to=jan.kratochvil@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=toojays@toojays.net \
    /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