3

In my c++ applicatoin I have the virtual addresses of functions and I want to get their mangled names. right now I can get only the unmangled name by using the winapi SymFromAddr function. is there a way to get the mangled names also ?

max
  • 93
  • 5

1 Answers1

6

Use SymSetOptions(). You want to turn off the SYMOPT_UNDNAME option to see the mangled name.

So, roughly:

  DWORD options = SymGetOptions();
  SymSetOptions(options & ~SYMOPT_UNDNAME);
  if (SymFromAddr(hProcess, dwAddress, &dwDisplacement, pSymbol))
  {
      // etc...
  }
  SymSetOptions(options);
Hans Passant
  • 922,412
  • 146
  • 1,693
  • 2,536