[PATCH] D89208: [DebugInfo] Support for DWARF operator DW_OP_over

Alok Kumar Sharma via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Oct 11 10:19:29 PDT 2020


alok created this revision.
alok added reviewers: aprantl, jmorse, probinson, sscalpone, jini.susan.george, SouraVX.
alok added a project: debug-info.
Herald added subscribers: llvm-commits, jdoerfert, ormris, hiraditya.
Herald added a project: LLVM.
alok requested review of this revision.

llvm rejects DWARF operator DW_OP_over.This DWARF
operator is needed for Flang to support assumed rank array.
Debugger in such cases calculates Array bounds using 
DW_AT_rank and DW_TAG_generic_subrange.
for (i=0;i<rank;i++) {
lBound of i'th dim =>
Debugger keeps hidden operator DW_OP_lit"i" before lBound expression
and this operator is used by the expression having DW_OP_over.
}

  Summary:

Currently llvm rejects DWARF operator DW_OP_over.
below error is produced when llvm finds this operator.

[..]
invalid expression
!DIExpression(151, 20, 16, 48, 30, 35, 80, 34, 6)
warning: ignoring invalid debug info in over.ll
[..]

There are some parts missing in support of this operator, need to
be completed.

  Testing

-added a unit testcase
-check-debuginfo
-check-llvm


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D89208

Files:
  llvm/docs/LangRef.rst
  llvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp
  llvm/lib/IR/DebugInfoMetadata.cpp
  llvm/test/DebugInfo/X86/dwarfdump-over.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D89208.297474.patch
Type: text/x-patch
Size: 7487 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201011/9f061dd6/attachment.bin>


More information about the llvm-commits mailing list