From: Gary Benson via Gdb-patches <gdb-patches@sourceware.org>
To: Tom de Vries <tdevries@suse.de>
Cc: Tom Tromey <tom@tromey.com>,
Gary Benson via Gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH][gdb/symtab] Fix gdb.base/vla-optimized-out.exp with clang
Date: Thu, 26 Nov 2020 10:10:23 +0000 [thread overview]
Message-ID: <20201126101023.GA12999@blade.nx> (raw)
In-Reply-To: <47a57380-6fe8-53b6-cde9-98dc04f986dc@suse.de>
Tom de Vries wrote:
> On 11/25/20 4:25 PM, Gary Benson wrote:
> > Gary Benson wrote:
> > > Thank you for picking this up Tom (de Vries). Your patch looks good,
> > > however I wanted to point out that the location expressions Clang
> > > generates for gdb.base/vla-ptr.exp don't end with DW_OP_stack_value:
> > >
> > > < 2><0x000000a3> DW_TAG_variable
> > > DW_AT_location len 0x0002: 9168: DW_OP_fbreg -24
> > > DW_AT_name __vla_expr0
> > > DW_AT_type <0x00000118>
> > > DW_AT_artificial yes(1)
> > > < 2><0x000000af> DW_TAG_variable
> > > DW_AT_location len 0x0002: 9160: DW_OP_fbreg -32
> > > DW_AT_name __vla_expr1
> > > DW_AT_type <0x00000118>
> > > DW_AT_artificial yes(1)
> > >
> > > It wasn't obvious to me how GDB with your patch would handle these.
> > > Did you check your patch using that test?
>
> Yes.
>
> > I forgot to add, that I did, and the final test failed with my setup:
> >
> > gdb.base/vla-ptr.exp
> > ...
> > print td_vla
> > GCC compiled: $6 = {4, 5, 6, 7, 8}
> > Clang-12 compiled: $6 = 0x7fffffffc0d0
> >
> > But! This is potentially a different issue. I don't think that test
> > accesses the array's size, and I've definitely seen typedef-related
> > failures with Clang compared with GCC.
> >
> > (I don't need you to debug this for me, I'm just making sure you're
> > aware!)
>
> Yes, I've seen this, I've filed a clang PR (
> https://bugs.llvm.org/show_bug.cgi?id=48247 ), then committed an xfail
> in gdb (
> https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=da39d3ba57639b715dea7ce68b6a4a3d70dfcb03
> ).
Amazing, thank you!
Cheers,
Gary
--
Gary Benson - he / him / his
Principal Software Engineer, Red Hat
next prev parent reply other threads:[~2020-11-26 10:10 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-16 17:17 [PATCH] KFAIL variable-length array tests which fail with Clang Gary Benson via Gdb-patches
2020-11-18 16:14 ` Tom Tromey
2020-11-19 22:53 ` Tom de Vries
2020-11-20 15:15 ` [PATCH][gdb/symtab] Fix gdb.base/vla-optimized-out.exp with clang Tom de Vries
2020-11-21 17:16 ` [gdb/testsuite] Add clang xfail in gdb.base/vla-ptr.exp Tom de Vries
2020-11-20 15:50 ` [PATCH] KFAIL variable-length array tests which fail with Clang Tom Tromey
2020-11-20 16:30 ` Tom de Vries
2020-11-20 16:51 ` Tom Tromey
2020-11-23 10:34 ` [PATCH][gdb/symtab] Fix gdb.base/vla-optimized-out.exp with clang Tom de Vries
2020-11-25 14:50 ` Gary Benson via Gdb-patches
2020-11-25 15:25 ` Gary Benson via Gdb-patches
2020-11-25 20:05 ` Tom de Vries
2020-11-26 10:10 ` Gary Benson via Gdb-patches [this message]
2020-11-30 12:51 ` [committed][PATCH][gdb/symtab] " Tom de Vries
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=20201126101023.GA12999@blade.nx \
--to=gdb-patches@sourceware.org \
--cc=gbenson@redhat.com \
--cc=tdevries@suse.de \
--cc=tom@tromey.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