Build the debugger as a .so.
[wine/multimedia.git] / debugger / dbgmain.c
blob73b1ef059f9a6b1eb9afd2a8d45f46f1d2d06dd2
1 /*
2 * File dbgmain.c - main wrapper for internal debugger test bed.
4 * Copyright (C) 1997, Eric Youngdale.
5 */
6 #include <signal.h>
7 #include <X11/Xlib.h>
8 #include "config.h"
9 #include "ldt.h"
10 #include "windows.h"
11 #include "toolhelp.h"
12 #include "debugger.h"
13 #include "win.h"
15 ldt_copy_entry ldt_copy[LDT_SIZE];
16 unsigned char ldt_flags_copy[LDT_SIZE];
18 Display * display;
20 int
21 XUngrabServer( Display * d )
23 return(0);
26 int
27 XFlush(Display * d )
29 return(0);
32 HTASK16 GetCurrentTask(void)
34 exit(0);
37 HMODULE16 GetExePtr(HANDLE16 h)
39 exit(0);
42 int PROFILE_GetWineIniString( const char *section, const char *key_name,
43 const char *def, char *buffer, int len )
45 exit(0);
49 void CLASS_DumpClass( struct tagCLASS *class )
51 exit(0);
54 void MODULE_DumpModule( HMODULE16 hmodule )
56 exit(0);
59 void QUEUE_DumpQueue( HQUEUE16 hQueue )
61 exit(0);
64 void WIN_DumpWindow( HWND hwnd )
66 exit(0);
70 void CLASS_WalkClasses(void)
72 exit(0);
75 void MODULE_WalkModules(void)
77 exit(0);
80 void QUEUE_WalkQueues(void)
82 exit(0);
85 void WIN_WalkWindows( HWND hwnd, int indent )
87 exit(0);
90 NE_MODULE *NE_GetPtr( HMODULE16 hModule )
92 exit(0);
95 FARPROC16 NE_GetEntryPoint( HMODULE16 hModule, WORD ordinal )
97 exit(0);
100 void LDT_Print( int start, int length )
102 exit(0);
105 LPVOID GlobalLock16(HGLOBAL16 h)
107 exit(0);
110 BOOL16 ModuleFirst16(MODULEENTRY *lpModule)
112 return 0;
115 BOOL16 ModuleNext16(MODULEENTRY *lpModule)
117 return 0;
120 BOOL16 IsBadReadPtr16(SEGPTR s,UINT16 o)
122 exit(0);
125 BOOL IsBadReadPtr(LPCVOID s,UINT o)
127 exit(0);
130 struct qwert
132 unsigned flag1:1;
133 unsigned flag3:3;
134 signed remain:11;
135 unsigned whatsup:17;
136 } vvv;
138 int xyzzy(const char * qwe, int ijk)
140 return strlen(qwe) + ijk;
143 unsigned int * xxx;
144 unsigned int * yyy;
146 int xxx3[10];
148 char vdv[100];
150 struct deferred_debug_info
152 struct deferred_debug_info * next;
153 char * load_addr;
154 char * module_name;
155 char * dbg_info;
156 int dbg_size;
157 PIMAGE_DEBUG_DIRECTORY dbgdir;
158 struct pe_data * pe;
159 PIMAGE_SECTION_HEADER sectp;
160 int nsect;
161 short int dbg_index;
162 char loaded;
165 struct CodeViewDebug
167 char cv_nbtype[8];
168 unsigned int cv_timestamp;
169 char cv_unknown[4];
170 char cv_name[1];
173 test_pdbstuff(void)
175 struct deferred_debug_info deefer;
176 IMAGE_DEBUG_DIRECTORY dinfo;
177 struct CodeViewDebug cdebug;
178 IMAGE_SECTION_HEADER sects[10];
180 memset(&deefer, 0, sizeof(deefer));
181 memset(&dinfo, 0, sizeof(dinfo));
182 memset(&cdebug, 0, sizeof(cdebug));
183 memset(&sects, 0, sizeof(sects));
185 deefer.dbg_info = (char *) &cdebug;
186 dinfo.TimeStamp = 812932395;
187 cdebug.cv_timestamp = 833392137 /* 841951397 */;
188 deefer.dbgdir = &dinfo;
189 deefer.sectp = sects;
190 deefer.nsect = 10;
192 DEBUG_InitTypes();
193 DEBUG_ProcessPDBFile(&deefer, "../dumpexe.pdb");
197 main(int argc, char * argv[])
199 SIGCONTEXT reg;
201 strcpy(vdv, "This is a test");
202 memset(&vvv, 0xff, sizeof(vvv));
203 vvv.whatsup = 0;
204 vvv.flag3 = 0;
205 vvv.remain = 0x401;
206 argv0 = argv[0];
207 xxx = (unsigned int*) &vvv;
208 yyy = xxx + 5;
209 xxx3[5] = 7;
211 test_pdbstuff();
213 memset(&reg, 0, sizeof(reg));
214 wine_debug(SIGSEGV, &reg);
215 return 0;