<div dir="ltr">Fixed in r360458</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, May 10, 2019 at 7:40 AM David Blaikie <<a href="mailto:dblaikie@gmail.com">dblaikie@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Yep - I think it should be sufficient to check if the type has a name<br>
when making this decision. (though this might make internal linkage<br>
types get weird/dropped if they're referenced from external linkage<br>
types - which is bogus (well... almost bogus, such an external linkage<br>
type can't be defined more than once, but if it's only defined once I<br>
think that's technically correct))<br>
<br>
On Fri, May 10, 2019 at 5:35 AM Pavel Labath <<a href="mailto:pavel@labath.sk" target="_blank">pavel@labath.sk</a>> wrote:<br>
><br>
> Yea, it looks like this patch makes clang too aggressive in removing the<br>
> information from the type unit. At least, I don't see a way how to<br>
> reconstruct the fact that type "strarr" is "char[32]" as the DW_AT_type<br>
> leads to a dead end.<br>
><br>
> Judging by the commit message, it looks like we end up considering<br>
> "char[32]" to be a non-unit user-defined type and so we drop it. The<br>
> non-unit part is definitely true, but maybe this type should not be<br>
> considered "user-defined"?<br>
><br>
> On 09/05/2019 22:26, Jan Kratochvil wrote:<br>
> > On Wed, 24 Apr 2019 20:09:44 +0200, David Blaikie via llvm-commits wrote:<br>
> >> Author: dblaikie<br>
> >> Date: Wed Apr 24 11:09:44 2019<br>
> >> New Revision: 359122<br>
> >><br>
> >> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=359122&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=359122&view=rev</a><br>
> >> Log:<br>
> >> DebugInfo: Emit only declarations (not whole definitions) of non-unit user defined types into type units<br>
> ><br>
> > 832c7d9f36bcb7a99113999439c82390b31919bd is the first bad commit<br>
> > commit 832c7d9f36bcb7a99113999439c82390b31919bd<br>
> > Author: David Blaikie <<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>><br>
> > Date:   Wed Apr 24 18:09:44 2019 +0000<br>
> >      DebugInfo: Emit only declarations (not whole definitions) of non-unit user defined types into type units<br>
> ><br>
> > -fdebug-types-section no longer produces needed type definitions.<br>
> ><br>
> > -fdebug-types-section support for LLDB I am going to submit/update hopefully<br>
> > tomorrow:<br>
> >       06/06: Implement .debug_types<br>
> >       <a href="https://reviews.llvm.org/D61505" rel="noreferrer" target="_blank">https://reviews.llvm.org/D61505</a><br>
> ><br>
> > ../llvm-monorepo-clangassert/bin/clang++ -o 1 -g -fdebug-types-section lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-smart-array/main.cpp;gdb -batch ./1 -ex 'b 59' -ex r -ex 'p other'<br>
> ><br>
> > FAIL = 832c7d9f36bcb7a99113999439c82390b31919bd<br>
> > PASS = 832c7d9f36bcb7a99113999439c82390b31919bd^<br>
> ><br>
> > FAIL: $1 = {strarr = 0x7fffffffcba0, strptr = 0x416e70 "Nested Hello world!", intarr = 0x7fffffffcbc8, flarr = 0x7fffffffcbdc}<br>
> > PASS: $1 = {strarr = "Nested Hello world!\000\377\377\377\377`\\\305\367\377\177\000", strptr = 0x416e70 "Nested Hello world!", intarr = {9, 8, 7, 6, 5}, flarr = {25.5, 25.25, 25.125, 26.75, 27.375, 27.5, 26.125}}<br>
> ><br>
> > FAIL:<br>
> > Contents of the .debug_types section:<br>
> >   <2><af>: Abbrev Number: 3 (DW_TAG_member)<br>
> >      <b0>   DW_AT_name        : (indirect string, offset: 0x245): strarr<br>
> >      <b4>   DW_AT_type        : <0xed><br>
> >      <b8>   DW_AT_decl_file   : 6<br>
> >      <b9>   DW_AT_decl_line   : 21<br>
> >      <ba>   DW_AT_data_member_location: 0<br>
> >   <1><ed>: Abbrev Number: 8 (DW_TAG_array_type)<br>
> >      <ee>   DW_AT_declaration : 1<br>
> ><br>
> > PASS:<br>
> > Contents of the .debug_types section:<br>
> >   <2><af>: Abbrev Number: 3 (DW_TAG_member)<br>
> >      <b0>   DW_AT_name        : (indirect string, offset: 0x245): strarr<br>
> >      <b4>   DW_AT_type        : <0xed><br>
> >      <b8>   DW_AT_decl_file   : 6<br>
> >      <b9>   DW_AT_decl_line   : 21<br>
> >      <ba>   DW_AT_data_member_location: 0<br>
> >   <1><ed>: Abbrev Number: 8 (DW_TAG_array_type)<br>
> >      <ee>   DW_AT_type        : <0xf9><br>
> >   <2><f2>: Abbrev Number: 9 (DW_TAG_subrange_type)<br>
> >      <f3>   DW_AT_type        : <0x100><br>
> >      <f7>   DW_AT_count       : 32<br>
> >   <2><f8>: Abbrev Number: 0<br>
> >   <1><f9>: Abbrev Number: 4 (DW_TAG_base_type)<br>
> >      <fa>   DW_AT_name        : (indirect string, offset: 0xf5): char<br>
> >      <fe>   DW_AT_encoding    : 6        (signed char)<br>
> >      <ff>   DW_AT_byte_size   : 1<br>
> >   <1><100>: Abbrev Number: 10 (DW_TAG_base_type)<br>
> >      <101>   DW_AT_name        : (indirect string, offset: 0x24c): __ARRAY_SIZE_TYPE__<br>
> >      <105>   DW_AT_byte_size   : 8<br>
> >      <106>   DW_AT_encoding    : 7       (unsigned)<br>
> ><br>
> ><br>
> > Regards,<br>
> > Jan<br>
> ><br>
><br>
</blockquote></div>