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

Method GetAddressSourceLocation

IDEHelper/WinDebugger.cpp:12147–12169  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12145}
12146
12147String WinDebugger::GetAddressSourceLocation(intptr address)
12148{
12149 DbgSubprogram* subProgram = NULL;
12150 DbgLineData* lineData = FindLineDataAtAddress(address, &subProgram);
12151 if (lineData != NULL)
12152 return StrFormat("%s:%d:%d", subProgram->GetLineSrcFile(*lineData)->GetLocalPath().c_str(), lineData->mLine + 1, lineData->mColumn + 1);
12153
12154 String outSymbol;
12155 addr_target offset = 0;
12156 DbgModule* dbgModule;
12157 if (mDebugTarget->FindSymbolAt(address, &outSymbol, &offset, &dbgModule))
12158 {
12159 if (offset < 0x10000)
12160 {
12161 outSymbol = BfDemangler::Demangle(outSymbol, DbgLanguage_Unknown);
12162 if (offset > 0)
12163 outSymbol += StrFormat("+%x", offset);
12164 return outSymbol;
12165 }
12166 }
12167
12168 return StrFormat("0x%@", address);
12169}
12170
12171String WinDebugger::GetAddressSymbolName(intptr address, bool demangle)
12172{

Calls 3

GetLineSrcFileMethod · 0.80
FindSymbolAtMethod · 0.80
c_strMethod · 0.45

Tested by

no test coverage detected