Debugging Tools for Windows |
The GetSourceEntriesByLine and GetSourceEntriesByLineWide methods query symbol information and return locations in the target's memory that correspond to lines in a source file.
IDebugSymbols3::GetSourceEntriesByLine(
IN ULONG Line,
IN PCSTR File,
IN ULONG Flags,
OUT OPTIONAL PDEBUG_SYMBOL_SOURCE_ENTRY Entries,
IN ULONG EntriesCount,
OUT OPTIONAL PULONG EntriesAvail
);
IDebugSymbols3::GetSourceEntriesByLineWide(
IN ULONG Line,
IN PCWSTR File,
IN ULONG Flags,
OUT OPTIONAL PDEBUG_SYMBOL_SOURCE_ENTRY Entries,
IN ULONG EntriesCount,
OUT OPTIONAL PULONG EntriesAvail
);
#ifdef UNICODE
#define GetSourceEntriesByLineT GetSourceEntriesByLineWide
#else
#define GetSourceEntriesByLineT GetSourceEntriesByLine
#endif
Value | Description |
---|---|
DEBUG_GSEL_NO_SYMBOL_LOADS | The debugger engine will only search for the file among the modules whose symbols have already been loaded. Symbols for the other modules will not be loaded. If this option is not set, the debugger engine will load the symbols for all modules until it finds the file specified in File. |
DEBUG_GSEL_ALLOW_LOWER | Include all the lines in File before Line in the result. |
DEBUG_GSEL_ALLOW_HIGHER | Include all the lines in File after Line in the result. |
DEBUG_GSEL_NEAREST_ONLY | Only return at most one result. If DEBUG_GSEL_ALLOW_LOWER or DEBUG_GSEL_ALLOW_HIGHER are set, the returned result will be for a line close to Line but can not be Line if there is no symbol information for that line. |
To use the default set of flags, set Flags to DEBUG_GSEL_DEFAULT. This has all the flags in the previous table turned off.
These methods can also return error values. See Return Values for more details.
GetSourceEntriesByLine and GetSourceEntriesByLineWide are available in IDebugSymbols3 and later versions.
These methods can be used by debugger applications to fetch locations in the target's memory for setting breakpoints or matching source code with disassembled instructions. For example, setting the flags DEBUG_GSEL_ALLOW_HIGHER and DEBUG_GSEL_NEAREST_ONLY will return the target's memory location for the first piece of code starting at the specified line.
For more information about source files, see Using Source Files.
Headers: Defined in Dbgeng.h. Include Dbgeng.h.