-
Notifications
You must be signed in to change notification settings - Fork 6
/
debkern.c
137 lines (115 loc) · 3.26 KB
/
debkern.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
/***************************************************************************
*
* Copyright (c) 1997, 1998 Timpanogas Research Group, Inc. All Rights
* Reserved.
*
* AUTHOR : Jeff V. Merkey
* FILE : DEBKERN.C
* DESCRIP : Multi-Processing Debugger Command Library for MANOS v1.0
* DATE : September 7, 1998
*
*
***************************************************************************/
#include "stdarg.h"
#include "stdio.h"
#include "stdlib.h"
#include "ctype.h"
#include "string.h"
#include "kernel.h"
#include "keyboard.h"
#include "screen.h"
#include "types.h"
#include "emit.h"
#include "os.h"
#include "dos.h"
#include "tss.h"
#include "mps.h"
#include "hal.h"
#include "xcall.h"
#include "window.h"
#include "line.h"
#include "loader.h"
#include "menu.h"
#include "rlock.h"
#include "event.h"
#include "debug.h"
#include "dparse.h"
#include "bus.h"
#include "debkern.h"
LONG displaySyncHelp(SCREEN *screen, BYTE *commandLine, DEBUGGER_PARSER *parser)
{
if (screen) {}
if (commandLine) {}
if (parser) {}
printfScreenWithAttribute(screen, LTCYAN, "sema or sema <addr> - display semaphore(s)\n");
printfScreenWithAttribute(screen, LTCYAN, "mutex or mutex <addr> - display sleep lock(s)\n");
printfScreenWithAttribute(screen, LTCYAN, "rmutex or rmutex <addr> - display recursive sleep lock(s)\n");
printfScreenWithAttribute(screen, LTCYAN, "rwlock or rwlock <addr> - display reader/writer lock(s)\n");
printfScreenWithAttribute(screen, LTCYAN, "spin or spin <addr> - display spin lock(s)\n");
return TRUE;
}
LONG displaySema(SCREEN *screen, BYTE *cmd,
StackFrame *stackFrame, LONG Exception,
DEBUGGER_PARSER *parser)
{
if (screen) {};
if (cmd) {};
if (stackFrame) {};
if (Exception) {};
if (parser) {};
return TRUE;
}
LONG displayMutex(SCREEN *screen, BYTE *cmd,
StackFrame *stackFrame, LONG Exception,
DEBUGGER_PARSER *parser)
{
if (screen) {};
if (cmd) {};
if (stackFrame) {};
if (Exception) {};
if (parser) {};
return TRUE;
}
LONG displayRMutex(SCREEN *screen, BYTE *cmd,
StackFrame *stackFrame, LONG Exception,
DEBUGGER_PARSER *parser)
{
if (screen) {};
if (cmd) {};
if (stackFrame) {};
if (Exception) {};
if (parser) {};
return TRUE;
}
LONG displayRWLock(SCREEN *screen, BYTE *cmd,
StackFrame *stackFrame, LONG Exception,
DEBUGGER_PARSER *parser)
{
LONG valid = 0;
register LONG address;
extern void RW_DISPLAY(SCREEN *, LONG);
if (screen) {};
if (cmd) {};
if (stackFrame) {};
if (Exception) {};
if (parser) {};
cmd = &cmd[parser->debugCommandNameLength];
while (*cmd && *cmd == ' ') cmd++;
address = EvaluateExpression(stackFrame, &cmd, &valid);
if (valid)
{
RW_DISPLAY(screen, address);
}
return TRUE;
}
LONG displaySpin(SCREEN *screen, BYTE *cmd,
StackFrame *stackFrame, LONG Exception,
DEBUGGER_PARSER *parser)
{
if (screen) {};
if (cmd) {};
if (stackFrame) {};
if (Exception) {};
if (parser) {};
return TRUE;
}