goblin
goblin copied to clipboard
fix: Iterate all ImageDebugDirectory entries
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.
fun fact: I wrote a detailed blog post about how I made this discovery: https://swatinem.de/blog/format-ossification/
looks like a CI failure?