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.

95 lines
3.1 KiB

  1. /*++
  2. Copyright 1996 - 1997 Microsoft Corporation
  3. Module Name:
  4. symcvt.h
  5. Abstract:
  6. This file contains all of the type definitions and prototypes
  7. necessary to access the symcvt library.
  8. Environment:
  9. Win32, User Mode
  10. --*/
  11. typedef struct tagPTRINFO {
  12. DWORD size;
  13. DWORD count;
  14. PUCHAR ptr;
  15. } PTRINFO, *PPTRINFO;
  16. typedef struct tagIMAGEPOINTERS {
  17. char szName[MAX_PATH];
  18. HANDLE hFile;
  19. HANDLE hMap;
  20. DWORD fsize;
  21. PUCHAR fptr;
  22. BOOLEAN fRomImage;
  23. PIMAGE_DOS_HEADER dosHdr;
  24. PIMAGE_NT_HEADERS ntHdr;
  25. PIMAGE_ROM_HEADERS romHdr;
  26. PIMAGE_FILE_HEADER fileHdr;
  27. PIMAGE_OPTIONAL_HEADER optHdr;
  28. PIMAGE_SEPARATE_DEBUG_HEADER sepHdr;
  29. int cDebugDir;
  30. PIMAGE_DEBUG_DIRECTORY * rgDebugDir;
  31. PIMAGE_SECTION_HEADER sectionHdrs;
  32. PIMAGE_SECTION_HEADER debugSection;
  33. PIMAGE_SYMBOL AllSymbols;
  34. PUCHAR stringTable;
  35. int numberOfSymbols;
  36. int numberOfSections;
  37. PCHAR * rgpbDebugSave;
  38. } IMAGEPOINTERS, *PIMAGEPOINTERS;
  39. #define COFF_DIR(x) ((x)->rgDebugDir[IMAGE_DEBUG_TYPE_COFF])
  40. #define CV_DIR(x) ((x)->rgDebugDir[IMAGE_DEBUG_TYPE_CODEVIEW])
  41. typedef struct _MODULEINFO {
  42. DWORD iMod;
  43. DWORD cb;
  44. DWORD SrcModule;
  45. LPSTR name;
  46. } MODULEINFO, *LPMODULEINFO;
  47. typedef struct tagPOINTERS {
  48. IMAGEPOINTERS iptrs; // input file pointers
  49. IMAGEPOINTERS optrs; // output file pointers
  50. PTRINFO pCvStart; // start of cv info
  51. PUCHAR pCvCurr; // current cv pointer
  52. PTRINFO pCvModules; // module information
  53. PTRINFO pCvSrcModules; // source module information
  54. PTRINFO pCvPublics; // publics information
  55. PTRINFO pCvSegName; // segment names
  56. PTRINFO pCvSegMap; // segment map
  57. PTRINFO pCvSymHash; // symbol hash table
  58. PTRINFO pCvAddrSort; // address sort table
  59. LPMODULEINFO pMi;
  60. DWORD modcnt;
  61. } POINTERS, *PPOINTERS;
  62. typedef char * (* CONVERTPROC) (HANDLE, char *);
  63. #define align(_n) ((4 - (( (DWORD)_n ) % 4 )) & 3)
  64. #ifdef _SYMCVT_SOURCE_
  65. #define SYMCVTAPI
  66. #else
  67. #define SYMCVTAPI DECLSPEC_IMPORT
  68. #endif
  69. PUCHAR SYMCVTAPI ConvertSymbolsForImage( HANDLE, char * );
  70. BOOL SYMCVTAPI ConvertCoffToCv( PPOINTERS p );
  71. BOOL SYMCVTAPI ConvertSymToCv( PPOINTERS p );
  72. BOOL SYMCVTAPI MapInputFile ( PPOINTERS p, HANDLE hFile, char *fname);
  73. BOOL SYMCVTAPI UnMapInputFile ( PPOINTERS p );
  74. BOOL SYMCVTAPI CalculateNtImagePointers( PIMAGEPOINTERS p );