py-cpp-demangle icon indicating copy to clipboard operation
py-cpp-demangle copied to clipboard

Value error triggered on functions that don't need to be demangled.

Open farzonl opened this issue 2 years ago • 0 comments

So this code https://github.com/benfred/py-cpp-demangle/blob/44407c58a2ba044823385ce22c86fc1b23239587/src/lib.rs#L33

Is throwing a value error on these function names: '_main', 'ctor_0', 'ctor_1', 'ctor_2', 'ctor_3', 'ctor_4', 'ctor_5', 'ctor_6', 'ctor_7', 'ctor_8', 'ctor_9', 'ctor_10', 'ctor_11', 'ctor_12', 'ctor_13', 'ctor_14', 'ctor_15', 'ctor_16', 'ctor_17', 'ctor_18', 'ctor_19', 'ctor_20', 'ctor_21', 'ctor_22', 'ctor_23', 'ctor_24', 'ctor_25', 'ctor_26' I'm not entirely sure why c++ constructors are getting numbered like this. This is my work around:

functionName = f.name
try:
    functionName = demangle(f.name)
except ValueError:
    allFailedFunctionNames.append(f.name)

farzonl avatar May 28 '23 19:05 farzonl