ReactOS  0.4.14-dev-77-gd9e7c48
shared.h
Go to the documentation of this file.
1 /*++
2 
3 Copyright (c) 1998-2001 Klaus P. Gerlicher
4 
5 Module Name:
6 
7  shared.h
8 
9 Abstract:
10 
11  shared stuff between module and loader
12 
13 Environment:
14 
15  LINUX 2.2.X
16  Kernel mode only
17 
18 Author:
19 
20  Klaus P. Gerlicher
21 
22  reactos port by:
23  Eugene Ingerman
24 
25 Revision History:
26 
27  13-Nov-1999: created
28  15-Nov-2000: general cleanup of source files
29 
30  10/20/2001: porting to reactos begins
31 
32 Copyright notice:
33 
34  This file may be distributed under the terms of the GNU Public License.
35 
36 --*/
37 
38 //#include <ntddk.h>
39 //#include <winnt.h>
40 
41 //temporary
42 #ifndef CTL_CODE
43 #define CTL_CODE(Dev, Func, Meth, Acc) ( ((Dev)<<16) | ((Acc)<<14) | ((Func)<<2) | (Meth))
44 // IOCTL Parameter buffering methods
45 #define METHOD_BUFFERED 0
46 #define METHOD_IN_DIRECT 1
47 #define METHOD_OUT_DIRECT 2
48 #define METHOD_NEITHER 3
49 
50 // IOCTL File access type
51 #define FILE_ANY_ACCESS 0
52 #define FILE_READ_ACCESS 1
53 #define FILE_WRITE_ACCESS 2
54 #endif
55 
56 // define custom device type
57 #define PICE_DEVICE_DEBUGGER 64787
58 
59 #define PICE_IOCTL_LOAD CTL_CODE(PICE_DEVICE_DEBUGGER, 2049, METHOD_BUFFERED, FILE_ANY_ACCESS)
60 #define PICE_IOCTL_UNLOAD CTL_CODE(PICE_DEVICE_DEBUGGER, 2050, METHOD_BUFFERED, FILE_ANY_ACCESS)
61 #define PICE_IOCTL_RELOAD CTL_CODE(PICE_DEVICE_DEBUGGER, 2051, METHOD_BUFFERED, FILE_ANY_ACCESS)
62 #define PICE_IOCTL_BREAK CTL_CODE(PICE_DEVICE_DEBUGGER, 2052, METHOD_BUFFERED, FILE_ANY_ACCESS)
63 #define PICE_IOCTL_STATUS CTL_CODE(PICE_DEVICE_DEBUGGER, 2053, METHOD_BUFFERED, FILE_ANY_ACCESS)
64 
65 
66 typedef struct _DEBUGGER_STATUS_BLOCK
67 {
68  char filename[256];
70 
71 #define MAGIC_ULONG( ch0, ch1, ch2, ch3 ) \
72  ( (ULONG)(UCHAR)(ch0) | \
73  ( (ULONG)(UCHAR)(ch1) << 8 ) | \
74  ( (ULONG)(UCHAR)(ch2) << 16 ) | \
75  ( (ULONG)(UCHAR)(ch3) << 24 ) )
76 
77 #define PICE_MAGIC MAGIC_ULONG('P','I','C','E')
78 
79 #define DEBUG_MODULE_NAME_LEN 32
81 {
91 
92 typedef struct _STAB_ENTRY
93 {
94  unsigned long n_strx;
95  unsigned char n_type;
96  unsigned char n_other;
97  unsigned short n_desc;
98  unsigned long n_value;
100 
102 {
103  char filename[256];
106 
107 
108 
109 
110 
112 // serial stuff
113 typedef struct _SERIAL_PACKET_HEADER
114 {
119 
120 typedef struct _SERIAL_PACKET
121 {
125 
126 #define ACK (0)
127 
128 typedef enum _ECOLORS
129 {
130  BLACK = 0,
146 }ECOLORS;
147 
148 typedef struct _SERIAL_DATA_PACKET
149 {
153 
154 #define PACKET_TYPE_CLRLINE (0)
156 {
161 
162 #define PACKET_TYPE_PRINT (1)
164 {
169  UCHAR string[1];
171 
172 #define PACKET_TYPE_CONNECT (2)
174 {
178 
179 #define PACKET_TYPE_CURSOR (3)
181 {
185 
186 #define PACKET_TYPE_INVERTLINE (4)
188 {
192 
193 #define PACKET_TYPE_POLL (5)
195 {
199 
200 // END of serial stuff
202 
203 
204 // EOF
struct _SERIAL_DATA_PACKET_INVERTLINE * PSERIAL_DATA_PACKET_INVERTLINE
Definition: shared.h:132
ULONG ulSizeOfStabsStrings
Definition: shared.h:88
unsigned short n_desc
Definition: shared.h:97
Definition: shared.h:131
Definition: shared.h:133
struct _SERIAL_DATA_PACKET * PSERIAL_DATA_PACKET
struct _SERIAL_DATA_PACKET SERIAL_DATA_PACKET
struct _SERIAL_DATA_PACKET_CLRLINE * PSERIAL_DATA_PACKET_CLRLINE
ULONG ulOffsetToSrcFiles
Definition: shared.h:89
ULONG ulNumberOfSrcFiles
Definition: shared.h:89
SERIAL_PACKET_HEADER header
Definition: shared.h:122
const char * filename
Definition: ioapi.h:135
Definition: shared.h:137
struct _SERIAL_PACKET SERIAL_PACKET
_ECOLORS
Definition: shared.h:128
unsigned long n_value
Definition: shared.h:98
struct _SERIAL_DATA_PACKET_POLL * PSERIAL_DATA_PACKET_POLL
Definition: shared.h:141
struct _STAB_ENTRY STAB_ENTRY
struct _SERIAL_PACKET_HEADER SERIAL_PACKET_HEADER
#define DEBUG_MODULE_NAME_LEN
Definition: shared.h:79
struct _SERIAL_DATA_PACKET_INVERTLINE SERIAL_DATA_PACKET_INVERTLINE
Definition: shared.h:130
struct _SERIAL_DATA_PACKET_CURSOR * PSERIAL_DATA_PACKET_CURSOR
struct _STAB_ENTRY * PSTAB_ENTRY
Definition: shared.h:136
struct _DEBUGGER_STATUS_BLOCK * PDEBUGGER_STATUS_BLOCK
unsigned char n_other
Definition: shared.h:96
struct _SERIAL_DATA_PACKET_CONNECT SERIAL_DATA_PACKET_CONNECT
struct _SERIAL_PACKET * PSERIAL_PACKET
__wchar_t WCHAR
Definition: xmlstorage.h:180
struct _SERIAL_DATA_PACKET_CLRLINE SERIAL_DATA_PACKET_CLRLINE
struct _SERIAL_PACKET_HEADER * PSERIAL_PACKET_HEADER
struct _PICE_SYMBOLFILE_HEADER PICE_SYMBOLFILE_HEADER
enum _ECOLORS ECOLORS
Definition: shared.h:142
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
ULONG ulOffsetToStabsStrings
Definition: shared.h:88
Definition: shared.h:139
unsigned char UCHAR
Definition: xmlstorage.h:181
unsigned long n_strx
Definition: shared.h:94
Definition: shared.h:145
struct _SERIAL_DATA_PACKET_PRINT SERIAL_DATA_PACKET_PRINT
struct _SERIAL_DATA_PACKET_POLL SERIAL_DATA_PACKET_POLL
Definition: shared.h:92
struct _SERIAL_DATA_PACKET_CONNECT * PSERIAL_DATA_PACKET_CONNECT
Definition: shared.h:135
unsigned short USHORT
Definition: pedump.c:61
ULONG packet_header_chksum
Definition: shared.h:116
struct _SERIAL_DATA_PACKET_CURSOR SERIAL_DATA_PACKET_CURSOR
struct _PICE_SYMBOLFILE_SOURCE PICE_SYMBOLFILE_SOURCE
struct _DEBUGGER_STATUS_BLOCK DEBUGGER_STATUS_BLOCK
Definition: name.c:36
Definition: shared.h:138
unsigned int ULONG
Definition: retypes.h:1
struct _SERIAL_DATA_PACKET_PRINT * PSERIAL_DATA_PACKET_PRINT
Definition: shared.h:144
unsigned char n_type
Definition: shared.h:95
ULONG ulSizeOfGlobalsStrings
Definition: shared.h:86
ULONG ulOffsetToGlobalsStrings
Definition: shared.h:86
Definition: shared.h:134