Skip to content

Conversation

michelf
Copy link
Contributor

@michelf michelf commented Jun 23, 2011

Reads stdin, demangles mangled D symbols, send result to stdout. Useful to filter output from the linker.

@michelf
Copy link
Contributor Author

michelf commented Jul 5, 2011

Fixed: now using File.KeepTerminator.yes and write instead of writeln. Also removed tabs from ddemangle.d.

@dnadlinger
Copy link
Contributor

Does that handle symbols terminated by end-of-line correctly? I have been using this for quite some time now: https://gist.github.com/1069843 (with KeepTerminator.yes edited in right now having read Andrei's comment above).

@Trass3r
Copy link
Contributor

Trass3r commented Jul 7, 2011

Why does it check for ' ', '"' and ''' to end the search?
Anything that isn't alphanumeric or _ should terminate it, shouldn't it?
E.g. objdump gives stuff like <_D3std5stdio4File14__T5writeTAyaZ5writeMFAyaZv+0x7a>

@Trass3r
Copy link
Contributor

Trass3r commented Jul 7, 2011

btw, since I didn't know about this pull request before, I implemented yet another demangle tool which reads stdin char-wise, supports demangling names passed on the cmd line and --help.
I think one could also add that cmd line arguments are checked if they are filenames and then process that file instead.

https://github.com/Trass3r/tools/blob/master/dfilt/dfilt.d

@michelf
Copy link
Contributor Author

michelf commented Jul 8, 2011

I added a --help switch, and fixed scanning for end of symbol. I could obviously add more features (demangling names passed as arguments, or reading files), but I suggest we leave that to future pull requests.

@mrmonday
Copy link

Once this is merged it'd be cool for rdmd to use it if it's available.

@andralex
Copy link
Member

andralex commented Sep 2, 2011

ping?

@michelf
Copy link
Contributor Author

michelf commented Sep 2, 2011

I'll look at this this weekend. Been busy with other things lately.

@michelf
Copy link
Contributor Author

michelf commented Sep 5, 2011

Should be ready for merge now.

andralex added a commit that referenced this pull request Sep 5, 2011
@andralex andralex merged commit 72dc823 into dlang:master Sep 5, 2011
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.

5 participants