adrianstone55 / SymbolSort

A Utility for Measuring C++ Code Bloat
http://gameangst.com/?p=320
Apache License 2.0
117 stars 17 forks source link

Escape operator| and operator|| when parsing nm sysv output since '|' is the separator for fields #15

Closed richardkogelnig closed 7 years ago

richardkogelnig commented 7 years ago

When parsing nm output an uncaught 'System.FormatException' is thrown in ParseSysvSymbol:396 when an operator| or operator|| are overloaded. This is caused by '|' being the separator of the nm sysv output. As far as i can see there is no possibility to configure the separator for the nm output. The escaping of operator| and operator|| and following unescaping could be expensive for parsing large input - if this becomes a problem we could search for a better solution.

I uploaded an example for a problematic nm output here: https://gist.github.com/richardkogelnig/1d267583bcd8c1e2ff86b075ede18dc2

Edit: added link to example nm output