OSDN Git Service

[PDB] Copy inlinee lines records into the PDB
authorReid Kleckner <rnk@google.com>
Mon, 3 Jun 2019 18:15:38 +0000 (18:15 +0000)
committerReid Kleckner <rnk@google.com>
Mon, 3 Jun 2019 18:15:38 +0000 (18:15 +0000)
Summary:
- Fixes inline call frame line table display in windbg.
- Improve llvm-pdbutil to dump extra file ids.
- Warn on unknown subsections so we don't have this kind of bug in the
  future.

Reviewers: inglorion, akhuang, aganea

Subscribers: eraman, zturner, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D62701

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362429 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/DebugInfo/CodeView/DebugInlineeLinesSubsection.h
tools/llvm-pdbutil/DumpOutputStyle.cpp

index 1ca2bd0..9fd88a6 100644 (file)
@@ -70,6 +70,11 @@ public:
   }
 
   Error initialize(BinaryStreamReader Reader);
+  Error initialize(BinaryStreamRef Section) {
+    return initialize(BinaryStreamReader(Section));
+  }
+
+  bool valid() const { return Lines.valid(); }
   bool hasExtraFiles() const;
 
   Iterator begin() const { return Lines.begin(); }
@@ -77,7 +82,7 @@ public:
 
 private:
   InlineeLinesSignature Signature;
-  VarStreamArray<InlineeSourceLine> Lines;
+  LinesArray Lines;
 };
 
 class DebugInlineeLinesSubsection final : public DebugSubsection {
index dab1e42..bb2bdd5 100644 (file)
@@ -995,6 +995,10 @@ Error DumpOutputStyle::dumpInlineeLines() {
           P.formatLine("{0,+8} | {1,+5} | ", Entry.Header->Inlinee,
                        fmtle(Entry.Header->SourceLineNum));
           Strings.formatFromChecksumsOffset(P, Entry.Header->FileID, true);
+          for (const auto &ExtraFileID : Entry.ExtraFiles) {
+            P.formatLine("                   ");
+            Strings.formatFromChecksumsOffset(P, ExtraFileID, true);
+          }
         }
         P.NewLine();
       });