<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <p><br>
    </p>
    <br>
    <div class="moz-cite-prefix">On 02/27/2017 08:04 PM, David Blaikie
      wrote:<br>
    </div>
    <blockquote
cite="mid:CAENS6EtTkHvGv3BeEH+HLWdN9jN7GYqXkpZW-huif_Oqhkw4YA@mail.gmail.com"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
      <div dir="ltr">Skipping these values doesn't seem to be correct -
        in the case of flag_present, I think the value is still rendered
        in the dump, is it not?</div>
    </blockquote>
    Do you mean that the value is somehow mentioned in .debug_info
    section? It is not.<br>
    <blockquote
cite="mid:CAENS6EtTkHvGv3BeEH+HLWdN9jN7GYqXkpZW-huif_Oqhkw4YA@mail.gmail.com"
      type="cite">
      <div dir="ltr"> I would expect the same for implicit_const values.
        (also, this needs test coverage either way)</div>
    </blockquote>
    Yes, you are correct. I will create tests when we decide what's
    right behavior here. <br>
    <br>
    I think skipping is correct here: we are dumping .debug_info data
    based on attributes stored in AbbrevDecl, this code was based on
    assumption that every attribute has representation in .debug_info
    section, that was before implicit_const form was introduced.<br>
    <blockquote
cite="mid:CAENS6EtTkHvGv3BeEH+HLWdN9jN7GYqXkpZW-huif_Oqhkw4YA@mail.gmail.com"
      type="cite"><br>
      <div class="gmail_quote">
        <div dir="ltr">On Sat, Feb 25, 2017 at 5:27 AM Victor Leschuk
          via llvm-commits <<a moz-do-not-send="true"
            href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a>>
          wrote:<br>
        </div>
        <blockquote class="gmail_quote" style="margin:0 0 0
          .8ex;border-left:1px #ccc solid;padding-left:1ex">Author:
          vleschuk<br class="gmail_msg">
          Date: Sat Feb 25 07:15:57 2017<br class="gmail_msg">
          New Revision: 296253<br class="gmail_msg">
          <br class="gmail_msg">
          URL: <a moz-do-not-send="true"
            href="http://llvm.org/viewvc/llvm-project?rev=296253&view=rev"
            rel="noreferrer" class="gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-project?rev=296253&view=rev</a><br
            class="gmail_msg">
          Log:<br class="gmail_msg">
          [DebugInfo] Skip implicit_const attributes when dumping
          .debug_info. NFC.<br class="gmail_msg">
          <br class="gmail_msg">
          When dumping .debug_info section we loop through all
          attributes mentioned in<br class="gmail_msg">
          .debug_abbrev section and dump values using
          DWARFFormValue::extractValue().<br class="gmail_msg">
          We need to skip implicit_const attributes here as their values
          are not<br class="gmail_msg">
          really located in .debug_info but directly in .debug_abbrev.
          This patch fixes<br class="gmail_msg">
          triggered assert() in DWARFFormValue::extractValue() caused by
          trying to<br class="gmail_msg">
          access implicit_const values from .debug_info.<br
            class="gmail_msg">
          <br class="gmail_msg">
          Modified:<br class="gmail_msg">
              llvm/trunk/lib/DebugInfo/DWARF/DWARFDie.cpp<br
            class="gmail_msg">
          <br class="gmail_msg">
          Modified: llvm/trunk/lib/DebugInfo/DWARF/DWARFDie.cpp<br
            class="gmail_msg">
          URL: <a moz-do-not-send="true"
href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/DWARF/DWARFDie.cpp?rev=296253&r1=296252&r2=296253&view=diff"
            rel="noreferrer" class="gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/DWARF/DWARFDie.cpp?rev=296253&r1=296252&r2=296253&view=diff</a><br
            class="gmail_msg">
==============================================================================<br
            class="gmail_msg">
          --- llvm/trunk/lib/DebugInfo/DWARF/DWARFDie.cpp (original)<br
            class="gmail_msg">
          +++ llvm/trunk/lib/DebugInfo/DWARF/DWARFDie.cpp Sat Feb 25
          07:15:57 2017<br class="gmail_msg">
          @@ -329,6 +329,12 @@ void DWARFDie::dump(raw_ostream &OS,
          uns<br class="gmail_msg">
          <br class="gmail_msg">
                   // Dump all data in the DIE for the attributes.<br
            class="gmail_msg">
                   for (const auto &AttrSpec :
          AbbrevDecl->attributes()) {<br class="gmail_msg">
          +          if (AttrSpec.Form == DW_FORM_implicit_const) {<br
            class="gmail_msg">
          +            // We are dumping .debug_info section ,<br
            class="gmail_msg">
          +            // implicit_const attribute values are not really
          stored here,<br class="gmail_msg">
          +            // but in .debug_abbrev section. So we just skip
          such attrs.<br class="gmail_msg">
          +            continue;<br class="gmail_msg">
          +          }<br class="gmail_msg">
                     dumpAttribute(OS, *this, &offset,
          AttrSpec.Attr, AttrSpec.Form,<br class="gmail_msg">
                                   Indent);<br class="gmail_msg">
                   }<br class="gmail_msg">
          <br class="gmail_msg">
          <br class="gmail_msg">
          _______________________________________________<br
            class="gmail_msg">
          llvm-commits mailing list<br class="gmail_msg">
          <a moz-do-not-send="true"
            href="mailto:llvm-commits@lists.llvm.org" class="gmail_msg"
            target="_blank">llvm-commits@lists.llvm.org</a><br
            class="gmail_msg">
          <a moz-do-not-send="true"
            href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits"
            rel="noreferrer" class="gmail_msg" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br
            class="gmail_msg">
        </blockquote>
      </div>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Best Regards,
Victor</pre>
  </body>
</html>