[PATCH] D53606: [cfi] Make sanstats print address of the check

Vitaly Buka via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 23 13:20:37 PDT 2018


vitalybuka created this revision.
vitalybuka added a reviewer: pcc.

Help with off-line symbolization or other type debugging.


Repository:
  rL LLVM

https://reviews.llvm.org/D53606

Files:
  llvm/tools/sanstats/sanstats.cpp


Index: llvm/tools/sanstats/sanstats.cpp
===================================================================
--- llvm/tools/sanstats/sanstats.cpp
+++ llvm/tools/sanstats/sanstats.cpp
@@ -81,8 +81,9 @@
     // remove one from the address to get the correct DI.
     if (Expected<DILineInfo> LineInfo =
             Symbolizer.symbolizeCode(Filename, Addr - 1)) {
-      llvm::outs() << LineInfo->FileName << ':' << LineInfo->Line << ' '
-                   << LineInfo->FunctionName << ' ';
+      llvm::outs() << format_hex(Addr - 1, 18) << ' ' << LineInfo->FileName
+                   << ':' << LineInfo->Line << ' ' << LineInfo->FunctionName
+                   << ' ';
     } else {
       logAllUnhandledErrors(LineInfo.takeError(), llvm::outs(), "<error> ");
     }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D53606.170739.patch
Type: text/x-patch
Size: 771 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181023/c3e3f55c/attachment.bin>


More information about the llvm-commits mailing list