views:

121

answers:

1

I'm using IDebugSymbols::GetNameByOffset and I'm finding that I get the same symbol name for different functions that overload the same name.

E.g. The code I'm looking up the symbols for might be as follows:

void SomeFunction(int) {..}
void SomeFunction(float) {..}

At runtime, when I have an address of an instruction from each of these functions I'd like to use GetNameByOffset and tell the two apart somehow. I've experimented with calling SetSymbolOptions toggling the SYMOPT_UNDNAME and SYMOPT_NO_CPP flags as documented here, but this didn't work.

Does anyone know how to tell these to symbols apart in the debugger engine universe?


Edit: Please see me comment on the accepted answer for a minor amendment to the proposed solution.

+2  A: 
It turns out that my overloaded functions took parameters of the same size, so `cdwParams` didn't cut it. However, the `ulOffStart` field on `FPO_DATA` turns out to be perfect. It gives "offset 1st byte of function code" according to WinNT.h.
pauldoo