ReactOS  0.4.13-dev-455-g28ed234
parse.h
Go to the documentation of this file.
1 /*++
2 
3 Copyright (c) 1998-2001 Klaus P. Gerlicher
4 
5 Module Name:
6 
7  parse.h
8 
9 Abstract:
10 
11  HEADER for parse.c
12 
13 Environment:
14 
15  LINUX 2.2.X
16  Kernel mode only
17 
18 Author:
19 
20  Klaus P. Gerlicher
21 
22 Revision History:
23 
24  15-Nov-2000: general cleanup of source files
25 
26 Copyright notice:
27 
28  This file may be distributed under the terms of the GNU Public License.
29 
30 --*/
31 typedef struct TagArgs
32 {
33  ULONG Value[16];
39 }ARGS,*PARGS;
40 
41 typedef struct tagCPUInfo
42 {
43  char *Name;
45 }CPUINFO;
46 
47 typedef BOOLEAN (*PFN)(PARGS);
48 
49 #define MAX_ARGS (5)
50 
51 typedef struct _CMDTABLE
52 {
53  char * Cmd;
55  char * Help;
61 
62 typedef struct tagKeyWords
63 {
64  char* KeyWord;
67 }KEYWORDS;
68 
69 typedef struct tagSETGETREGS
70 {
71  char *RegName;
73 }SETGETREGS;
74 
75 typedef struct tag_BP
76 {
82  char ModName[256];
83  char SymName[256];
84 }BP;
85 
87 
88 extern BOOLEAN bCodeOn;
89 extern BOOLEAN bShowSrc;
90 extern BP Bp[];
91 extern BOOLEAN bInt3Here;
92 extern BOOLEAN bInt1Here;
93 
94 extern BOOLEAN bStepping;
95 
96 extern char szCurrentFile[256];
101 
103 void Parse(LPSTR pCmdLine,BOOLEAN bInvokedByFkey);
105 ULONG StrLenUpToWhiteChar(LPSTR p,LPSTR lpszWhiteChars);
106 BOOLEAN WaitForKey(void);
108 void DisplaySourceFile(LPSTR pSrcLine,LPSTR pSrcEnd,ULONG ulLineNumber,ULONG ulLineNumberToInvert);
110 void RepaintDesktop(void);
111 void PutStatusText(LPSTR p);
112 void UnassembleOneLineDown(void);
114 void UnassembleOneLineUp(void);
116 
117 extern BOOLEAN (*DisplayMemory)(PARGS pArgs);
118 
119 #define COMMAND_PROTOTYPE(arg) BOOLEAN arg(PARGS pArgs)
120 #define COMMAND_RET return TRUE
121 
122 // available commands
123 COMMAND_PROTOTYPE(ShowGdt);
124 COMMAND_PROTOTYPE(LeaveIce);
125 COMMAND_PROTOTYPE(SingleStep);
126 COMMAND_PROTOTYPE(ShowHelp);
127 COMMAND_PROTOTYPE(ShowPageDirs);
128 COMMAND_PROTOTYPE(ShowProcesses);
129 COMMAND_PROTOTYPE(DisplayMemoryDword);
130 COMMAND_PROTOTYPE(DisplayMemoryByte);
131 COMMAND_PROTOTYPE(DisplayPhysMemDword);
132 COMMAND_PROTOTYPE(Unassemble);
133 COMMAND_PROTOTYPE(ShowSymbols);
134 COMMAND_PROTOTYPE(ShowModules);
135 COMMAND_PROTOTYPE(SetBreakpoint);
136 COMMAND_PROTOTYPE(ListBreakpoints);
137 COMMAND_PROTOTYPE(ClearBreakpoints);
138 COMMAND_PROTOTYPE(Ver);
139 COMMAND_PROTOTYPE(Hboot);
140 COMMAND_PROTOTYPE(I3here);
141 COMMAND_PROTOTYPE(I1here);
142 COMMAND_PROTOTYPE(SetSrcDisplay);
143 COMMAND_PROTOTYPE(ShowIdt);
144 COMMAND_PROTOTYPE(StepOver);
145 COMMAND_PROTOTYPE(StepInto);
146 COMMAND_PROTOTYPE(SetGetRegisters);
147 COMMAND_PROTOTYPE(SetCodeDisplay);
148 COMMAND_PROTOTYPE(NextInstr);
149 COMMAND_PROTOTYPE(ShowCPU);
150 COMMAND_PROTOTYPE(ShowTables);
151 COMMAND_PROTOTYPE(WalkStack);
152 COMMAND_PROTOTYPE(ShowVirtualMemory);
153 COMMAND_PROTOTYPE(UnassembleAtCurrentEip);
154 COMMAND_PROTOTYPE(PokeMemory);
155 COMMAND_PROTOTYPE(PeekMemory);
156 COMMAND_PROTOTYPE(ShowLocals);
157 COMMAND_PROTOTYPE(SwitchTables);
158 COMMAND_PROTOTYPE(SwitchFiles);
160 COMMAND_PROTOTYPE(SizeCodeWindow);
161 COMMAND_PROTOTYPE(SizeDataWindow);
163 COMMAND_PROTOTYPE(ShowMappings);
164 COMMAND_PROTOTYPE(ShowTimers);
165 COMMAND_PROTOTYPE(ShowPCI);
167 COMMAND_PROTOTYPE(ShowSysCallTable);
168 COMMAND_PROTOTYPE(SetAltKey);
169 COMMAND_PROTOTYPE(ShowContext);
170 
171 //ei - make sure the following correspond to ntoskrnl/mm/i386/page.c
172 //sedwards - Dont use them if you dont need them. Use DDK headers instead.
173 #define PAGETABLE_MAP (0xf0000000)
174 #define PAGEDIRECTORY_MAP (0xf0000000 + (PAGETABLE_MAP / (1024)))
175 //#define PAGE_SHIFT 12
176 #define PTRS_PER_PTE 1024
177 //#define PAGE_SIZE (1UL << PAGE_SHIFT)
178 #define ADDR_TO_PAGE_TABLE(v) (((ULONG)(v)) / (4 * 1024 * 1024))
179 #define ADDR_TO_PDE(v) (PULONG)(PAGEDIRECTORY_MAP + \
180  (((ULONG)v / (1024 * 1024))&(~0x3)))
181 #define ADDR_TO_PTE(v) (PULONG)(PAGETABLE_MAP + ((((ULONG)v / 1024))&(~0x3)))
182 #define ADDR_TO_PDE_OFFSET(v) (((ULONG)v / (4 * 1024 * 1024)))
ULONG Count
Definition: parse.h:34
char * KeyWord
Definition: parse.h:64
LIST_ENTRY * pPsProcessListHead
Definition: utils.h:301
ULONG CountSwitches
Definition: parse.h:36
struct TagArgs ARGS
void UnassembleOneLineDown(void)
Definition: parse.c:1413
BOOLEAN AsciiToHex(LPSTR p, PULONG pValue)
char ModName[256]
Definition: parse.h:82
ULONG ParamFlags[MAX_ARGS]
Definition: parse.h:57
BOOLEAN bInt3Here
Definition: parse.c:64
struct _CMDTABLE CMDTABLE
char szCurrentFile[256]
Definition: mplay32.c:29
struct _CMDTABLE * PCMDTABLE
ULONG CommandGroup
Definition: parse.h:59
char * LPSTR
Definition: xmlstorage.h:182
Definition: parse.h:75
PDEBUG_MODULE pCurrentMod
Definition: parse.c:59
int EvaluateExpression(char *pExpression, char **pNext)
Definition: hpp.c:253
char * Cmd
Definition: parse.h:53
ULONG Segment
Definition: parse.h:78
BP Bp[]
Definition: parse.c:245
BOOLEAN bShowSrc
Definition: parse.c:252
long LONG
Definition: pedump.c:60
void UnassembleOnePageDown(ULONG page)
Definition: parse.c:1436
LONG ulCurrentlyDisplayedLineNumber
Definition: parse.c:46
struct tag_BP BP
struct tagCPUInfo CPUINFO
unsigned char BOOLEAN
void UnassembleOneLineUp(void)
Definition: parse.c:1460
BOOLEAN bStepping
Definition: parse.c:63
static VOID ClearScreen(IN HANDLE hConOut, IN PCONSOLE_SCREEN_BUFFER_INFO pcsbi)
Definition: mode.c:203
Definition: module.h:566
BOOLEAN WaitForKey(void)
Definition: parse.c:374
struct tagSETGETREGS SETGETREGS
BOOLEAN(* DisplayMemory)(PARGS pArgs)
Definition: parse.c:56
char * RegName
Definition: parse.h:71
void PutStatusText(LPSTR p)
Definition: parse.c:360
PVOID pValue
Definition: parse.h:65
BOOLEAN bNotTranslated[16]
Definition: parse.h:37
void DisplaySourceFile(LPSTR pSrcLine, LPSTR pSrcEnd, ULONG ulLineNumber, ULONG ulLineNumberToInvert)
Definition: parse.c:1313
BOOLEAN ConvertTokenToHex(LPSTR p, PULONG pValue)
Definition: parse.c:3346
void RepaintDesktop(void)
Definition: parse.c:324
BOOLEAN Active
Definition: parse.h:80
ULONG Offset
Definition: parse.h:78
Definition: parse.h:31
PICE_SYMBOLFILE_HEADER * pCurrentSymbols
Definition: parse.c:60
BOOLEAN ConvertTokenToSrcFile(LPSTR p, PULONG pValue)
Definition: parse.c:3693
unsigned char UCHAR
Definition: xmlstorage.h:181
ULONG StrLenUpToWhiteChar(LPSTR p, LPSTR lpszWhiteChars)
Definition: parse.c:3816
void Parse(LPSTR pCmdLine, BOOLEAN bInvokedByFkey)
Definition: parse.c:3828
BOOLEAN bNeedToFillBuffer
Definition: parse.c:254
BOOLEAN Used
Definition: parse.h:79
ULONG Flags
Definition: parse.h:56
struct TagArgs * PARGS
void UnassembleOnePageUp(ULONG page)
Definition: parse.c:1513
Definition: typedefs.h:117
ULONG ulSize
Definition: parse.h:66
ULONG LinearAddress
Definition: parse.h:77
#define MAX_ARGS
Definition: parse.h:49
#define COMMAND_PROTOTYPE(arg)
Definition: parse.h:119
BOOLEAN(* PFN)(PARGS)
Definition: parse.h:47
char * Name
Definition: parse.h:43
char * Help
Definition: parse.h:55
PFN Handler
Definition: parse.h:54
ULONG Value[16]
Definition: parse.h:33
BOOLEAN bCodeOn
Definition: parse.c:253
struct tagKeyWords KEYWORDS
unsigned int * PULONG
Definition: retypes.h:1
LPSTR pToken[16]
Definition: parse.h:38
#define BOOLEAN
Definition: pedump.c:73
unsigned int ULONG
Definition: retypes.h:1
PULONG RegAddr
Definition: parse.h:72
GLfloat GLfloat p
Definition: glext.h:8902
LPSTR FindCommand(LPSTR p)
Definition: parse.c:3252
UCHAR Switch[16]
Definition: parse.h:35
PULONG pValue
Definition: parse.h:44
static VOID SetKeyboardLayout(HWND hwnd)
Definition: livecd.c:285
char SymName[256]
Definition: parse.h:83
LPSTR pszRecognizedSwitches
Definition: parse.h:58
BOOLEAN Virtual
Definition: parse.h:81
BOOLEAN bInt1Here
Definition: parse.c:65