[PATCH] D123534: [dwarf] Emit a DIGlobalVariable for constant strings.

Mitch Phillips via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 11 12:02:31 PDT 2022


hctim created this revision.
hctim added reviewers: echristo, cmtice.
Herald added a project: All.
hctim requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

An upcoming patch will extend llvm-symbolizer to provide the source line
information for global variables. The goal is to move AddressSanitizer
off of internal debug info for symbolization onto the DWARF standard
(and doing a clean-up in the process). Currently, ASan reports the line
information for constant strings if a memory safety bug happens around
them. We want to keep this behaviour, so we need to emit debuginfo for
these variables as well.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D123534

Files:
  clang/lib/CodeGen/CGDebugInfo.cpp
  clang/lib/CodeGen/CGDebugInfo.h
  clang/lib/CodeGen/CodeGenModule.cpp
  clang/test/CodeGen/debug-info-variables.c
  clang/test/VFS/external-names.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D123534.421994.patch
Type: text/x-patch
Size: 4090 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220411/20bef57a/attachment.bin>


More information about the cfe-commits mailing list