source: trunk/src/kernel32/dbglocal.cpp@ 3128

Last change on this file since 3128 was 3128, checked in by sandervl, 25 years ago

handlemanager support for thread handles + WaitForSingleObject (thread) fix

File size: 2.5 KB
Line 
1/* $Id: dbglocal.cpp,v 1.4 2000-03-16 19:20:37 sandervl Exp $ */
2
3/*
4 * debug logging functions for OS/2
5 *
6 *
7 * Copyright 2000 Sander van Leeuwen
8 * Project Odin Software License can be found in LICENSE.TXT
9 */
10#include <os2wrap.h>
11#include <stdlib.h>
12#include <stdio.h>
13#include <string.h>
14#include "dbglocal.h"
15
16#ifdef DEBUG
17
18USHORT DbgEnabled[DBG_MAXFILES];
19char *DbgFileNames[DBG_MAXFILES] =
20{
21"kernel32",
22"kobjects",
23"console",
24"conin",
25"conbuffer",
26"conout",
27"unicode",
28"network",
29"hmdevio",
30"profile",
31"thread",
32"virtual",
33"thunk",
34"obsolete",
35"comm",
36"message",
37"resource",
38"exceptions",
39"heapshared",
40"cpuhlp",
41"heapcode",
42"lfile",
43"npipe",
44"oslibdos",
45"oslibmisc",
46"misc",
47"exceptutil",
48"lang",
49"iccio",
50"map",
51"win32util",
52"heap",
53"heapstring",
54"os2heap",
55"vmutex",
56"initterm",
57"handlemanager",
58"environ",
59"initsystem",
60"hmdevice",
61"hmopen32",
62"hmobjects",
63"hmevent",
64"hmmutex",
65"hmcomm",
66"semaphore",
67"wprocess",
68"conprop",
69"conprop2",
70"winimagelx",
71"winimagebase",
72"windllbase",
73"winexebase",
74"time",
75"mmap",
76"winimagepe2lx",
77"winimagepeldr",
78"windllpe2lx",
79"windlllx",
80"windllpeldr",
81"winexepe2lx",
82"winexelx",
83"winexepeldr",
84"winres",
85"critsection",
86"pefile",
87"winimgres",
88"wintls",
89"async",
90"fileio",
91"hmtoken",
92"kernelrsrc",
93"atom",
94"disk",
95"directory",
96"cvtbitmap",
97"hmmmap",
98"winfakepeldr",
99"cvtaccel",
100"cvticon",
101"cvticongrp",
102"oslibexcept",
103"cpu",
104"process",
105"cvtcursor",
106"cvtcursorgrp",
107"stubs",
108"interlock",
109"toolhelp",
110"codepage",
111"debug",
112"oslibdebug",
113"registry",
114"queue",
115"hmthread",
116"hmprocess"
117};
118//******************************************************************************
119//******************************************************************************
120void ParseLogStatus()
121{
122 char *envvar = getenv(DBG_ENVNAME);
123 char *dbgvar;
124 int i;
125
126 for(i=0;i<DBG_MAXFILES;i++) {
127 DbgEnabled[i] = 1;
128 }
129
130 if(!envvar)
131 return;
132
133 dbgvar = strstr(envvar, "dll");
134 if(dbgvar) {
135 if(*(dbgvar-1) == '-') {
136 for(i=0;i<DBG_MAXFILES;i++) {
137 DbgEnabled[i] = 0;
138 }
139 }
140 }
141 for(i=0;i<DBG_MAXFILES;i++) {
142 dbgvar = strstr(envvar, DbgFileNames[i]);
143 if(dbgvar) {
144 if(*(dbgvar-1) == '-') {
145 DbgEnabled[i] = 0;
146 }
147 else
148 if(*(dbgvar-1) == '+') {
149 DbgEnabled[i] = 1;
150 }
151 }
152 }
153}
154//******************************************************************************
155//******************************************************************************
156
157#endif
Note: See TracBrowser for help on using the repository browser.