Unit
symdef has a function named make_mangledname:
function make_mangledname(const typeprefix:TSymStr;st:TSymtable;const suffix:TSymStr):TSymStr;
...
{ The mangled name is made out of at most 4 parts:
1) Optional typeprefix given as first parameter
with '_$' appended if not empty
2) Unit name or 'P$'+program name (never empty)
3) optional prefix variable that contains a unique
name for the local symbol table (prepended with '$_$'
if not empty)
4) suffix as given as third parameter,
also optional (i.e. can be empty)
prepended by '_$$_' if not empty }
Where do I find the reference for this comment?
GDB is able to call a function:
but fails to find a class method:
TTest=class
public
class function sfoo: integer;
The compiler emits the following mangled names for the above functions (DWARF2 and STABS):
P$GDBTEST_$$_TESTI$$LONGINT
P$GDBTEST$_$TTEST_$__$$_SFOO$$LONGINT
Is the second name correct?