HBehrens / puncover

Analyses C/C++ build output for code size, static variables, and stack usage
MIT License
431 stars 94 forks source link

added support for windows file paths #60

Open ribsey opened 1 year ago

ribsey commented 1 year ago

I encountered a library with windows file paths and some of them had even the current working directory during the build added in front of the file path, like this: D:\\stack\\targets\\ST\\STM32F0/HW-Abstraction.c:122 or this: D:\\some\\other\\path\\D:\\stack\\targets\\ST\\STM32F0/HW-Abstraction.c:122

So with the new regex and the backslash to slash replacement, these paths get parsed as well.

HBehrens commented 1 year ago

Thank you for providing some more real-world data into the mix and providing a matching implementation, @ribsey 💪

@noahp I haven't look at the code in a while, do you know if this part does have tests already? With all of this regex shenanigans, I am worried we will (one day) introduce a regression during the attempt to add more features. If yes, adding the examples provided would be awesome!