Leaked source code of windows server 2003
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
3.2 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. size_t cbCvData; // size of CV data
  53. PTRINFO pCvModules; // module information
  54. PTRINFO pCvSrcModules; // source module information
  55. PTRINFO pCvPublics; // publics information
  56. PTRINFO pCvSegName; // segment names
  57. PTRINFO pCvSegMap; // segment map
  58. PTRINFO pCvSymHash; // symbol hash table
  59. PTRINFO pCvAddrSort; // address sort table
  60. LPMODULEINFO pMi;
  61. DWORD modcnt;
  62. } POINTERS, *PPOINTERS;
  63. typedef char * (* CONVERTPROC) (HANDLE, char *);
  64. #define align(_n) ((4 - (( (DWORD)_n ) % 4 )) & 3)
  65. #ifdef _SYMCVT_SOURCE_
  66. #define SYMCVTAPI
  67. #else
  68. #define SYMCVTAPI DECLSPEC_IMPORT
  69. #endif
  70. PUCHAR SYMCVTAPI ConvertSymbolsForImage( HANDLE, char * );
  71. BOOL SYMCVTAPI ConvertCoffToCv( PPOINTERS p );
  72. BOOL SYMCVTAPI ConvertSymToCv( PPOINTERS p );
  73. BOOL SYMCVTAPI MapInputFile ( PPOINTERS p, HANDLE hFile, char *fname);
  74. BOOL SYMCVTAPI UnMapInputFile ( PPOINTERS p );
  75. BOOL SYMCVTAPI CalculateNtImagePointers( PIMAGEPOINTERS p );