Debugging Tools for Windows |
The GetLineByOffset and GetLineByOffsetWide methods return the source filename and the line number within the source file of an instruction in the target.
IDebugSymbols::GetLineByOffset(
IN ULONG64 Offset,
OUT OPTIONAL PULONG Line,
OUT OPTIONAL PSTR FileBuffer,
IN ULONG FileBufferSize,
OUT OPTIONAL PULONG FileSize,
OUT OPTIONAL PULONG64 Displacement
);
IdebugSymbols3::GetLineByOffsetWide(
IN ULONG64 Offset,
OUT OPTIONAL PULONG Line,
OUT OPTIONAL PWSTR FileBuffer,
IN ULONG FileBufferSize,
OUT OPTIONAL PULONG FileSize,
OUT OPTIONAL PULONG64 Displacement
);
#ifdef UNICODE
#define GetLineByOffsetT GetLineByOffsetWide
#else
#define GetLineByOffsetT GetLineByOffset
#endif
These methods can also return error values. See Return Values for more details.
GetLineByOffset is available in all versions of IDebugSymbols. GetLineByOffsetWide is available in IDebugSymbols3 and later versions.
For more information about source files, see Using Source Files.
Headers: Defined in Dbgeng.h. Include Dbgeng.h.