public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug symtab/25470] Assertion hit in maybe_negate_by_bytes
Date: Wed, 23 Sep 2020 15:51:02 +0000	[thread overview]
Message-ID: <bug-25470-4717-fzSKNz7wb1@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-25470-4717@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=25470

--- Comment #12 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Tom Tromey <tromey@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=20a5fcbd5b28cca88511ac5a9ad5e54251e8fa6d

commit 20a5fcbd5b28cca88511ac5a9ad5e54251e8fa6d
Author: Tom Tromey <tom@tromey.com>
Date:   Wed Sep 23 09:39:24 2020 -0600

    Handle bit offset and bit size in base types

    PR symtab/25470 points out that the Zig programming language allows
    integers of various bit sizes (including zero), not just sizes that
    are a multiple of 8.

    This is supported in DWARF by applying both a byte size and a
    DW_AT_bit_size.

    This patch adds support for this feature to integer and boolean types.
    Other base types are not handled -- for floating-point types, this
    didn't seem to make sense, and for character types I didn't see much
    need.  (These can be added later if desired.)

    I've also added support for DW_AT_data_bit_offset at the same time.  I
    don't know whether the Zig compiler requires this, but it was
    described in the same section in the DWARF standard and was easy to
    add.

    A new test case is supplied, using the DWARF assembler.

    gdb/ChangeLog
    2020-09-23  Tom Tromey  <tom@tromey.com>

            PR symtab/25470:
            * value.c (unpack_long, pack_long, pack_unsigned_long): Handle bit
            offset and bit size.
            * printcmd.c (print_scalar_formatted): Handle zero-length
            integer.
            (print_scalar_formatted): Use bit_size_differs_p.
            * gdbtypes.h (enum type_specific_kind) <TYPE_SPECIFIC_INT>: New
            constant.
            (union type_specific): <int_stuff>: New member.
            (struct type) <bit_size_differs_p, bit_size, bit_offset>: New
            methods.
            * gdbtypes.c (init_integer_type, init_boolean_type): Initialize
            TYPE_SPECIFIC_FIELD.
            (recursive_dump_type, copy_type_recursive): Update.
            * dwarf2/read.c (read_base_type): Handle DW_AT_bit_size and
            DW_AT_data_bit_offset.

    gdb/testsuite/ChangeLog
    2020-09-23  Tom Tromey  <tom@tromey.com>

            * gdb.dwarf2/intbits.exp: New file.
            * gdb.dwarf2/intbits.c: New file.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

  parent reply	other threads:[~2020-09-23 15:51 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-25470-4717@http.sourceware.org/bugzilla/>
2020-08-09 21:11 ` [Bug varobj/25470] " tromey at sourceware dot org
2020-08-14  7:22 ` tromey at sourceware dot org
2020-08-17  1:54 ` [Bug symtab/25470] " tromey at sourceware dot org
2020-08-17  2:11 ` tromey at sourceware dot org
2020-09-23 15:51 ` cvs-commit at gcc dot gnu.org [this message]
2020-09-23 15:52 ` tromey at sourceware dot org
2020-10-08 17:54 ` tromey at sourceware dot org

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=bug-25470-4717-fzSKNz7wb1@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).