PRB: SymGetLineFromAddr May Fail With Error 487

ID: Q220913


The information in this article applies to:
  • Microsoft Win32 Application Programming Interface (API), included with:
    • Microsoft Windows 2000
    • Microsoft Windows versions 95, 98


SYMPTOMS

The SymGetLineFromAddr() ImageHlp API sometimes fails with error 487 when it cannot find the source line information corresponding to the specific virtual address.


CAUSE

By default the symbol handler does not load the line number information. Moreover, the symbol information for a module is positioned based on the symbol search path associated with the process.


MORE INFORMATION

An application specifies the SYMOPT_LOAD_LINES mask in the SymSetOptions() API to indicate that the symbol handler loads the line number information when the symbols are located for a module. The symbol information for a module is loaded when the bInvade parameter is passed as TRUE and SymInitialize() is called. Alternatively, an application can also use SymLoadModule to load the symbol information of a specified module or the symbol handler loads it as deferred until a reference is made requiring the symbols be loaded. If the SYMOPT_LOAD_LINES option is not set before the symbol information is loaded, the SymGetLineFromAddr() API fails and GetLastError() returns the 487 error (ERROR_INVALID_ADDRESS).

Finally, the symbol handler uses the symbol search path to locate the symbol file. If the symbol file cannot be located by the symbol handler, SymGetLineFromAddr() API fails with the same error.


REFERENCES

Q189780: PRB: SymGetSymFromAddr Fails with Error 487

Additional query words:

Keywords : kbAPI kbDebug kbKernBase
Version : winnt:
Platform : winnt
Issue type : kbprb


Last Reviewed: April 8, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.