llvm.org GIT mirror llvm / 17f866f
[cfi] Make sanstats print address of the check Summary: Help with off-line symbolization or other type debugging. Reviewers: pcc Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D53606 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@347600 91177308-0d34-0410-b5e6-96231b3b80d8 Vitaly Buka 9 months ago
2 changed file(s) with 16 addition(s) and 15 deletion(s). Raw diff Collapse all Expand all
2424
2525 # RUN: sanstats %t.stats | FileCheck %s
2626
27 # CHECK: /tmp{{[/\\]}}f.c:1 f1 cfi-vcall 1
28 # CHECK: /tmp{{[/\\]}}f.c:2 f2 cfi-nvcall 2
29 # CHECK: /tmp{{[/\\]}}f.c:3 f3 cfi-derived-cast 3
30 # CHECK: /tmp{{[/\\]}}f.c:1 f1 cfi-unrelated-cast 4
31 # CHECK: /tmp{{[/\\]}}f.c:2 f2 cfi-icall 5
32 # CHECK: /tmp{{[/\\]}}f.c:3 f3 6
33
34 # CHECK: /tmp{{[/\\]}}f.c:3 f3 cfi-vcall 7
35 # CHECK: /tmp{{[/\\]}}f.c:2 f2 cfi-nvcall 8
36 # CHECK: /tmp{{[/\\]}}f.c:1 f1 cfi-derived-cast 9
37 # CHECK: /tmp{{[/\\]}}f.c:3 f3 cfi-unrelated-cast 11
38 # CHECK: /tmp{{[/\\]}}f.c:2 f2 cfi-icall 12
39 # CHECK: /tmp{{[/\\]}}f.c:1 f1 14
27 # CHECK: 0x0000000000000000 /tmp{{[/\\]}}f.c:1 f1 cfi-vcall 1
28 # CHECK: 0x0000000000000010 /tmp{{[/\\]}}f.c:2 f2 cfi-nvcall 2
29 # CHECK: 0x0000000000000020 /tmp{{[/\\]}}f.c:3 f3 cfi-derived-cast 3
30 # CHECK: 0x0000000000000000 /tmp{{[/\\]}}f.c:1 f1 cfi-unrelated-cast 4
31 # CHECK: 0x0000000000000010 /tmp{{[/\\]}}f.c:2 f2 cfi-icall 5
32 # CHECK: 0x0000000000000020 /tmp{{[/\\]}}f.c:3 f3 6
33
34 # CHECK: 0x0000000000000020 /tmp{{[/\\]}}f.c:3 f3 cfi-vcall 7
35 # CHECK: 0x0000000000000010 /tmp{{[/\\]}}f.c:2 f2 cfi-nvcall 8
36 # CHECK: 0x0000000000000000 /tmp{{[/\\]}}f.c:1 f1 cfi-derived-cast 9
37 # CHECK: 0x0000000000000020 /tmp{{[/\\]}}f.c:3 f3 cfi-unrelated-cast 11
38 # CHECK: 0x0000000000000010 /tmp{{[/\\]}}f.c:2 f2 cfi-icall 12
39 # CHECK: 0x0000000000000000 /tmp{{[/\\]}}f.c:1 f1 14
4040
4141 --- !ELF
4242 FileHeader:
8080 // remove one from the address to get the correct DI.
8181 if (Expected LineInfo =
8282 Symbolizer.symbolizeCode(Filename, Addr - 1)) {
83 llvm::outs() << LineInfo->FileName << ':' << LineInfo->Line << ' '
84 << LineInfo->FunctionName << ' ';
83 llvm::outs() << format_hex(Addr - 1, 18) << ' ' << LineInfo->FileName
84 << ':' << LineInfo->Line << ' ' << LineInfo->FunctionName
85 << ' ';
8586 } else {
8687 logAllUnhandledErrors(LineInfo.takeError(), llvm::outs(), " ");
8788 }