You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using the NO_ARGUMENTS flag with UnDecorateSymbolName allows the user to demangle a plain type (e.g. RTTI name) with no symbol. This is useful for demangling names produced by type_id().
The easy way forward is simply to shortcut to read_var_type() in parse if that flag is present and return no Symbol. I've tested a hack that does something like this to make sure it works:
fn parse(&mutself) -> Result<ParseResult<'a>>{// MSVC-style mangled symbols must start with b'?'.if !self.consume(b"?"){returnErr(self.fail("does not start with b'?'"));}ifself.type_only{let ty = self.read_var_type(StorageClass::empty())?;returnOk(ParseResult{// TODO: making the `Symbol` an `Option` would be a breaking change, how should we handle this?symbol:Symbol{name:Name::Discriminator(0),scope:NameSequence{names:Vec::new()}},symbol_type: ty,});}
And adjust the serializer to only emit the type. I have a work in progress patch and will open a PR shortly, but the current issues I have are how to handle the optional Symbol and any information about NO_ARGUMENTS that I might be missing beyond my own experience/the WINE implementation.
The text was updated successfully, but these errors were encountered:
Using the
NO_ARGUMENTS
flag withUnDecorateSymbolName
allows the user to demangle a plain type (e.g. RTTI name) with no symbol. This is useful for demangling names produced bytype_id()
.The MSDN documentation implies this would be used to avoid demangling function parameters, but the WINE implementation (and in my experience) disagrees: https://github.com/wine-mirror/wine/blob/master/dlls/msvcrt/undname.c#L1458-L1469.
The easy way forward is simply to shortcut to
read_var_type()
inparse
if that flag is present and return noSymbol
. I've tested a hack that does something like this to make sure it works:And adjust the serializer to only emit the type. I have a work in progress patch and will open a PR shortly, but the current issues I have are how to handle the optional
Symbol
and any information about NO_ARGUMENTS that I might be missing beyond my own experience/the WINE implementation.The text was updated successfully, but these errors were encountered: