[PATCH] D67492: [DebugInfo] Add a DW_OP_LLVM_entry_value operation

David Stenberg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 19 09:04:12 PDT 2019


dstenb updated this revision to Diff 220875.
dstenb edited the summary of this revision.
dstenb added a comment.
Herald added subscribers: fedor.sergeev, jyknight.

Update patch after comments, and change the semantics of the new operation. Rather than only introducing an internal variant that has the same behavior as DW_OP_entry_value, the new operation's operand specifies the number of operations (including the value/address operand) that are covered by the entry value, and that value is then converted to the byte size when we emit the entry value in DwarfExpression.

To keep the changes reasonably large, this patch keeps the limitation that the operand can only be set to one, and entry values still only works for register debug values. To support DW_OP_LLVM_entry_values covering more than one operation, you would need to add more `finalizeEntryValue` logic to DwarfExpression.

I opted for the operand describing the number of operations that the entry values cover, rather than the std::distance in the DIExpression, under the assumption that this will make it slightly cleaner to implement things. I can change it to std::distance though if that is preferred.

To make the patch reasonably small and reviewable I split the code that adds the ability to count the size of the DWARF block in DwarfExpression into a parent patch.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D67492/new/

https://reviews.llvm.org/D67492

Files:
  llvm/docs/LangRef.rst
  llvm/include/llvm/BinaryFormat/Dwarf.h
  llvm/include/llvm/CodeGen/MachineInstr.h
  llvm/include/llvm/IR/DebugInfoMetadata.h
  llvm/lib/BinaryFormat/Dwarf.cpp
  llvm/lib/CodeGen/AsmPrinter/DbgEntityHistoryCalculator.cpp
  llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
  llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
  llvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp
  llvm/lib/CodeGen/AsmPrinter/DwarfExpression.h
  llvm/lib/IR/DebugInfoMetadata.cpp
  llvm/test/DebugInfo/ARM/entry-value-multi-byte-expr.ll
  llvm/test/DebugInfo/MIR/Hexagon/live-debug-values-bundled-entry-values.mir
  llvm/test/DebugInfo/MIR/X86/avoid-single-entry-value-location.mir
  llvm/test/DebugInfo/MIR/X86/dbgcall-site-interpretation.mir
  llvm/test/DebugInfo/MIR/X86/dbginfo-entryvals.mir
  llvm/test/DebugInfo/MIR/X86/multiple-param-dbg-value-entry.mir
  llvm/test/DebugInfo/Sparc/entry-value-complex-reg-expr.ll
  llvm/test/Verifier/diexpression-dwarf-entry-value.ll
  llvm/test/Verifier/diexpression-entry-value.ll
  llvm/test/Verifier/diexpression-valid-entry-value.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D67492.220875.patch
Type: text/x-patch
Size: 25925 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190919/df61f0d0/attachment.bin>


More information about the llvm-commits mailing list