diff options
| author | Djordje Todorovic <djordje.todorovic@rt-rk.com> | 2019-07-09 11:33:56 +0000 |
|---|---|---|
| committer | Djordje Todorovic <djordje.todorovic@rt-rk.com> | 2019-07-09 11:33:56 +0000 |
| commit | 01eaae6dd12862cda6b42d565a215b07a178aba6 (patch) | |
| tree | 1100521e1eb7dce0a791709349f96a9efa16e432 /llvm/lib/IR/DebugInfoMetadata.cpp | |
| parent | 9b3f38f99085e2bbf9db01bb00d4c6d837f0fc00 (diff) | |
| download | bcm5719-llvm-01eaae6dd12862cda6b42d565a215b07a178aba6.tar.gz bcm5719-llvm-01eaae6dd12862cda6b42d565a215b07a178aba6.zip | |
[DwarfDebug] Dump call site debug info
Dump the DWARF information about call sites and call site parameters into
debug info sections.
The patch also provides an interface for the interpretation of instructions
that could load values of a call site parameters in order to generate DWARF
about the call site parameters.
([13/13] Introduce the debug entry values.)
Co-authored-by: Ananth Sowda <asowda@cisco.com>
Co-authored-by: Nikola Prica <nikola.prica@rt-rk.com>
Co-authored-by: Ivan Baev <ibaev@cisco.com>
Differential Revision: https://reviews.llvm.org/D60716
llvm-svn: 365467
Diffstat (limited to 'llvm/lib/IR/DebugInfoMetadata.cpp')
| -rw-r--r-- | llvm/lib/IR/DebugInfoMetadata.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/llvm/lib/IR/DebugInfoMetadata.cpp b/llvm/lib/IR/DebugInfoMetadata.cpp index 900df27d1d3..cdb95769ed7 100644 --- a/llvm/lib/IR/DebugInfoMetadata.cpp +++ b/llvm/lib/IR/DebugInfoMetadata.cpp @@ -833,10 +833,12 @@ unsigned DIExpression::ExprOperand::getSize() const { case dwarf::DW_OP_LLVM_fragment: return 3; case dwarf::DW_OP_constu: + case dwarf::DW_OP_consts: case dwarf::DW_OP_deref_size: case dwarf::DW_OP_plus_uconst: case dwarf::DW_OP_LLVM_tag_offset: case dwarf::DW_OP_entry_value: + case dwarf::DW_OP_regx: return 2; default: return 1; @@ -849,8 +851,12 @@ bool DIExpression::isValid() const { if (I->get() + I->getSize() > E->get()) return false; + uint64_t Op = I->getOp(); + if (Op >= dwarf::DW_OP_reg0 && Op <= dwarf::DW_OP_reg31) + continue; + // Check that the operand is valid. - switch (I->getOp()) { + switch (Op) { default: return false; case dwarf::DW_OP_LLVM_fragment: @@ -905,6 +911,7 @@ bool DIExpression::isValid() const { case dwarf::DW_OP_lit0: case dwarf::DW_OP_not: case dwarf::DW_OP_dup: + case dwarf::DW_OP_regx: break; } } |

