ibuclaw / gdb

Fork of GDB with D-related fixes.
GNU General Public License v2.0
16 stars 4 forks source link

Collection of undemangled names #4

Closed mihails-strasuns-sociomantic closed 9 years ago

mihails-strasuns-sociomantic commented 9 years ago

I will keep posting symbols that have not been demangled by gdb as I find them.

gdb version 7.9.50.20150511-cvs , built from this repo:

_D2rt6dmain24mainUiPPaZi6runAllMFZv
_D2rt6dmain24mainUiPPaZi7tryExecMFDFZvZv
ibuclaw commented 9 years ago

Is that generated by D1? That is a non-compliant mangle you got there.

See: http://dlang.org/abi.html#MangledName

The Type mangle should only ever be emitted at the end of a MangledName - though having a second look, there's nothing documented on how nested functions should be mangled.

Hmm...

ibuclaw commented 9 years ago

For clarification: 4mainUiPPaZi should be 4mainUiPPaZ

ibuclaw commented 9 years ago

See this issue in DMD: https://issues.dlang.org/show_bug.cgi?id=12352

ibuclaw commented 9 years ago

Which you have a D1 issue for: https://issues.dlang.org/show_bug.cgi?id=4268

mihails-strasuns-sociomantic commented 9 years ago

Ah, sad, I thought mangling is backwards-compatible for D1 :(

ibuclaw commented 9 years ago

It might be possible to make it backwards compatible, as there's now a loose parser 'state' when demangling symbols. Something to the logic of seeing that we have reached the end of the name list, but are not at the top-level scope of the parser (and not in the middle of demangling a template) - try parsing a type symbol without bailing.

ibuclaw commented 9 years ago

Though is the last part that needs care as I've done a good job of making the demangler paranoid at every step. There's also a question of whether it raises any false-positives, but I have a good test suite for that.

ibuclaw commented 9 years ago

In any case, I'd prefer fixing D1

ibuclaw commented 9 years ago

Alternatively, I could start introducing ABI versions. :)

mihails-strasuns-sociomantic commented 9 years ago

No point in investing any real effort in D1 support, I hope we won't need that soon enough :) Will reopen when I spot anything D2-specific.