MCPcopy Create free account
hub / github.com/beefytech/Beef / GetAddressSymbolName

Method GetAddressSymbolName

IDEHelper/WinDebugger.cpp:12171–12193  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12169}
12170
12171String WinDebugger::GetAddressSymbolName(intptr address, bool demangle)
12172{
12173 auto subProgram = mDebugTarget->FindSubProgram(address);
12174 if (subProgram != NULL)
12175 return subProgram->ToString();
12176
12177 String outSymbol;
12178 addr_target offset = 0;
12179 DbgModule* dbgModule;
12180 if (mDebugTarget->FindSymbolAt(address, &outSymbol, &offset, &dbgModule))
12181 {
12182 if (offset < 0x10000)
12183 {
12184 if (demangle)
12185 outSymbol = BfDemangler::Demangle(outSymbol, DbgLanguage_Unknown);
12186 if (offset > 0)
12187 outSymbol += StrFormat("+%x", offset);
12188 return outSymbol;
12189 }
12190 }
12191
12192 return StrFormat("0x%@", address);
12193}
12194
12195String WinDebugger::DisassembleAtRaw(intptr inAddress)
12196{

Calls 3

FindSubProgramMethod · 0.80
FindSymbolAtMethod · 0.80
ToStringMethod · 0.45

Tested by

no test coverage detected