From: Kevin Buettner <kevinb@redhat.com>
To: Tom Tromey <tromey@adacore.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] Handle base type without DW_AT_byte_size
Date: Tue, 29 Apr 2025 10:09:00 -0700 [thread overview]
Message-ID: <20250429100900.23ff8e0e@f41-zbm-amd> (raw)
In-Reply-To: <20250425141813.826220-1-tromey@adacore.com>
On Fri, 25 Apr 2025 08:18:13 -0600
Tom Tromey <tromey@adacore.com> wrote:
> DWARF says that a base type can have DW_AT_bit_size, without
> DW_AT_byte_size. However, gdb does not correctly handle this; in
> fact, it crashes, as pointed out in this LLVM merge request:
>
> https://github.com/llvm/llvm-project/pull/137123
>
> This patch reworks the base type size logic a bit to handle this
> situation.
> ---
> gdb/dwarf2/read.c | 67
> ++++++++++++++++------------ gdb/testsuite/gdb.dwarf2/intbits.c |
> 3 ++ gdb/testsuite/gdb.dwarf2/intbits.exp | 19 +++++++-
> 3 files changed, 59 insertions(+), 30 deletions(-)
I've verified that the new tests fail with an unpatched GDB and
pass with your patch.
Also, the patch itself LGTM.
Tested-by: Kevin Buettner <kevinb@redhat.com>
Approved-by: Kevin Buettner <kevinb@redhat.com>
prev parent reply other threads:[~2025-04-29 17:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-25 14:18 Tom Tromey
2025-04-29 17:09 ` Kevin Buettner [this message]
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=20250429100900.23ff8e0e@f41-zbm-amd \
--to=kevinb@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=tromey@adacore.com \
/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