Page MenuHomePhabricator

pdbdump: fix bug in name hash table.

Authored by ruiu on May 24 2016, 8:35 PM.



name_ids() did not return all IDs but only the first NameCount items.
The number of non-zero entries in IDs vector is NameCount, but it
does not mean that all non-zero entries are at the beginning of IDs

Diff Detail


Event Timeline

ruiu updated this revision to Diff 58382.May 24 2016, 8:35 PM
ruiu retitled this revision from to pdbdump: fix bug in name hash table..
ruiu updated this object.
ruiu added a reviewer: zturner.
ruiu added a subscriber: llvm-commits.
zturner accepted this revision.May 24 2016, 9:03 PM
zturner edited edge metadata.
zturner added inline comments.
34 ↗(On Diff #58382)

I thought this was going to explain why Name Count was printing 4, but we were only printing 2 actual entries. Is there supposed to be a 4th one?

This revision is now accepted and ready to land.May 24 2016, 9:03 PM
ruiu added a comment.May 24 2016, 9:12 PM

The vector for empty.pdb is [0, 0x34, 0, 0, 0x1, 0x35, 0x46]. Previously name_ids returned [0x34, 0, 0, 0x1] which is the two strings. 0x35 is the empty string, and 0x46 is the missing string.

This revision was automatically updated to reflect the committed changes.