Turns out, a PE file can have more than one ImageDebugDirectory.
Thus far, goblin only looks at the very first one, trying to interpret
it as a CV record.
This code changes that logic to rather iterate over all the entries to
find the one that is a CV record.
We still only capture a single entry in the DebugData for backwards
compatibility reasons. In the future we could as well capture all of
them.
Turns out, a PE file can have more than one ImageDebugDirectory. Thus far, goblin only looks at the very first one, trying to interpret it as a CV record.
This code changes that logic to rather iterate over all the entries to find the one that is a CV record. We still only capture a single entry in the
DebugData
for backwards compatibility reasons. In the future we could as well capture all of them.