Skip to content

Support demangling symbols with dot-delimited words at the end #16

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 5, 2018

Conversation

shepmaster
Copy link
Member

This accounts for values like LLVM IR branch labels.

Closes #15

@alexcrichton
Copy link
Member

Nice! Could some validation also be added that everything after the E. is "symbol like" to avoid eagerly desymbolizing things that shouldn't be?

@shepmaster shepmaster force-pushed the dot-delimited-demangling branch from a98a592 to bfc20bf Compare May 4, 2018 20:12
@shepmaster
Copy link
Member Author

shepmaster commented May 4, 2018

Could some validation also be added that everything after the E. is "symbol like" to avoid eagerly desymbolizing things that shouldn't be?

I've updated to make sure the suffix is ASCII alphanumeric / punctuation and added a test.

@alexcrichton
Copy link
Member

👍

Looks like CI may be failing though?

@shepmaster
Copy link
Member Author

Looks like CI may be failing though?

Huh...

error[E0599]: no method named `is_alphanumeric` found for type `char` in the current scope
   --> src/lib.rs:224:11
    |
224 |         c.is_alphanumeric() || is_ascii_punctuation(c)
    |           ^^^^^^^^^^^^^^^

but char::is_alphanumeric is since 1.0:

    #[stable(feature = "rust1", since = "1.0.0")]
    #[inline]
    pub fn is_alphanumeric(self) -> bool {
        self.is_alphabetic() || self.is_numeric()
    }

Am I asleep? Am I missing something really obvious?

@shepmaster
Copy link
Member Author

Oh, no_std. Ok, I'll copy that implementation too.

This accounts for values like LLVM IR branch labels.

Closes rust-lang#15
@shepmaster shepmaster force-pushed the dot-delimited-demangling branch from bfc20bf to fcf9f7f Compare May 5, 2018 02:33
@alexcrichton alexcrichton merged commit 8d2c735 into rust-lang:master May 5, 2018
@alexcrichton
Copy link
Member

👍

@shepmaster shepmaster deleted the dot-delimited-demangling branch May 5, 2018 17:47
@shepmaster
Copy link
Member Author

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants