This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 2/2] PR debug/63240 Add DWARF representation for C++11 defaulted member function.

On Fri, 2014-10-03 at 11:41 -0700, Cary Coutant wrote:
> > O. Then I was indeed wrong and defaulted does not impact ABI at all.
> > At least that is one worry less for the abi checkers :)
> As Siva mentioned, it does in fact impact the ABI. A class with a
> non-trivial destructor is not a POD, and affects the calling
> convention, so the debugger needs to know the difference. C++ ABI
> reference here:
> I've submitted a DWARF proposal to document the use of the
> DW_AT_artificial attribute on a default copy constructor or
> destructor.

Thanks for that reference. I was just stepping through gdb's
gdbarch_return_in_first_hidden_param_p to understand why Siva's example
did indeed seem to go wrong under GDB. That code is a little hairy with
all the arch specific indirections, so I am happy I can stop now :)

I can adjust my patch so that it does mark the declaration with
But maybe that is probably better done as a separate patch.

Or does it make sense to mark all defaulted special function members as
artificial instead of having a separate attribute for it? The (small)
advantage of having a separate attribute is that the consumer knows
whether it was explicitly defaulted.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]