IR and AsmPrinter parts for handling of DW_OP_entry_values DWARF operation.
Authors: @asowda, @NikolaPrica, @djtodoro, @ivanbaev
Paths
| Differential D60866
[DWARF] Handle DW_OP_entry_value operand ClosedPublic Authored by djtodoro on Apr 18 2019, 6:13 AM.
Details Summary IR and AsmPrinter parts for handling of DW_OP_entry_values DWARF operation. Authors: @asowda, @NikolaPrica, @djtodoro, @ivanbaev
Diff Detail Event Timelinedjtodoro added a parent revision: D58042: [LiveDebugValues] Emit parameter's entry value.Apr 18 2019, 6:16 AM djtodoro added a parent revision: D60715: [ISEL][X86] Tracking of registers that forward call arguments.Apr 18 2019, 6:19 AM djtodoro added a child revision: D58042: [LiveDebugValues] Emit parameter's entry value.Apr 18 2019, 6:21 AM Comment Actions This looks mostly good, IMO what's missing is
Comment Actions
Thanks!
Done.
Done.
Since there are a lot of places using With* it is better doing this as a separate commit. I am working on the patch. :) djtodoro removed a parent revision: D60715: [ISEL][X86] Tracking of registers that forward call arguments.Apr 24 2019, 5:33 AM
Comment Actions @aprantl Thanks again for the comments! Let us summarize the whole picture of the feature here. In .debug_info section DW_TAG_call_site_parameter information with its attributes allows us to print @entry value from a debugger (e.g. #1 foo (val=<optimized out>, val@entry=5)). That information we try to generate during AsmPrinter phase. The second thing of the feature is using @entry for representing real value (DBG_VALUE) of a parameter (additional input in .debug_loc). It is done by generating additional DW_OP_entry_value in LiveDebugValues. So, it will allow us to see situations in a backtrace such as #1 foo (val=val@entry=5). In addition, we see that GCC in some situations generate DW_OP_entry_value for representing call site parameters value (see DwarfDebug.cpp file), but that is an enhancement, not a fundamental thing.
djtodoro added inline comments.
djtodoro added inline comments.
djtodoro marked an inline comment as done. Comment Actions-Improve the verifier for entry values
This revision is now accepted and ready to land.May 28 2019, 9:24 AM Closed by commit rL364542: [DWARF] Handle the DW_OP_entry_value operand (authored by djtodoro). · Explain WhyJun 27 2019, 6:54 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 200488 docs/LangRef.rst
include/llvm/BinaryFormat/Dwarf.def
include/llvm/IR/DebugInfoMetadata.h
lib/CodeGen/AsmPrinter/DbgEntityHistoryCalculator.cpp
lib/CodeGen/AsmPrinter/DebugLocEntry.h
lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
lib/CodeGen/AsmPrinter/DwarfDebug.h
lib/CodeGen/AsmPrinter/DwarfDebug.cpp
lib/CodeGen/AsmPrinter/DwarfExpression.h
lib/CodeGen/AsmPrinter/DwarfExpression.cpp
lib/DebugInfo/DWARF/DWARFExpression.cpp
lib/IR/DebugInfoMetadata.cpp
test/Verifier/diexpression-entry-value.ll
|
How about: