[PATCH] D147506: [DebugLine] save one debug line entry for empty prologue

ChenZheng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 3 23:46:42 PDT 2023


shchenz created this revision.
shchenz added reviewers: dblaikie, probinson, aprantl, Esme.
shchenz added a project: LLVM.
Herald added subscribers: pmatos, asb, hiraditya, jgravelle-google, sbc100, dschuff.
Herald added a project: All.
shchenz requested review of this revision.
Herald added subscribers: llvm-commits, aheejin.

Some debuggers like DBX on AIX assume the address in debug line entries is always incremental. But clang generates two entries (entry for file scope line and entry for prologue end) with same address if prologue is empty

And if the prologue is empty, seems the first debug line entry for the function is unnecessary(i.e. removing the first entry won't impact the behavior in GDB on Linux), so I implement this for all debuggers.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D147506

Files:
  llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
  llvm/test/CodeGen/AArch64/GlobalISel/combine-shift-of-shifted-dbg-value-fallback.ll
  llvm/test/DebugInfo/XCOFF/empty-prolog.ll
  llvm/test/DebugInfo/XCOFF/explicit-section.ll
  llvm/test/DebugInfo/XCOFF/function-sections.ll
  llvm/test/MC/WebAssembly/debug-info.ll
  llvm/test/MC/WebAssembly/debug-info64.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D147506.510707.patch
Type: text/x-patch
Size: 17678 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230404/849c9067/attachment.bin>


More information about the llvm-commits mailing list