Fix source lines displayed with disp.
This commit is contained in:
parent
cad369f7a5
commit
ae050ea4a1
|
|
@ -321,7 +321,7 @@ bool SymGetSourceLine(duint Cip, char* FileName, int* Line, DWORD* disp)
|
|||
return false;
|
||||
|
||||
if(disp)
|
||||
*disp = 0;
|
||||
*disp = lineInfo.disp;
|
||||
|
||||
if(Line)
|
||||
*Line = lineInfo.lineNumber;
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ struct LineInfo
|
|||
{
|
||||
duint addr;
|
||||
duint size;
|
||||
duint disp;
|
||||
int lineNumber;
|
||||
String sourceFile;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -247,9 +247,10 @@ bool SymbolSourcePDB::findSourceLineInfo(duint rva, LineInfo & lineInfo)
|
|||
}
|
||||
|
||||
const auto & info = (*lines.begin()).second;
|
||||
lineInfo.addr = rva;
|
||||
lineInfo.addr = info.virtualAddress;
|
||||
lineInfo.sourceFile = info.fileName;
|
||||
lineInfo.lineNumber = info.lineNumber;
|
||||
lineInfo.disp = rva - info.virtualAddress;
|
||||
|
||||
return true;
|
||||
}
|
||||
Loading…
Reference in New Issue