Open RazrFalcon opened 5 years ago
I've tried the pdb_symbols
example, but I've got:
error dumping PDB: The requested stream (65535) is not stored in this file
The PDB file is from building the cargo-bloat
with the MSVC target.
Also, I'm not familiar with the pdb
, but what is the difference between global_symbols
and symbols from debug_information
? AFAIU, they can have the same symbols/functions, but global_symbols
doesn't contain size.
In my case, I have to collect a list of functions (name + size) that are used in the executable.
Let me call a Windows expert for help here.
@retep998 Could you make some advises about above questions? Thank you!
I don't know anything about the PDB format, sorry.
Also, I'm not familiar with the
pdb
, but what is the difference betweenglobal_symbols
and symbols fromdebug_information
? AFAIU, they can have the same symbols/functions, butglobal_symbols
doesn't contain size.
I think global_symbols
only lists the symbols that are exposed to the linker. And the symbols in debug_information
describe all functions present in the binary, even those that are internal and not callable from the outside.
global_symbols
in this crate does not expose information from the "Global Symbol Stream", but instead from a "Symbol Records Stream". I wasn't able to fully understand what the exact differences are, but it looks like the latter contains a combination of the "Global Symbol Stream" and the "Public Symbol Stream", plus more additional information.
@RazrFalcon is this still an issue?
I should retest it.
I think the following should get you fairly close:
ProcedureSymbol
s in each module have alen
field. That's your symbol size.