Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

96 lines
1.9 KiB

  1. /*++
  2. Copyright (c) 1992 Microsoft Corporation
  3. Module Name:
  4. symhelp.h
  5. Abstract:
  6. Defines the interfaces to the SYMHELP dynamic link library. Useful for programs
  7. that want to maintain a debug informaiton data base.
  8. Author:
  9. Steve Wood (stevewo) 11-Mar-1994
  10. Revision History:
  11. Mike Seaman (mikese) 20-Jan-1995 Added TranslateAddress
  12. --*/
  13. #ifndef _SYMHELP_
  14. #define _SYMHELP_
  15. typedef enum _LOAD_SYMBOLS_FILTER_REASON {
  16. LoadSymbolsPathNotFound,
  17. LoadSymbolsDeferredLoad,
  18. LoadSymbolsLoad,
  19. LoadSymbolsUnload,
  20. LoadSymbolsUnableToLoad
  21. } LOAD_SYMBOLS_FILTER_REASON;
  22. typedef BOOL (*PLOAD_SYMBOLS_FILTER_ROUTINE)(
  23. HANDLE UniqueProcess,
  24. LPSTR ImageFilePath,
  25. DWORD ImageBase,
  26. DWORD ImageSize,
  27. LOAD_SYMBOLS_FILTER_REASON Reason
  28. );
  29. BOOL
  30. InitializeImageDebugInformation(
  31. IN PLOAD_SYMBOLS_FILTER_ROUTINE LoadSymbolsFilter,
  32. IN HANDLE TargetProcess,
  33. IN BOOL NewProcess,
  34. IN BOOL GetKernelSymbols
  35. );
  36. BOOL
  37. AddImageDebugInformation(
  38. IN HANDLE UniqueProcess,
  39. IN LPSTR ImageFilePath,
  40. IN DWORD ImageBase,
  41. IN DWORD ImageSize
  42. );
  43. BOOL
  44. RemoveImageDebugInformation(
  45. IN HANDLE UniqueProcess,
  46. IN LPSTR ImageFilePath,
  47. IN DWORD ImageBase
  48. );
  49. PIMAGE_DEBUG_INFORMATION
  50. FindImageDebugInformation(
  51. IN HANDLE UniqueProcess,
  52. IN DWORD Address
  53. );
  54. ULONG
  55. GetSymbolicNameForAddress(
  56. IN HANDLE UniqueProcess,
  57. IN ULONG Address,
  58. OUT LPSTR Name,
  59. IN ULONG MaxNameLength
  60. );
  61. //
  62. // The following function is essentially identical in operation to
  63. // GetSymbolicNameForAddress, except that it:
  64. //
  65. // 1. Operates only on the calling process.
  66. // 2. Does not require any previous calls to AddImageDebugInformation et al.
  67. // That is, debug information for all currently loaded modules will
  68. // be added automatically.
  69. ULONG
  70. TranslateAddress (
  71. IN ULONG Address,
  72. OUT LPSTR Name,
  73. IN ULONG MaxNameLength
  74. );
  75. #endif