[PATCH] D54006: Fix a few small issues in llvm-pdbutil

Zachary Turner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 1 17:01:56 PDT 2018


zturner added inline comments.


================
Comment at: test/tools/llvm-pdbdump/stripped.test:7-8
+
+; CHECK: Streams                           
+; CHECK-NEXT: ============================================================
+
----------------
lemo wrote:
> zturner wrote:
> > This section might be interesting to print too.  If for no other reason than to server as a reference of what streams are "normal" to expect in a stripped PDB.
> I agree. There's a slight downside though - the test becomes very sensitive to the output, including formatting details.
FileCheck is pretty helpful when it comes to this kind of thing.  You can regex out anything by putting `{{.*}}` (so stream sizes, for example), and also you can leave off anything at the end of a line.  So for example, for Stream 3 (just picking a random one), you could write your line as:

```
; CHECK:   Stream 3 ({{.*}} bytes): [DBI Stream]
; CHECK:   Stream 4 
```
 Note the absence of the NEXT (because we're skipping blocks, and we're regex'ing out the stream sizes.  So all of the sensitive stuff goes away.

However....  I don't think we should check in this particular PDB (or any other PDB that we didn't generate ourselves).  Microsoft has tools that will strip PDBs, although I forget what it's called off the top of my head.  Can we generate a private PDB using cl.exe, strip it using their tool, verify that it has the same properties as this PDB, and then use that one instead?


https://reviews.llvm.org/D54006





More information about the llvm-commits mailing list