source: trunk/src/win32k/include/probkrnl.h@ 2912

Last change on this file since 2912 was 2898, checked in by bird, 26 years ago

Symbol Database is implemented.
No scanning of the os2krnl file, the loaded image is now scaned to determin
which build, debug/retail and smp/uni.
And yet some more enhanchments like 16-bit logging.

File size: 4.3 KB
Line 
1/* $Id: probkrnl.h,v 1.11 2000-02-25 18:15:06 bird Exp $
2 *
3 * Include file for ProbKrnl.
4 *
5 * Copyright (c) 1998-2000 knut st. osmundsen (knut.stange.osmundsen@pmsc.no)
6 *
7 * Project Odin Software License can be found in LICENSE.TXT
8 *
9 */
10
11
12#ifndef _ProbKrnl_h_
13#define _ProbKrnl_h_
14
15/*******************************************************************************
16* Defined Constants And Macros *
17*******************************************************************************/
18#define NBR_OF_KRNLIMPORTS 17 /* When this is changed make sure to */
19 /* update the arrays in d32init.c and */
20 /* probkrnl32.c */
21#define MAX_LENGTH_NAME 32 /* Max length for the function. */
22
23/* Entry-Point Type flag */
24#define EPT_PROC 0x00 /* procedure - overload procedure*/
25#define EPT_PROCIMPORT 0x01 /* procedure 32bit - import only */
26#define EPT_VARIMPORT 0x02 /* variable/non-procedure 32bit - not implemented yet */
27#define EPT_32BIT 0x00 /* 16 bit entry-point */
28#define EPT_16BIT 0x80 /* 32 bit entry-point */
29#define EPT_BIT_MASK 0x80 /* Mask bit entry-point */
30#define EPT16BitEntry(a) (((a).fType & EPT_BIT_MASK) == EPT_16BIT)
31#define EPT32BitEntry(a) (((a).fType & EPT_BIT_MASK) == EPT_32BIT)
32
33/* 32bit types */
34#define EPT_PROC32 (EPT_PROC | EPT_32BIT)
35#define EPT_PROCIMPORT32 (EPT_PROCIMPORT | EPT_32BIT)
36#define EPT_VARIMPORT32 (EPT_VARIMPORT | EPT_32BIT)
37
38/* 16bit types */
39#define EPT_PROC16 (EPT_PROC | EPT_16BIT) /* no implemented yet! */
40#define EPT_PROCIMPORT16 (EPT_PROCIMPORT | EPT_16BIT) /* far proc in calltab with a far jmp. */
41#define EPT_VARIMPORT16 (EPT_VARIMPORT | EPT_16BIT)
42
43
44/*******************************************************************************
45* Structures and Typedefs *
46*******************************************************************************/
47#pragma pack(1)
48typedef struct tagIMPORTKRNLSYM
49{
50 unsigned char fFound; /* This is set when name is found */
51 unsigned char iObject; /* Object number the name was found in*/
52 unsigned short int cchName; /* Length of the name (optmize search) (INPUT) */
53 unsigned char achName[MAX_LENGTH_NAME]; /* Name (INPUT) */
54 unsigned long int offObject; /* Offset into the object */
55 unsigned long int ulAddress; /* 32-bit flat address */
56 unsigned short int usSel; /* Select of the object */
57 unsigned char cbProlog; /* Size of the prolog needing to be exchanged */
58 unsigned char fType; /* Entry-Point Type Flags */
59} IMPORTKRNLSYM;
60#pragma pack()
61
62
63/*
64 * Database of kernel symbols.
65 */
66#pragma pack(1)
67typedef struct
68{
69 unsigned short usBuild; /* Build number */
70 unsigned char chType; /* R, H, A */
71 unsigned char fSMP; /* TRUE / FALSE */
72 unsigned char cObjects; /* Count of objects */
73 struct
74 {
75 unsigned char iObject; /* Object number. */
76 unsigned long offObject; /* offset into object of the symbol. */
77 } aSyms[NBR_OF_KRNLIMPORTS];
78
79} KRNLDBENTRY, *PKRNLDBENTRY;
80#pragma pack()
81
82
83
84/*******************************************************************************
85* Global Variables *
86* NOTE! These are only available at init time! *
87*******************************************************************************/
88extern IMPORTKRNLSYM _aImportTab[NBR_OF_KRNLIMPORTS]; /* 'aImportTab' in PrbKrnl.c */
89extern unsigned short int _usBuild; /* 'ulBuild' in PrbKrnl.c */
90extern unsigned short int _usVerMajor; /* 'usVerMajor' in PrbKrnl.c */
91extern unsigned short int _usVerMinor; /* 'usVerMinor' in PrbKrnl.c */
92extern KRNLDBENTRY aKrnlSymDB[]; /* defined in symdb.c (for 16-bit usage) */
93extern KRNLDBENTRY _aKrnlSymDB[]; /* defined in symdb.c (for 32-bit usage) */
94
95
96#if defined(INCL_16) && defined(MAX_DISKDD_CMD) /* 16-bit only */
97int ProbeKernel(PRPINITIN pReqPack);
98#endif
99
100#endif
101
Note: See TracBrowser for help on using the repository browser.