Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Ken Werner <ken@linux.vnet.ibm.com>
To: gdb-patches@sourceware.org
Subject: Re: [patch] DW_AT_byte_size for array type entries
Date: Tue, 02 Nov 2010 08:23:00 -0000	[thread overview]
Message-ID: <201011020923.11875.ken@linux.vnet.ibm.com> (raw)
In-Reply-To: <201010192016.05535.ken@linux.vnet.ibm.com>

On Tuesday, October 19, 2010 8:16:05 pm Ken Werner wrote:
> On Tuesday, October 19, 2010 1:23:57 pm Ken Werner wrote:
> > Hi,
> > 
> > Section 5.4 of the DWARF standard allows to specify extra padding bytes
> > for array type entries by using the DW_AT_byte_size attribute. This is
> > used for example to specify the types for OpenCL 3-component vectors
> > whose size and alignment are those of 4-component vectors. Currently the
> > GDB does not understand this mechanism and the attached patch attempts
> > to fix this. It extends the DWARF reader (dwarf2read.c:read_array_type)
> > to respect the DW_AT_byte_size attribute and set the length of the array
> > accordingly. This breaks the code that assumes that the number of
> > elements of an array is simply the length of the array type divided by
> > the length of the element type. Therefore the patch queries the number
> > of array elements using the get_array_bounds function that has been
> > enhanced to only return the bounds if they are defined
> > (TYPE_ARRAY_[LOWER|UPPER]_BOUND_IS_UNDEFINED). In order to prevent the
> > inclusion of the valprint.h header the
> > get_array_bounds function has been moved from valprint.[c|h] to
> > gdbtypes.[c|h].
> > Tested on i686-*-linux-gnu with no regressions.
> 
> Hm, that patch lacks the chunk that changes the c_type_print_varspec_suffix
> function. Here is the full version.

Any objections/comments on that patch?

Thanks
Ken


  reply	other threads:[~2010-11-02  8:23 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-19 11:24 Ken Werner
2010-10-19 18:16 ` Ken Werner
2010-11-02  8:23   ` Ken Werner [this message]
2010-11-02 22:45   ` Tom Tromey
2010-11-03 14:23     ` Ken Werner
2010-11-03 19:09       ` Regression on gdb.ada/null_array.exp [Re: [patch] DW_AT_byte_size for array type entries] Jan Kratochvil
2010-11-03 21:16         ` Joel Brobecker
2010-11-03 23:22           ` [commit/Ada] fix warning when printing empty array Joel Brobecker
2010-11-03 23:24         ` Regression on gdb.ada/null_array.exp [Re: [patch] DW_AT_byte_size for array type entries] Joel Brobecker
2010-11-04  0:31           ` Jan Kratochvil
2010-11-04  1:57             ` Joel Brobecker
2010-11-04  3:26               ` Jan Kratochvil
2010-11-04 18:01                 ` Joel Brobecker
2010-11-04 18:10                   ` Jan Kratochvil
2010-11-04 18:23                     ` Joel Brobecker
2010-11-04 18:54                       ` Jan Kratochvil
2010-11-04 22:11                         ` Joel Brobecker
2010-12-13 20:03       ` [patch] DW_AT_byte_size for array type entries Ken Werner
2010-12-14  5:42         ` Joel Brobecker
2010-12-14 10:27           ` Ken Werner

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=201011020923.11875.ken@linux.vnet.ibm.com \
    --to=ken@linux.vnet.ibm.com \
    --cc=gdb-patches@sourceware.org \
    /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