<div dir="ltr">Looks like you've got test coverage for the parsing code directly (with the asm file) - so I'd probably split it anyway, since it's pretty much "free" to do - committing the parsing/dumping code first, then committing the LLVM generation code.<br><br>Does this change modify the behavior of the existing str_off.dwo support? (I don't know if it ended up being standardized any differently from what was initially implemented in LLVM)<br><br>If so, it may need to be conditionalized on the requested dwarf version (ie: emit the current in-tree format under DWARF4, the new format when the user asks for DWARF5)?<br><br>- Dave<br><br><div class="gmail_quote"><div dir="ltr">On Thu, Apr 27, 2017 at 3:01 PM Wolfgang Pieb via Phabricator <<a href="mailto:reviews@reviews.llvm.org">reviews@reviews.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">wolfgangp created this revision.<br>
<br>
This is a proposed implementation of the DWARF v5 string offsets table for both producer and consumer side. This includes handling of the DW_AT_str_offsets_base attribute in the unit headers and the usage of DW_FORM_strx for string references.<br>
<br>
I'd like to leave the emission of DW_FORM_strx{1,2,3,4} for a follow-on patch. Also, apologies for not handling Mach-O. I'm not familiar with it just yet, though I would like to handle it in another follow-on unless someone else wants to.<br>
<br>
This could be easily broken into 2 patches (1 producer, 1 consumer) it that's more manageable.<br>
<br>
<br>
<a href="https://reviews.llvm.org/D32618" rel="noreferrer" target="_blank">https://reviews.llvm.org/D32618</a><br>
<br>
Files:<br>
  include/llvm/CodeGen/DIE.h<br>
  include/llvm/CodeGen/DIEValue.def<br>
  include/llvm/CodeGen/DwarfStringPoolEntry.h<br>
  include/llvm/DebugInfo/DIContext.h<br>
  include/llvm/DebugInfo/DWARF/DWARFCompileUnit.h<br>
  include/llvm/DebugInfo/DWARF/DWARFContext.h<br>
  include/llvm/DebugInfo/DWARF/DWARFTypeUnit.h<br>
  include/llvm/DebugInfo/DWARF/DWARFUnit.h<br>
  include/llvm/MC/MCObjectFileInfo.h<br>
  lib/CodeGen/AsmPrinter/DIE.cpp<br>
  lib/CodeGen/AsmPrinter/DIEHash.cpp<br>
  lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp<br>
  lib/CodeGen/AsmPrinter/DwarfCompileUnit.h<br>
  lib/CodeGen/AsmPrinter/DwarfDebug.cpp<br>
  lib/CodeGen/AsmPrinter/DwarfDebug.h<br>
  lib/CodeGen/AsmPrinter/DwarfFile.cpp<br>
  lib/CodeGen/AsmPrinter/DwarfUnit.cpp<br>
  lib/CodeGen/AsmPrinter/DwarfUnit.h<br>
  lib/DebugInfo/DWARF/DWARFContext.cpp<br>
  lib/DebugInfo/DWARF/DWARFFormValue.cpp<br>
  lib/DebugInfo/DWARF/DWARFTypeUnit.cpp<br>
  lib/DebugInfo/DWARF/DWARFUnit.cpp<br>
  lib/MC/MCObjectFileInfo.cpp<br>
  test/DebugInfo/Generic/string-offsets-multiple-cus.ll<br>
  test/DebugInfo/Generic/string-offsets-table.ll<br>
  test/DebugInfo/Inputs/dwarfdump-str-offsets.elf-x86-64<br>
  test/DebugInfo/Inputs/dwarfdump-str-offsets.s<br>
  test/DebugInfo/dwarfdump-str-offsets.test<br>
  tools/llvm-dwarfdump/llvm-dwarfdump.cpp<br>
  tools/obj2yaml/dwarf2yaml.cpp<br>
<br>
</blockquote></div></div>