Added the TEXT() and MAKELRESULT() definitions.
[wine/multimedia.git] / debugger / dbgmain.c
blobc372c0c7f2860856242c7474d4c53bbe410adafb
1 /*
2 * File dbgmain.c - main wrapper for internal debugger test bed.
4 * Copyright (C) 1997, Eric Youngdale.
5 */
6 #include <signal.h>
8 #include <ldt.h>
9 #include "windows.h"
10 #include "toolhelp.h"
11 #include "module.h"
12 #include "debugger.h"
13 #include "class.h"
14 #include <X11/Xlib.h>
16 #include "debugger.h"
17 #include "peexe.h"
18 #include "pe_image.h"
20 ldt_copy_entry ldt_copy[LDT_SIZE];
21 unsigned char ldt_flags_copy[LDT_SIZE];
23 Display * display;
25 int
26 XUngrabServer( Display * d )
28 return(0);
31 int
32 XFlush(Display * d )
34 return(0);
37 HTASK16 GetCurrentTask()
39 exit(0);
42 HMODULE16 GetExePtr(HANDLE16 h)
44 exit(0);
47 int PROFILE_GetWineIniString( const char *section, const char *key_name,
48 const char *def, char *buffer, int len )
50 exit(0);
54 void CLASS_DumpClass( CLASS *class )
56 exit(0);
59 void MODULE_DumpModule( HMODULE16 hmodule )
61 exit(0);
64 void QUEUE_DumpQueue( HQUEUE16 hQueue )
66 exit(0);
69 void WIN_DumpWindow( HWND32 hwnd )
71 exit(0);
75 void CLASS_WalkClasses()
77 exit(0);
80 void MODULE_WalkModules()
82 exit(0);
85 void QUEUE_WalkQueues()
87 exit(0);
90 void WIN_WalkWindows( HWND32 hwnd, int indent )
92 exit(0);
95 NE_MODULE *NE_GetPtr( HMODULE16 hModule )
97 exit(0);
100 FARPROC16 NE_GetEntryPoint( HMODULE16 hModule, WORD ordinal )
102 exit(0);
105 void LDT_Print( int start, int length )
107 exit(0);
110 LPVOID GlobalLock16(HGLOBAL16 h)
112 exit(0);
115 BOOL16 ModuleFirst(MODULEENTRY *lpModule)
117 return 0;
120 BOOL16 ModuleNext(MODULEENTRY *lpModule)
122 return 0;
125 BOOL16 IsBadReadPtr16(SEGPTR s,UINT16 o)
127 exit(0);
130 BOOL32 IsBadReadPtr32(LPCVOID s,UINT32 o)
132 exit(0);
135 struct qwert
137 unsigned flag1:1;
138 unsigned flag3:3;
139 signed remain:11;
140 unsigned whatsup:17;
141 } vvv;
143 int xyzzy(const char * qwe, int ijk)
145 return strlen(qwe) + ijk;
148 unsigned int * xxx;
149 unsigned int * yyy;
151 int xxx3[10];
153 char vdv[100];
155 struct deferred_debug_info
157 struct deferred_debug_info * next;
158 char * load_addr;
159 char * module_name;
160 char * dbg_info;
161 int dbg_size;
162 PIMAGE_DEBUG_DIRECTORY dbgdir;
163 struct pe_data * pe;
164 PIMAGE_SECTION_HEADER sectp;
165 int nsect;
166 short int dbg_index;
167 char loaded;
170 struct CodeViewDebug
172 char cv_nbtype[8];
173 unsigned int cv_timestamp;
174 char cv_unknown[4];
175 char cv_name[1];
178 test_pdbstuff()
180 struct deferred_debug_info deefer;
181 IMAGE_DEBUG_DIRECTORY dinfo;
182 struct CodeViewDebug cdebug;
183 IMAGE_SECTION_HEADER sects[10];
185 memset(&deefer, 0, sizeof(deefer));
186 memset(&dinfo, 0, sizeof(dinfo));
187 memset(&cdebug, 0, sizeof(cdebug));
188 memset(&sects, 0, sizeof(sects));
190 deefer.dbg_info = (char *) &cdebug;
191 dinfo.TimeStamp = 812932395;
192 cdebug.cv_timestamp = 833392137 /* 841951397 */;
193 deefer.dbgdir = &dinfo;
194 deefer.sectp = sects;
195 deefer.nsect = 10;
197 DEBUG_InitTypes();
198 DEBUG_ProcessPDBFile(&deefer, "../dumpexe.pdb");
202 main(int argc, char * argv[])
204 extern char * DEBUG_argv0;
205 SIGCONTEXT reg;
207 strcpy(vdv, "This is a test");
208 memset(&vvv, 0xff, sizeof(vvv));
209 vvv.whatsup = 0;
210 vvv.flag3 = 0;
211 vvv.remain = 0x401;
212 DEBUG_argv0 = argv[0];
213 xxx = (unsigned int*) &vvv;
214 yyy = xxx + 5;
215 xxx3[5] = 7;
217 test_pdbstuff();
219 memset(&reg, 0, sizeof(reg));
220 wine_debug(SIGSEGV, &reg);
221 return 0;