ianlancetaylor / demangle

C++ symbol name demangler written in Go
BSD 3-Clause "New" or "Revised" License
166 stars 24 forks source link

Demangle types #23

Open xPaw opened 1 month ago

xPaw commented 1 month ago

It's a TODO: https://github.com/ianlancetaylor/demangle/blob/81f5be970ecae4046912a026004100b0535be16e/c%2B%2Bfilt.go#L51

echo "N8tinyxml27MemPoolE" | c++filt -t

tinyxml2::MemPool

ianlancetaylor commented 1 month ago

When does this actually come up in practice?

xPaw commented 1 month ago

Dumping strings from a binary

ianlancetaylor commented 1 month ago

Thanks, but can you give me an example? In a binary I would expect all such strings to be part of a complete symbol name. When does a binary contain strings that are only mangled types that are not part of a complete symbol?

xPaw commented 1 month ago

It's basically a strings dump of the file (using some Go code to scan sections to find strings though), it should be complete string if it's surrounded by null bytes?

ianlancetaylor commented 1 month ago

Thanks, but that is not quite an example. When do you find a C++ type string in a string dump of a file. Why would that happen?