[lld] r312358 - [llvm-pdbutil] Support dumping CodeView from object files.

Zachary Turner via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 1 13:06:56 PDT 2017


Author: zturner
Date: Fri Sep  1 13:06:56 2017
New Revision: 312358

URL: http://llvm.org/viewvc/llvm-project?rev=312358&view=rev
Log:
[llvm-pdbutil] Support dumping CodeView from object files.

We have llvm-readobj for dumping CodeView from object files, and
llvm-pdbutil has always been more focused on PDB.  However,
llvm-pdbutil has a lot of useful options for summarizing debug
information in aggregate and presenting high level statistical
views.  Furthermore, it's arguably better as a testing tool since
we don't have to write tests to conform to a state-machine like
structure where you match multiple lines in succession, each
depending on a previous match.  llvm-pdbutil dumps much more
concisely, so it's possible to use single-line matches in many
cases where as with readobj tests you have to use multi-line
matches with an implicit state machine.

Because of this, I'm adding object file support to llvm-pdbutil.
In fact, this mirrors the cvdump tool from Microsoft, which also
supports both object files and pdb files.  In the future we could
perhaps rename this tool llvm-cvutil.

In the meantime, this allows us to deep dive into object files
the same way we already can with PDB files.

Modified:
    lld/trunk/test/COFF/pdb-comdat.test

Modified: lld/trunk/test/COFF/pdb-comdat.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/COFF/pdb-comdat.test?rev=312358&r1=312357&r2=312358&view=diff
==============================================================================
--- lld/trunk/test/COFF/pdb-comdat.test (original)
+++ lld/trunk/test/COFF/pdb-comdat.test Fri Sep  1 13:06:56 2017
@@ -25,8 +25,8 @@ pdb_comdat_main.obj should be included i
 RUN: rm -rf %t && mkdir -p %t && cd %t
 RUN: yaml2obj %S/Inputs/pdb_comdat_main.yaml -o pdb_comdat_main.obj
 RUN: yaml2obj %S/Inputs/pdb_comdat_bar.yaml -o pdb_comdat_bar.obj
-RUN: lld-link pdb_comdat_main.obj pdb_comdat_bar.obj -out:t.exe -debug -pdb:t.pdb -nodefaultlib -entry:main
-RUN: llvm-pdbutil dump -l -symbols -globals t.pdb | FileCheck %s
+RUN: lld-link pdb_comdat_main.obj pdb_comdat_bar.obj -out:%t.exe -debug -pdb:%t.pdb -nodefaultlib -entry:main
+RUN: llvm-pdbutil dump -l -symbols -globals %t.pdb | FileCheck %s
 
 CHECK:                            Lines
 CHECK: ============================================================




More information about the llvm-commits mailing list