<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On 04 Sep 2014, at 14:54, Frédéric Riss <<a href="mailto:friss@apple.com" class="">friss@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">I sent out a new version using phabricator. I’m not sure it has reached the list…<div class=""><br class=""></div></div></div></blockquote><div><br class=""></div><div>I’m pretty sure it didn’t hit the list. Here it is:</div><div><br class=""></div><div><a href="http://reviews.llvm.org/D5187" class="">http://reviews.llvm.org/D5187</a></div><div><br class=""></div><div>Fred</div><br class=""><blockquote type="cite" class=""><div class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Regarding the ones that we don’t emit, I don’t think they matter for us today:</div><div class=""> - DW_AT_decimal_sign is there to describe non-standard decimal types. I don’t think we have support for that?</div><div class=""> - DW_AT_endianity permits a per-variable endianness setting. Again, no support for that I think.</div><div class=""> - DW_AT_identifier_case sets the case-senstivity for the unit. Are there cases where the debugger won’t know how to infer that from the language?</div><div class=""> - DW_AT_ordering describes multi-dimensional array layout. Maybe this could be useful for Fortran, I’m not sure.</div><div class=""> - DW_AT_discr_value is there for the native support of Variant types.</div><div class=""> - DW_AT_calling_convention might be kinda interesting to tag functions that are compiled with a non-standard calling convention. This way the debugger would stay away from those.</div><div class=""><br class=""></div><div class="">Fred</div><div class=""><br class=""></div><div class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On 03 Sep 2014, at 23:01, David Blaikie <<a href="mailto:dblaikie@gmail.com" class="">dblaikie@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Such a function might even go in Dwarf.h/Dwarf.cpp<br class=""><br class="">(& do we have any (/should we add some) for these various attributes? The test case updates touch on a few of these attributes, but not all of them)</div>
<div class="gmail_extra"><br class=""><br class=""><div class="gmail_quote">On Wed, Sep 3, 2014 at 1:56 PM, David Blaikie <span dir="ltr" class=""><<a href="mailto:dblaikie@gmail.com" target="_blank" class="">dblaikie@gmail.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr" class="">Perhaps we could avoid the goto & offload some of the repetition from the macro like this:<br class=""><br class="">const char *Name = nullptr;<br class=""><br class="">switch (attr) {<br class="">#define ENUM_TO_STRING_ATTRIBUTE(NAME)<br class="">  if (Optional<uint64_t> Val = formValue.getAsUnsignedConstant())<br class="">

    Name = NAME##String(*Val);<br class="">  break;<br class=""><br class="">  case ...<br class="">    ...<br class="">  // no default here<br class="">}<br class=""><br class="">if (Name)<br class="">  OS << Name;<br class="">else<br class="">  formValue.dump(OS, u);<br class=""><br class="">Or even refactor the switch into a function, then you can just have this in the macro:<br class="">

<br class="">  if (Optional<uint64_t> Val = ...)<br class="">    return *Val;<br class=""><br class="">and a "return nullptr" at the end.</div><div class="gmail_extra"><br class=""><br class=""><div class="gmail_quote"><div class="">On Wed, Sep 3, 2014 at 1:38 PM, Frédéric Riss <span dir="ltr" class=""><<a href="mailto:friss@apple.com" target="_blank" class="">friss@apple.com</a>></span> wrote:<br class="">

</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class=""><div style="word-wrap:break-word" class="">Here is a new version rebased on the reviewed FormValue accessor patch.<div class="">
<br class=""></div>
<div class="">OK?<br class=""><div class=""></div></div></div><br class=""></div><div class=""><div class="h5"><div style="word-wrap:break-word" class=""><div class=""><div class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On 03 Sep 2014, at 21:12, Adrian Prantl <<a href="mailto:aprantl@apple.com" target="_blank" class="">aprantl@apple.com</a>> wrote:</div>

<br class=""><div class=""><blockquote type="cite" style="font-family:Menlo-Regular;font-size:11px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" class="">

<br class="">On Sep 3, 2014, at 12:03 PM, Frédéric Riss <<a href="mailto:friss@apple.com" target="_blank" class="">friss@apple.com</a>> wrote:<br class=""><br class=""><br class=""><blockquote type="cite" class="">On 03 Sep 2014, at 20:57, Adrian Prantl <<a href="mailto:aprantl@apple.com" target="_blank" class="">aprantl@apple.com</a>> wrote:<br class="">

<br class=""><br class=""><blockquote type="cite" class="">On Sep 3, 2014, at 11:52 AM, Frédéric Riss <<a href="mailto:friss@apple.com" target="_blank" class="">friss@apple.com</a>> wrote:<br class=""><br class="">This patch introduces symbolic dump of all the DWARF standard values (defined in Dwarf.h). It requires the previous DWARFFormValue accessor patch. The fixed accessibility test shows that it’s much easier to check that the test is actually correct, rather than having to cross-check with the enumerator value.<br class="">

<br class="">OK?<br class=""><dwarfdump-SymbolicAttributes.diff><br class=""></blockquote><br class="">If you look at lib/Support/Dwarf.cpp, there is already a similar switch table for converting all the attribute names. We should probably only have one such implementation.<br class="">

</blockquote><br class="">Really, which one? I see tables converting from various enum to const char * value, but my switch associates DW_AT_* attributes with the corresponding attribute enumeration. This patch uses all the switch functions in Dwarf.cpp, but AFAICS it doesn’t duplicate anything. But maybe I’m looking at the wrong place?<br class="">

</blockquote><br style="font-family:Menlo-Regular;font-size:11px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" class="">

<span style="font-family:Menlo-Regular;font-size:11px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important" class="">My apologies, you are correct! That email went out too fast.</span><br style="font-family:Menlo-Regular;font-size:11px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" class="">

<br style="font-family:Menlo-Regular;font-size:11px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" class="">

<span style="font-family:Menlo-Regular;font-size:11px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important" class="">-- adrian</span></div>

</blockquote></div><br class=""></div></div></div><br class=""></div></div></blockquote></div><br class=""></div>
</blockquote></div><br class=""></div>
</div></blockquote></div><br class=""></div></div>_______________________________________________<br class="">llvm-commits mailing list<br class=""><a href="mailto:llvm-commits@cs.uiuc.edu" class="">llvm-commits@cs.uiuc.edu</a><br class="">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits<br class=""></div></blockquote></div><br class=""></body></html>