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.

100 lines
1.9 KiB

  1. /*++
  2. Copyright (c) 1992 Microsoft Corporation
  3. Module Name:
  4. debug.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 _DEBUGFILE_
  14. #define _DEBUGFILE_
  15. #include <debnot.h>
  16. #ifndef _WIN64
  17. typedef enum _LOAD_SYMBOLS_FILTER_REASON {
  18. LoadSymbolsPathNotFound,
  19. LoadSymbolsDeferredLoad,
  20. LoadSymbolsLoad,
  21. LoadSymbolsUnload,
  22. LoadSymbolsUnableToLoad
  23. } LOAD_SYMBOLS_FILTER_REASON;
  24. typedef BOOL (*PLOAD_SYMBOLS_FILTER_ROUTINE)(
  25. HANDLE UniqueProcess,
  26. LPSTR ImageFilePath,
  27. DWORD ImageBase,
  28. DWORD ImageSize,
  29. LOAD_SYMBOLS_FILTER_REASON Reason
  30. );
  31. BOOL
  32. InitializeImageDebugInformation(
  33. IN PLOAD_SYMBOLS_FILTER_ROUTINE LoadSymbolsFilter,
  34. IN HANDLE TargetProcess,
  35. IN BOOL NewProcess,
  36. IN BOOL GetKernelSymbols
  37. );
  38. BOOL
  39. AddImageDebugInformation(
  40. IN HANDLE UniqueProcess,
  41. IN LPSTR ImageFilePath,
  42. IN DWORD ImageBase,
  43. IN DWORD ImageSize
  44. );
  45. BOOL
  46. RemoveImageDebugInformation(
  47. IN HANDLE UniqueProcess,
  48. IN LPSTR ImageFilePath,
  49. IN DWORD ImageBase
  50. );
  51. PIMAGE_DEBUG_INFORMATION
  52. FindImageDebugInformation(
  53. IN HANDLE UniqueProcess,
  54. IN DWORD Address
  55. );
  56. ULONG
  57. GetSymbolicNameForAddress(
  58. IN HANDLE UniqueProcess,
  59. IN ULONG Address,
  60. OUT LPSTR Name,
  61. IN ULONG MaxNameLength
  62. );
  63. //
  64. // The following function is essentially identical in operation to
  65. // GetSymbolicNameForAddress, except that it:
  66. //
  67. // 1. Operates only on the calling process.
  68. // 2. Does not require any previous calls to AddImageDebugInformation et al.
  69. // That is, debug information for all currently loaded modules will
  70. // be added automatically.
  71. ULONG
  72. TranslateAddress (
  73. IN ULONG Address,
  74. OUT LPSTR Name,
  75. IN ULONG MaxNameLength
  76. );
  77. #endif
  78. #endif