I understand it shows the size only of the debug data?
No, it doesn't actually show the size of the debug data. But it needs the debug data to understand the boundaries of functions, strings, arrays, and other elements - in order to determine their size.
Debug information does not affect the size of “effective data” - that is, “non-passive” data that the application needs (as opposed to debug information, which can be safely stripped).
It would be interesting to know what takes up space in the release file.
As I mentioned above, debug information does not affect the size of the “effective data” (I can't quite find the right word). Therefore, assuming the same level of optimization, a release build without debug symbols is no different from a debug build with debug symbols. Debug symbols can be stripped. And this utility only needs them to understand function boundaries, etc. - to determine their size.
For example, how much memory is consumed by constants (strings, numbers, arrays) and code, or how much is consumed by the program itself and the RTL (or even individual FPC/Lazarus packages).
A table and a visual map are generated based on individual elements - you can check them there.
As for grouping by units/packages - that’s not available. It probably wouldn’t be possible to group by packages anyway if we rely solely on information from DWARF. As far as I understand, at most, only the unit name is stored there.
Honestly, this is more of a toy, so I haven’t tried to come up with many improvements. Plus, I’m doing this on a free Claude subscription, which means that after almost every task, it triggers a timeout for me lasting ~4–6 hours. That’s why the iterations end up being pretty tedious.
The latter would likely require mapping file sections to package units. I'm not very knowledgeable about this, and I'm not sure if this is even possible due to some compiler optimizations...
👍