This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] [gdb/testsuite] include a use of the definition of a type to cause clang to emit debug info
- From: Pedro Alves <palves at redhat dot com>
- To: Joel Brobecker <brobecker at adacore dot com>
- Cc: David Blaikie <dblaikie at gmail dot com>, Eric Christopher <echristo at gmail dot com>, gdb-patches <gdb-patches at sourceware dot org>
- Date: Thu, 24 Apr 2014 00:46:27 +0100
- Subject: Re: [patch] [gdb/testsuite] include a use of the definition of a type to cause clang to emit debug info
- Authentication-results: sourceware.org; auth=none
- References: <CAENS6EvK8+AUQrj_0q2vAz0JH-5Pt0Z=cRWtW--4pyyUTP3WfQ at mail dot gmail dot com> <20140414131050 dot GR4250 at adacore dot com> <CALehDX48=_WQgGgBhogVzM=bQWTXd07NyKUizbdsyNFA9yX+bg at mail dot gmail dot com> <20140414181623 dot GS4250 at adacore dot com> <CAENS6EvbdeeSWDQH6Mxs_OEV15A=AKhkN8uU+VYR+X+DY7HGrA at mail dot gmail dot com> <20140414224702 dot GT4250 at adacore dot com>
On 04/14/2014 11:47 PM, Joel Brobecker wrote:
> My position, in this situation, is that your change is actually
> not completely neutral: Even if this was not the initial intention
> when the test was written, as it is now, it allows us to verify
> that the compiler produces the full debugging information for
> an enum type even in the case where the type is only referenced
> through a pointer. By adding a global variable, we lose that part,
> potentially allowing GCC to regress (from a GDB user's perspective).
>
> If the type was opaque, I would have had no objection. But in this
> case, I try to put myself in the shoes of a user debugging that code,
> and it would seem reasonable to be able to dereference "e".
I think it'd be good if we had a test that exercises that expectation
explicitly.
--
Pedro Alves