Check if 'GLX_ARB_get_proc_address' is supported before using
[wine/multimedia.git] / server / trace.c
blob5c7970c4cae0472dc239a87fa21067811fc5fb63
1 /*
2 * Server request tracing
4 * Copyright (C) 1999 Alexandre Julliard
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 #include "config.h"
22 #include "wine/port.h"
24 #include <ctype.h>
25 #include <stdio.h>
26 #include <sys/types.h>
28 #ifdef HAVE_SYS_UIO_H
29 #include <sys/uio.h>
30 #endif
33 #include "windef.h"
34 #include "winbase.h"
35 #include "wincon.h"
36 #include "request.h"
37 #include "unicode.h"
39 static int cur_pos;
40 static const void *cur_data;
41 static int cur_size;
43 /* utility functions */
45 inline static void remove_data( size_t size )
47 cur_data = (const char *)cur_data + size;
48 cur_size -= size;
51 static void dump_uints( const int *ptr, int len )
53 fputc( '{', stderr );
54 while (len > 0)
56 fprintf( stderr, "%08x", *ptr++ );
57 if (--len) fputc( ',', stderr );
59 fputc( '}', stderr );
62 static void dump_abs_time( const abs_time_t *time )
64 struct timeval tv;
65 int secs, usecs;
67 if (!time->sec && !time->usec)
69 fprintf( stderr, "0" );
70 return;
72 gettimeofday( &tv, NULL );
73 secs = time->sec - tv.tv_sec;
74 if ((usecs = time->usec - tv.tv_usec) < 0)
76 usecs += 1000000;
77 secs--;
79 if (secs > 0 || (secs == 0 && usecs >= 0))
80 fprintf( stderr, "%d.%06d (+%d.%06d)", time->sec, time->usec, secs, usecs );
81 else
82 fprintf( stderr, "%d.%06d (-%d.%06d)", time->sec, time->usec, abs(secs+1), 1000000-usecs );
85 static void dump_rectangle( const rectangle_t *rect )
87 fprintf( stderr, "{%d,%d;%d,%d}",
88 rect->left, rect->top, rect->right, rect->bottom );
91 static void dump_char_info( const char_info_t *info )
93 fprintf( stderr, "{'" );
94 dump_strW( &info->ch, 1, stderr, "\'\'" );
95 fprintf( stderr, "',%04x}", info->attr );
98 static void dump_context( const CONTEXT *context )
100 #ifdef __i386__
101 fprintf( stderr, "{flags=%08lx,eax=%08lx,ebx=%08lx,ecx=%08lx,edx=%08lx,esi=%08lx,edi=%08lx,"
102 "ebp=%08lx,eip=%08lx,esp=%08lx,eflags=%08lx,cs=%04lx,ds=%04lx,es=%04lx,"
103 "fs=%04lx,gs=%04lx,dr0=%08lx,dr1=%08lx,dr2=%08lx,dr3=%08lx,dr6=%08lx,dr7=%08lx,",
104 context->ContextFlags, context->Eax, context->Ebx, context->Ecx, context->Edx,
105 context->Esi, context->Edi, context->Ebp, context->Eip, context->Esp, context->EFlags,
106 context->SegCs, context->SegDs, context->SegEs, context->SegFs, context->SegGs,
107 context->Dr0, context->Dr1, context->Dr2, context->Dr3, context->Dr6, context->Dr7 );
108 fprintf( stderr, "float=" );
109 dump_uints( (int *)&context->FloatSave, sizeof(context->FloatSave) / sizeof(int) );
110 fprintf( stderr, "}" );
111 #else
112 dump_uints( (int *)context, sizeof(*context) / sizeof(int) );
113 #endif
116 static void dump_exc_record( const EXCEPTION_RECORD *rec )
118 int i;
119 fprintf( stderr, "{code=%lx,flags=%lx,rec=%p,addr=%p,params={",
120 rec->ExceptionCode, rec->ExceptionFlags, rec->ExceptionRecord,
121 rec->ExceptionAddress );
122 for (i = 0; i < min(rec->NumberParameters,EXCEPTION_MAXIMUM_PARAMETERS); i++)
124 if (i) fputc( ',', stderr );
125 fprintf( stderr, "%lx", rec->ExceptionInformation[i] );
127 fputc( '}', stderr );
130 static void dump_varargs_ints( size_t size )
132 const int *data = cur_data;
133 size_t len = size / sizeof(*data);
135 fputc( '{', stderr );
136 while (len > 0)
138 fprintf( stderr, "%d", *data++ );
139 if (--len) fputc( ',', stderr );
141 fputc( '}', stderr );
142 remove_data( size );
145 static void dump_varargs_handles( size_t size )
147 const obj_handle_t *data = cur_data;
148 size_t len = size / sizeof(*data);
150 fputc( '{', stderr );
151 while (len > 0)
153 fprintf( stderr, "%p", *data++ );
154 if (--len) fputc( ',', stderr );
156 fputc( '}', stderr );
157 remove_data( size );
160 static void dump_varargs_user_handles( size_t size )
162 const user_handle_t *data = cur_data;
163 size_t len = size / sizeof(*data);
165 fputc( '{', stderr );
166 while (len > 0)
168 fprintf( stderr, "%p", *data++ );
169 if (--len) fputc( ',', stderr );
171 fputc( '}', stderr );
172 remove_data( size );
175 static void dump_varargs_bytes( size_t size )
177 const unsigned char *data = cur_data;
178 size_t len = size;
180 fputc( '{', stderr );
181 while (len > 0)
183 fprintf( stderr, "%02x", *data++ );
184 if (--len) fputc( ',', stderr );
186 fputc( '}', stderr );
187 remove_data( size );
190 static void dump_varargs_string( size_t size )
192 fprintf( stderr, "\"%.*s\"", (int)size, (char *)cur_data );
193 remove_data( size );
196 static void dump_varargs_unicode_str( size_t size )
198 fprintf( stderr, "L\"" );
199 dump_strW( cur_data, size / sizeof(WCHAR), stderr, "\"\"" );
200 fputc( '\"', stderr );
201 remove_data( size );
204 static void dump_varargs_context( size_t size )
206 if (!size)
208 fprintf( stderr, "{}" );
209 return;
211 dump_context( cur_data );
212 remove_data( size );
215 static void dump_varargs_exc_event( size_t size )
217 const CONTEXT *ptr = cur_data;
219 if (!size)
221 fprintf( stderr, "{}" );
222 return;
224 fprintf( stderr, "{context=" );
225 dump_context( ptr );
226 fprintf( stderr, ",rec=" );
227 dump_exc_record( (EXCEPTION_RECORD *)(ptr + 1) );
228 fputc( '}', stderr );
229 remove_data( size );
232 static void dump_varargs_debug_event( size_t size )
234 const debug_event_t *event = cur_data;
236 if (!size)
238 fprintf( stderr, "{}" );
239 return;
241 switch(event->code)
243 case EXCEPTION_DEBUG_EVENT:
244 fprintf( stderr, "{exception," );
245 dump_exc_record( &event->info.exception.record );
246 fprintf( stderr, ",first=%d}", event->info.exception.first );
247 break;
248 case CREATE_THREAD_DEBUG_EVENT:
249 fprintf( stderr, "{create_thread,thread=%p,teb=%p,start=%p}",
250 event->info.create_thread.handle, event->info.create_thread.teb,
251 event->info.create_thread.start );
252 break;
253 case CREATE_PROCESS_DEBUG_EVENT:
254 fprintf( stderr, "{create_process,file=%p,process=%p,thread=%p,base=%p,offset=%d,"
255 "size=%d,teb=%p,start=%p,name=%p,unicode=%d}",
256 event->info.create_process.file, event->info.create_process.process,
257 event->info.create_process.thread, event->info.create_process.base,
258 event->info.create_process.dbg_offset, event->info.create_process.dbg_size,
259 event->info.create_process.teb, event->info.create_process.start,
260 event->info.create_process.name, event->info.create_process.unicode );
261 break;
262 case EXIT_THREAD_DEBUG_EVENT:
263 fprintf( stderr, "{exit_thread,code=%d}", event->info.exit.exit_code );
264 break;
265 case EXIT_PROCESS_DEBUG_EVENT:
266 fprintf( stderr, "{exit_process,code=%d}", event->info.exit.exit_code );
267 break;
268 case LOAD_DLL_DEBUG_EVENT:
269 fprintf( stderr, "{load_dll,file=%p,base=%p,offset=%d,size=%d,name=%p,unicode=%d}",
270 event->info.load_dll.handle, event->info.load_dll.base,
271 event->info.load_dll.dbg_offset, event->info.load_dll.dbg_size,
272 event->info.load_dll.name, event->info.load_dll.unicode );
273 break;
274 case UNLOAD_DLL_DEBUG_EVENT:
275 fprintf( stderr, "{unload_dll,base=%p}", event->info.unload_dll.base );
276 break;
277 case OUTPUT_DEBUG_STRING_EVENT:
278 fprintf( stderr, "{output_string,data=%p,unicode=%d,len=%d}",
279 event->info.output_string.string, event->info.output_string.unicode,
280 event->info.output_string.length );
281 break;
282 case RIP_EVENT:
283 fprintf( stderr, "{rip,err=%d,type=%d}",
284 event->info.rip_info.error, event->info.rip_info.type );
285 break;
286 case 0: /* zero is the code returned on timeouts */
287 fprintf( stderr, "{}" );
288 break;
289 default:
290 fprintf( stderr, "{code=??? (%d)}", event->code );
291 break;
293 remove_data( size );
296 static void dump_varargs_startup_info( size_t size )
298 const startup_info_t *ptr = cur_data;
299 startup_info_t info;
301 if (size < sizeof(info.size))
303 fprintf( stderr, "{}" );
304 return;
306 if (size > ptr->size) size = ptr->size;
307 memset( &info, 0, sizeof(info) );
308 memcpy( &info, ptr, min( size, sizeof(info) ));
310 fprintf( stderr, "{size=%d", info.size );
311 fprintf( stderr, ",x=%d", info.x );
312 fprintf( stderr, ",y=%d", info.y );
313 fprintf( stderr, ",cx=%d", info.cx );
314 fprintf( stderr, ",cy=%d", info.cy );
315 fprintf( stderr, ",x_chars=%d", info.x_chars );
316 fprintf( stderr, ",y_chars=%d", info.y_chars );
317 fprintf( stderr, ",attr=%d", info.attribute );
318 fprintf( stderr, ",cmd_show=%d", info.cmd_show );
319 fprintf( stderr, ",flags=%x", info.flags );
320 remove_data( size );
321 fprintf( stderr, ",filename=" );
322 /* FIXME: these should be unicode */
323 dump_varargs_string( min(cur_size,info.filename_len) );
324 fprintf( stderr, ",cmdline=" );
325 dump_varargs_string( min(cur_size,info.cmdline_len) );
326 fprintf( stderr, ",desktop=" );
327 dump_varargs_string( min(cur_size,info.desktop_len) );
328 fprintf( stderr, ",title=" );
329 dump_varargs_string( min(cur_size,info.title_len) );
330 fputc( '}', stderr );
333 static void dump_varargs_input_records( size_t size )
335 const INPUT_RECORD *rec = cur_data;
336 size_t len = size / sizeof(*rec);
338 fputc( '{', stderr );
339 while (len > 0)
341 fprintf( stderr, "{%04x,...}", rec->EventType );
342 rec++;
343 if (--len) fputc( ',', stderr );
345 fputc( '}', stderr );
346 remove_data( size );
349 static void dump_varargs_properties( size_t size )
351 const property_data_t *prop = cur_data;
352 size_t len = size / sizeof(*prop);
354 fputc( '{', stderr );
355 while (len > 0)
357 fprintf( stderr, "{atom=%04x,str=%d,handle=%p}",
358 prop->atom, prop->string, prop->handle );
359 prop++;
360 if (--len) fputc( ',', stderr );
362 fputc( '}', stderr );
363 remove_data( size );
366 typedef void (*dump_func)( const void *req );
368 /* Everything below this line is generated automatically by tools/make_requests */
369 /* ### make_requests begin ### */
371 static void dump_new_process_request( const struct new_process_request *req )
373 fprintf( stderr, " inherit_all=%d,", req->inherit_all );
374 fprintf( stderr, " use_handles=%d,", req->use_handles );
375 fprintf( stderr, " create_flags=%d,", req->create_flags );
376 fprintf( stderr, " unix_pid=%d,", req->unix_pid );
377 fprintf( stderr, " exe_file=%p,", req->exe_file );
378 fprintf( stderr, " hstdin=%p,", req->hstdin );
379 fprintf( stderr, " hstdout=%p,", req->hstdout );
380 fprintf( stderr, " hstderr=%p,", req->hstderr );
381 fprintf( stderr, " info=" );
382 dump_varargs_startup_info( cur_size );
385 static void dump_new_process_reply( const struct new_process_reply *req )
387 fprintf( stderr, " info=%p", req->info );
390 static void dump_get_new_process_info_request( const struct get_new_process_info_request *req )
392 fprintf( stderr, " info=%p,", req->info );
393 fprintf( stderr, " pinherit=%d,", req->pinherit );
394 fprintf( stderr, " tinherit=%d", req->tinherit );
397 static void dump_get_new_process_info_reply( const struct get_new_process_info_reply *req )
399 fprintf( stderr, " pid=%04x,", req->pid );
400 fprintf( stderr, " phandle=%p,", req->phandle );
401 fprintf( stderr, " tid=%04x,", req->tid );
402 fprintf( stderr, " thandle=%p,", req->thandle );
403 fprintf( stderr, " success=%d", req->success );
406 static void dump_new_thread_request( const struct new_thread_request *req )
408 fprintf( stderr, " suspend=%d,", req->suspend );
409 fprintf( stderr, " inherit=%d,", req->inherit );
410 fprintf( stderr, " request_fd=%d", req->request_fd );
413 static void dump_new_thread_reply( const struct new_thread_reply *req )
415 fprintf( stderr, " tid=%04x,", req->tid );
416 fprintf( stderr, " handle=%p", req->handle );
419 static void dump_boot_done_request( const struct boot_done_request *req )
421 fprintf( stderr, " debug_level=%d", req->debug_level );
424 static void dump_init_process_request( const struct init_process_request *req )
426 fprintf( stderr, " ldt_copy=%p", req->ldt_copy );
429 static void dump_init_process_reply( const struct init_process_reply *req )
431 fprintf( stderr, " create_flags=%d,", req->create_flags );
432 fprintf( stderr, " server_start=%08x,", req->server_start );
433 fprintf( stderr, " info_size=%d,", req->info_size );
434 fprintf( stderr, " exe_file=%p,", req->exe_file );
435 fprintf( stderr, " hstdin=%p,", req->hstdin );
436 fprintf( stderr, " hstdout=%p,", req->hstdout );
437 fprintf( stderr, " hstderr=%p", req->hstderr );
440 static void dump_get_startup_info_request( const struct get_startup_info_request *req )
444 static void dump_get_startup_info_reply( const struct get_startup_info_reply *req )
446 fprintf( stderr, " info=" );
447 dump_varargs_startup_info( cur_size );
450 static void dump_init_process_done_request( const struct init_process_done_request *req )
452 fprintf( stderr, " module=%p,", req->module );
453 fprintf( stderr, " module_size=%d,", req->module_size );
454 fprintf( stderr, " entry=%p,", req->entry );
455 fprintf( stderr, " name=%p,", req->name );
456 fprintf( stderr, " exe_file=%p,", req->exe_file );
457 fprintf( stderr, " gui=%d,", req->gui );
458 fprintf( stderr, " filename=" );
459 dump_varargs_string( cur_size );
462 static void dump_init_process_done_reply( const struct init_process_done_reply *req )
464 fprintf( stderr, " debugged=%d", req->debugged );
467 static void dump_init_thread_request( const struct init_thread_request *req )
469 fprintf( stderr, " unix_pid=%d,", req->unix_pid );
470 fprintf( stderr, " unix_tid=%d,", req->unix_tid );
471 fprintf( stderr, " teb=%p,", req->teb );
472 fprintf( stderr, " entry=%p,", req->entry );
473 fprintf( stderr, " reply_fd=%d,", req->reply_fd );
474 fprintf( stderr, " wait_fd=%d", req->wait_fd );
477 static void dump_init_thread_reply( const struct init_thread_reply *req )
479 fprintf( stderr, " pid=%04x,", req->pid );
480 fprintf( stderr, " tid=%04x,", req->tid );
481 fprintf( stderr, " boot=%d,", req->boot );
482 fprintf( stderr, " version=%d", req->version );
485 static void dump_terminate_process_request( const struct terminate_process_request *req )
487 fprintf( stderr, " handle=%p,", req->handle );
488 fprintf( stderr, " exit_code=%d", req->exit_code );
491 static void dump_terminate_process_reply( const struct terminate_process_reply *req )
493 fprintf( stderr, " self=%d", req->self );
496 static void dump_terminate_thread_request( const struct terminate_thread_request *req )
498 fprintf( stderr, " handle=%p,", req->handle );
499 fprintf( stderr, " exit_code=%d", req->exit_code );
502 static void dump_terminate_thread_reply( const struct terminate_thread_reply *req )
504 fprintf( stderr, " self=%d,", req->self );
505 fprintf( stderr, " last=%d", req->last );
508 static void dump_get_process_info_request( const struct get_process_info_request *req )
510 fprintf( stderr, " handle=%p", req->handle );
513 static void dump_get_process_info_reply( const struct get_process_info_reply *req )
515 fprintf( stderr, " pid=%04x,", req->pid );
516 fprintf( stderr, " debugged=%d,", req->debugged );
517 fprintf( stderr, " exit_code=%d,", req->exit_code );
518 fprintf( stderr, " priority=%d,", req->priority );
519 fprintf( stderr, " process_affinity=%d,", req->process_affinity );
520 fprintf( stderr, " system_affinity=%d", req->system_affinity );
523 static void dump_set_process_info_request( const struct set_process_info_request *req )
525 fprintf( stderr, " handle=%p,", req->handle );
526 fprintf( stderr, " mask=%d,", req->mask );
527 fprintf( stderr, " priority=%d,", req->priority );
528 fprintf( stderr, " affinity=%d", req->affinity );
531 static void dump_get_thread_info_request( const struct get_thread_info_request *req )
533 fprintf( stderr, " handle=%p,", req->handle );
534 fprintf( stderr, " tid_in=%04x", req->tid_in );
537 static void dump_get_thread_info_reply( const struct get_thread_info_reply *req )
539 fprintf( stderr, " pid=%04x,", req->pid );
540 fprintf( stderr, " tid=%04x,", req->tid );
541 fprintf( stderr, " teb=%p,", req->teb );
542 fprintf( stderr, " exit_code=%d,", req->exit_code );
543 fprintf( stderr, " priority=%d,", req->priority );
544 fprintf( stderr, " affinity=%d,", req->affinity );
545 fprintf( stderr, " creation_time=%ld,", req->creation_time );
546 fprintf( stderr, " exit_time=%ld", req->exit_time );
549 static void dump_set_thread_info_request( const struct set_thread_info_request *req )
551 fprintf( stderr, " handle=%p,", req->handle );
552 fprintf( stderr, " mask=%d,", req->mask );
553 fprintf( stderr, " priority=%d,", req->priority );
554 fprintf( stderr, " affinity=%d", req->affinity );
557 static void dump_get_dll_info_request( const struct get_dll_info_request *req )
559 fprintf( stderr, " handle=%p,", req->handle );
560 fprintf( stderr, " base_address=%p", req->base_address );
563 static void dump_get_dll_info_reply( const struct get_dll_info_reply *req )
565 fprintf( stderr, " size=%d,", req->size );
566 fprintf( stderr, " entry_point=%p,", req->entry_point );
567 fprintf( stderr, " filename=" );
568 dump_varargs_string( cur_size );
571 static void dump_suspend_thread_request( const struct suspend_thread_request *req )
573 fprintf( stderr, " handle=%p", req->handle );
576 static void dump_suspend_thread_reply( const struct suspend_thread_reply *req )
578 fprintf( stderr, " count=%d", req->count );
581 static void dump_resume_thread_request( const struct resume_thread_request *req )
583 fprintf( stderr, " handle=%p", req->handle );
586 static void dump_resume_thread_reply( const struct resume_thread_reply *req )
588 fprintf( stderr, " count=%d", req->count );
591 static void dump_load_dll_request( const struct load_dll_request *req )
593 fprintf( stderr, " handle=%p,", req->handle );
594 fprintf( stderr, " base=%p,", req->base );
595 fprintf( stderr, " size=%d,", req->size );
596 fprintf( stderr, " dbg_offset=%d,", req->dbg_offset );
597 fprintf( stderr, " dbg_size=%d,", req->dbg_size );
598 fprintf( stderr, " name=%p,", req->name );
599 fprintf( stderr, " filename=" );
600 dump_varargs_string( cur_size );
603 static void dump_unload_dll_request( const struct unload_dll_request *req )
605 fprintf( stderr, " base=%p", req->base );
608 static void dump_queue_apc_request( const struct queue_apc_request *req )
610 fprintf( stderr, " handle=%p,", req->handle );
611 fprintf( stderr, " user=%d,", req->user );
612 fprintf( stderr, " func=%p,", req->func );
613 fprintf( stderr, " arg1=%p,", req->arg1 );
614 fprintf( stderr, " arg2=%p,", req->arg2 );
615 fprintf( stderr, " arg3=%p", req->arg3 );
618 static void dump_get_apc_request( const struct get_apc_request *req )
620 fprintf( stderr, " alertable=%d", req->alertable );
623 static void dump_get_apc_reply( const struct get_apc_reply *req )
625 fprintf( stderr, " func=%p,", req->func );
626 fprintf( stderr, " type=%d,", req->type );
627 fprintf( stderr, " arg1=%p,", req->arg1 );
628 fprintf( stderr, " arg2=%p,", req->arg2 );
629 fprintf( stderr, " arg3=%p", req->arg3 );
632 static void dump_close_handle_request( const struct close_handle_request *req )
634 fprintf( stderr, " handle=%p", req->handle );
637 static void dump_close_handle_reply( const struct close_handle_reply *req )
639 fprintf( stderr, " fd=%d", req->fd );
642 static void dump_set_handle_info_request( const struct set_handle_info_request *req )
644 fprintf( stderr, " handle=%p,", req->handle );
645 fprintf( stderr, " flags=%d,", req->flags );
646 fprintf( stderr, " mask=%d,", req->mask );
647 fprintf( stderr, " fd=%d", req->fd );
650 static void dump_set_handle_info_reply( const struct set_handle_info_reply *req )
652 fprintf( stderr, " old_flags=%d,", req->old_flags );
653 fprintf( stderr, " cur_fd=%d", req->cur_fd );
656 static void dump_dup_handle_request( const struct dup_handle_request *req )
658 fprintf( stderr, " src_process=%p,", req->src_process );
659 fprintf( stderr, " src_handle=%p,", req->src_handle );
660 fprintf( stderr, " dst_process=%p,", req->dst_process );
661 fprintf( stderr, " access=%08x,", req->access );
662 fprintf( stderr, " inherit=%d,", req->inherit );
663 fprintf( stderr, " options=%d", req->options );
666 static void dump_dup_handle_reply( const struct dup_handle_reply *req )
668 fprintf( stderr, " handle=%p,", req->handle );
669 fprintf( stderr, " fd=%d", req->fd );
672 static void dump_open_process_request( const struct open_process_request *req )
674 fprintf( stderr, " pid=%04x,", req->pid );
675 fprintf( stderr, " access=%08x,", req->access );
676 fprintf( stderr, " inherit=%d", req->inherit );
679 static void dump_open_process_reply( const struct open_process_reply *req )
681 fprintf( stderr, " handle=%p", req->handle );
684 static void dump_open_thread_request( const struct open_thread_request *req )
686 fprintf( stderr, " tid=%04x,", req->tid );
687 fprintf( stderr, " access=%08x,", req->access );
688 fprintf( stderr, " inherit=%d", req->inherit );
691 static void dump_open_thread_reply( const struct open_thread_reply *req )
693 fprintf( stderr, " handle=%p", req->handle );
696 static void dump_select_request( const struct select_request *req )
698 fprintf( stderr, " flags=%d,", req->flags );
699 fprintf( stderr, " cookie=%p,", req->cookie );
700 fprintf( stderr, " timeout=" );
701 dump_abs_time( &req->timeout );
702 fprintf( stderr, "," );
703 fprintf( stderr, " handles=" );
704 dump_varargs_handles( cur_size );
707 static void dump_create_event_request( const struct create_event_request *req )
709 fprintf( stderr, " manual_reset=%d,", req->manual_reset );
710 fprintf( stderr, " initial_state=%d,", req->initial_state );
711 fprintf( stderr, " inherit=%d,", req->inherit );
712 fprintf( stderr, " name=" );
713 dump_varargs_unicode_str( cur_size );
716 static void dump_create_event_reply( const struct create_event_reply *req )
718 fprintf( stderr, " handle=%p", req->handle );
721 static void dump_event_op_request( const struct event_op_request *req )
723 fprintf( stderr, " handle=%p,", req->handle );
724 fprintf( stderr, " op=%d", req->op );
727 static void dump_open_event_request( const struct open_event_request *req )
729 fprintf( stderr, " access=%08x,", req->access );
730 fprintf( stderr, " inherit=%d,", req->inherit );
731 fprintf( stderr, " name=" );
732 dump_varargs_unicode_str( cur_size );
735 static void dump_open_event_reply( const struct open_event_reply *req )
737 fprintf( stderr, " handle=%p", req->handle );
740 static void dump_create_mutex_request( const struct create_mutex_request *req )
742 fprintf( stderr, " owned=%d,", req->owned );
743 fprintf( stderr, " inherit=%d,", req->inherit );
744 fprintf( stderr, " name=" );
745 dump_varargs_unicode_str( cur_size );
748 static void dump_create_mutex_reply( const struct create_mutex_reply *req )
750 fprintf( stderr, " handle=%p", req->handle );
753 static void dump_release_mutex_request( const struct release_mutex_request *req )
755 fprintf( stderr, " handle=%p", req->handle );
758 static void dump_open_mutex_request( const struct open_mutex_request *req )
760 fprintf( stderr, " access=%08x,", req->access );
761 fprintf( stderr, " inherit=%d,", req->inherit );
762 fprintf( stderr, " name=" );
763 dump_varargs_unicode_str( cur_size );
766 static void dump_open_mutex_reply( const struct open_mutex_reply *req )
768 fprintf( stderr, " handle=%p", req->handle );
771 static void dump_create_semaphore_request( const struct create_semaphore_request *req )
773 fprintf( stderr, " initial=%08x,", req->initial );
774 fprintf( stderr, " max=%08x,", req->max );
775 fprintf( stderr, " inherit=%d,", req->inherit );
776 fprintf( stderr, " name=" );
777 dump_varargs_unicode_str( cur_size );
780 static void dump_create_semaphore_reply( const struct create_semaphore_reply *req )
782 fprintf( stderr, " handle=%p", req->handle );
785 static void dump_release_semaphore_request( const struct release_semaphore_request *req )
787 fprintf( stderr, " handle=%p,", req->handle );
788 fprintf( stderr, " count=%08x", req->count );
791 static void dump_release_semaphore_reply( const struct release_semaphore_reply *req )
793 fprintf( stderr, " prev_count=%08x", req->prev_count );
796 static void dump_open_semaphore_request( const struct open_semaphore_request *req )
798 fprintf( stderr, " access=%08x,", req->access );
799 fprintf( stderr, " inherit=%d,", req->inherit );
800 fprintf( stderr, " name=" );
801 dump_varargs_unicode_str( cur_size );
804 static void dump_open_semaphore_reply( const struct open_semaphore_reply *req )
806 fprintf( stderr, " handle=%p", req->handle );
809 static void dump_create_file_request( const struct create_file_request *req )
811 fprintf( stderr, " access=%08x,", req->access );
812 fprintf( stderr, " inherit=%d,", req->inherit );
813 fprintf( stderr, " sharing=%08x,", req->sharing );
814 fprintf( stderr, " create=%d,", req->create );
815 fprintf( stderr, " attrs=%08x,", req->attrs );
816 fprintf( stderr, " drive_type=%d,", req->drive_type );
817 fprintf( stderr, " filename=" );
818 dump_varargs_string( cur_size );
821 static void dump_create_file_reply( const struct create_file_reply *req )
823 fprintf( stderr, " handle=%p", req->handle );
826 static void dump_alloc_file_handle_request( const struct alloc_file_handle_request *req )
828 fprintf( stderr, " access=%08x,", req->access );
829 fprintf( stderr, " inherit=%d,", req->inherit );
830 fprintf( stderr, " fd=%d", req->fd );
833 static void dump_alloc_file_handle_reply( const struct alloc_file_handle_reply *req )
835 fprintf( stderr, " handle=%p", req->handle );
838 static void dump_get_handle_fd_request( const struct get_handle_fd_request *req )
840 fprintf( stderr, " handle=%p,", req->handle );
841 fprintf( stderr, " access=%08x", req->access );
844 static void dump_get_handle_fd_reply( const struct get_handle_fd_reply *req )
846 fprintf( stderr, " fd=%d,", req->fd );
847 fprintf( stderr, " type=%d,", req->type );
848 fprintf( stderr, " flags=%d", req->flags );
851 static void dump_set_file_pointer_request( const struct set_file_pointer_request *req )
853 fprintf( stderr, " handle=%p,", req->handle );
854 fprintf( stderr, " low=%d,", req->low );
855 fprintf( stderr, " high=%d,", req->high );
856 fprintf( stderr, " whence=%d", req->whence );
859 static void dump_set_file_pointer_reply( const struct set_file_pointer_reply *req )
861 fprintf( stderr, " new_low=%d,", req->new_low );
862 fprintf( stderr, " new_high=%d", req->new_high );
865 static void dump_truncate_file_request( const struct truncate_file_request *req )
867 fprintf( stderr, " handle=%p", req->handle );
870 static void dump_set_file_time_request( const struct set_file_time_request *req )
872 fprintf( stderr, " handle=%p,", req->handle );
873 fprintf( stderr, " access_time=%ld,", req->access_time );
874 fprintf( stderr, " write_time=%ld", req->write_time );
877 static void dump_flush_file_request( const struct flush_file_request *req )
879 fprintf( stderr, " handle=%p", req->handle );
882 static void dump_flush_file_reply( const struct flush_file_reply *req )
884 fprintf( stderr, " event=%p", req->event );
887 static void dump_get_file_info_request( const struct get_file_info_request *req )
889 fprintf( stderr, " handle=%p", req->handle );
892 static void dump_get_file_info_reply( const struct get_file_info_reply *req )
894 fprintf( stderr, " type=%d,", req->type );
895 fprintf( stderr, " attr=%d,", req->attr );
896 fprintf( stderr, " access_time=%ld,", req->access_time );
897 fprintf( stderr, " write_time=%ld,", req->write_time );
898 fprintf( stderr, " change_time=%ld,", req->change_time );
899 fprintf( stderr, " size_high=%d,", req->size_high );
900 fprintf( stderr, " size_low=%d,", req->size_low );
901 fprintf( stderr, " alloc_high=%d,", req->alloc_high );
902 fprintf( stderr, " alloc_low=%d,", req->alloc_low );
903 fprintf( stderr, " links=%d,", req->links );
904 fprintf( stderr, " index_high=%d,", req->index_high );
905 fprintf( stderr, " index_low=%d,", req->index_low );
906 fprintf( stderr, " serial=%08x", req->serial );
909 static void dump_lock_file_request( const struct lock_file_request *req )
911 fprintf( stderr, " handle=%p,", req->handle );
912 fprintf( stderr, " offset_low=%08x,", req->offset_low );
913 fprintf( stderr, " offset_high=%08x,", req->offset_high );
914 fprintf( stderr, " count_low=%08x,", req->count_low );
915 fprintf( stderr, " count_high=%08x,", req->count_high );
916 fprintf( stderr, " shared=%d,", req->shared );
917 fprintf( stderr, " wait=%d", req->wait );
920 static void dump_lock_file_reply( const struct lock_file_reply *req )
922 fprintf( stderr, " handle=%p,", req->handle );
923 fprintf( stderr, " overlapped=%d", req->overlapped );
926 static void dump_unlock_file_request( const struct unlock_file_request *req )
928 fprintf( stderr, " handle=%p,", req->handle );
929 fprintf( stderr, " offset_low=%08x,", req->offset_low );
930 fprintf( stderr, " offset_high=%08x,", req->offset_high );
931 fprintf( stderr, " count_low=%08x,", req->count_low );
932 fprintf( stderr, " count_high=%08x", req->count_high );
935 static void dump_create_socket_request( const struct create_socket_request *req )
937 fprintf( stderr, " access=%08x,", req->access );
938 fprintf( stderr, " inherit=%d,", req->inherit );
939 fprintf( stderr, " family=%d,", req->family );
940 fprintf( stderr, " type=%d,", req->type );
941 fprintf( stderr, " protocol=%d,", req->protocol );
942 fprintf( stderr, " flags=%08x", req->flags );
945 static void dump_create_socket_reply( const struct create_socket_reply *req )
947 fprintf( stderr, " handle=%p", req->handle );
950 static void dump_accept_socket_request( const struct accept_socket_request *req )
952 fprintf( stderr, " lhandle=%p,", req->lhandle );
953 fprintf( stderr, " access=%08x,", req->access );
954 fprintf( stderr, " inherit=%d", req->inherit );
957 static void dump_accept_socket_reply( const struct accept_socket_reply *req )
959 fprintf( stderr, " handle=%p", req->handle );
962 static void dump_set_socket_event_request( const struct set_socket_event_request *req )
964 fprintf( stderr, " handle=%p,", req->handle );
965 fprintf( stderr, " mask=%08x,", req->mask );
966 fprintf( stderr, " event=%p,", req->event );
967 fprintf( stderr, " window=%p,", req->window );
968 fprintf( stderr, " msg=%08x", req->msg );
971 static void dump_get_socket_event_request( const struct get_socket_event_request *req )
973 fprintf( stderr, " handle=%p,", req->handle );
974 fprintf( stderr, " service=%d,", req->service );
975 fprintf( stderr, " c_event=%p", req->c_event );
978 static void dump_get_socket_event_reply( const struct get_socket_event_reply *req )
980 fprintf( stderr, " mask=%08x,", req->mask );
981 fprintf( stderr, " pmask=%08x,", req->pmask );
982 fprintf( stderr, " state=%08x,", req->state );
983 fprintf( stderr, " errors=" );
984 dump_varargs_ints( cur_size );
987 static void dump_enable_socket_event_request( const struct enable_socket_event_request *req )
989 fprintf( stderr, " handle=%p,", req->handle );
990 fprintf( stderr, " mask=%08x,", req->mask );
991 fprintf( stderr, " sstate=%08x,", req->sstate );
992 fprintf( stderr, " cstate=%08x", req->cstate );
995 static void dump_set_socket_deferred_request( const struct set_socket_deferred_request *req )
997 fprintf( stderr, " handle=%p,", req->handle );
998 fprintf( stderr, " deferred=%p", req->deferred );
1001 static void dump_alloc_console_request( const struct alloc_console_request *req )
1003 fprintf( stderr, " access=%08x,", req->access );
1004 fprintf( stderr, " inherit=%d,", req->inherit );
1005 fprintf( stderr, " pid=%04x", req->pid );
1008 static void dump_alloc_console_reply( const struct alloc_console_reply *req )
1010 fprintf( stderr, " handle_in=%p,", req->handle_in );
1011 fprintf( stderr, " event=%p", req->event );
1014 static void dump_free_console_request( const struct free_console_request *req )
1018 static void dump_get_console_renderer_events_request( const struct get_console_renderer_events_request *req )
1020 fprintf( stderr, " handle=%p", req->handle );
1023 static void dump_get_console_renderer_events_reply( const struct get_console_renderer_events_reply *req )
1025 fprintf( stderr, " data=" );
1026 dump_varargs_bytes( cur_size );
1029 static void dump_open_console_request( const struct open_console_request *req )
1031 fprintf( stderr, " from=%d,", req->from );
1032 fprintf( stderr, " access=%08x,", req->access );
1033 fprintf( stderr, " inherit=%d,", req->inherit );
1034 fprintf( stderr, " share=%d", req->share );
1037 static void dump_open_console_reply( const struct open_console_reply *req )
1039 fprintf( stderr, " handle=%p", req->handle );
1042 static void dump_get_console_wait_event_request( const struct get_console_wait_event_request *req )
1046 static void dump_get_console_wait_event_reply( const struct get_console_wait_event_reply *req )
1048 fprintf( stderr, " handle=%p", req->handle );
1051 static void dump_get_console_mode_request( const struct get_console_mode_request *req )
1053 fprintf( stderr, " handle=%p", req->handle );
1056 static void dump_get_console_mode_reply( const struct get_console_mode_reply *req )
1058 fprintf( stderr, " mode=%d", req->mode );
1061 static void dump_set_console_mode_request( const struct set_console_mode_request *req )
1063 fprintf( stderr, " handle=%p,", req->handle );
1064 fprintf( stderr, " mode=%d", req->mode );
1067 static void dump_set_console_input_info_request( const struct set_console_input_info_request *req )
1069 fprintf( stderr, " handle=%p,", req->handle );
1070 fprintf( stderr, " mask=%d,", req->mask );
1071 fprintf( stderr, " active_sb=%p,", req->active_sb );
1072 fprintf( stderr, " history_mode=%d,", req->history_mode );
1073 fprintf( stderr, " history_size=%d,", req->history_size );
1074 fprintf( stderr, " edition_mode=%d,", req->edition_mode );
1075 fprintf( stderr, " title=" );
1076 dump_varargs_unicode_str( cur_size );
1079 static void dump_get_console_input_info_request( const struct get_console_input_info_request *req )
1081 fprintf( stderr, " handle=%p", req->handle );
1084 static void dump_get_console_input_info_reply( const struct get_console_input_info_reply *req )
1086 fprintf( stderr, " history_mode=%d,", req->history_mode );
1087 fprintf( stderr, " history_size=%d,", req->history_size );
1088 fprintf( stderr, " history_index=%d,", req->history_index );
1089 fprintf( stderr, " edition_mode=%d,", req->edition_mode );
1090 fprintf( stderr, " title=" );
1091 dump_varargs_unicode_str( cur_size );
1094 static void dump_append_console_input_history_request( const struct append_console_input_history_request *req )
1096 fprintf( stderr, " handle=%p,", req->handle );
1097 fprintf( stderr, " line=" );
1098 dump_varargs_unicode_str( cur_size );
1101 static void dump_get_console_input_history_request( const struct get_console_input_history_request *req )
1103 fprintf( stderr, " handle=%p,", req->handle );
1104 fprintf( stderr, " index=%d", req->index );
1107 static void dump_get_console_input_history_reply( const struct get_console_input_history_reply *req )
1109 fprintf( stderr, " total=%d,", req->total );
1110 fprintf( stderr, " line=" );
1111 dump_varargs_unicode_str( cur_size );
1114 static void dump_create_console_output_request( const struct create_console_output_request *req )
1116 fprintf( stderr, " handle_in=%p,", req->handle_in );
1117 fprintf( stderr, " access=%d,", req->access );
1118 fprintf( stderr, " share=%d,", req->share );
1119 fprintf( stderr, " inherit=%d", req->inherit );
1122 static void dump_create_console_output_reply( const struct create_console_output_reply *req )
1124 fprintf( stderr, " handle_out=%p", req->handle_out );
1127 static void dump_set_console_output_info_request( const struct set_console_output_info_request *req )
1129 fprintf( stderr, " handle=%p,", req->handle );
1130 fprintf( stderr, " mask=%d,", req->mask );
1131 fprintf( stderr, " cursor_size=%d,", req->cursor_size );
1132 fprintf( stderr, " cursor_visible=%d,", req->cursor_visible );
1133 fprintf( stderr, " cursor_x=%d,", req->cursor_x );
1134 fprintf( stderr, " cursor_y=%d,", req->cursor_y );
1135 fprintf( stderr, " width=%d,", req->width );
1136 fprintf( stderr, " height=%d,", req->height );
1137 fprintf( stderr, " attr=%d,", req->attr );
1138 fprintf( stderr, " win_left=%d,", req->win_left );
1139 fprintf( stderr, " win_top=%d,", req->win_top );
1140 fprintf( stderr, " win_right=%d,", req->win_right );
1141 fprintf( stderr, " win_bottom=%d,", req->win_bottom );
1142 fprintf( stderr, " max_width=%d,", req->max_width );
1143 fprintf( stderr, " max_height=%d", req->max_height );
1146 static void dump_get_console_output_info_request( const struct get_console_output_info_request *req )
1148 fprintf( stderr, " handle=%p", req->handle );
1151 static void dump_get_console_output_info_reply( const struct get_console_output_info_reply *req )
1153 fprintf( stderr, " cursor_size=%d,", req->cursor_size );
1154 fprintf( stderr, " cursor_visible=%d,", req->cursor_visible );
1155 fprintf( stderr, " cursor_x=%d,", req->cursor_x );
1156 fprintf( stderr, " cursor_y=%d,", req->cursor_y );
1157 fprintf( stderr, " width=%d,", req->width );
1158 fprintf( stderr, " height=%d,", req->height );
1159 fprintf( stderr, " attr=%d,", req->attr );
1160 fprintf( stderr, " win_left=%d,", req->win_left );
1161 fprintf( stderr, " win_top=%d,", req->win_top );
1162 fprintf( stderr, " win_right=%d,", req->win_right );
1163 fprintf( stderr, " win_bottom=%d,", req->win_bottom );
1164 fprintf( stderr, " max_width=%d,", req->max_width );
1165 fprintf( stderr, " max_height=%d", req->max_height );
1168 static void dump_write_console_input_request( const struct write_console_input_request *req )
1170 fprintf( stderr, " handle=%p,", req->handle );
1171 fprintf( stderr, " rec=" );
1172 dump_varargs_input_records( cur_size );
1175 static void dump_write_console_input_reply( const struct write_console_input_reply *req )
1177 fprintf( stderr, " written=%d", req->written );
1180 static void dump_read_console_input_request( const struct read_console_input_request *req )
1182 fprintf( stderr, " handle=%p,", req->handle );
1183 fprintf( stderr, " flush=%d", req->flush );
1186 static void dump_read_console_input_reply( const struct read_console_input_reply *req )
1188 fprintf( stderr, " read=%d,", req->read );
1189 fprintf( stderr, " rec=" );
1190 dump_varargs_input_records( cur_size );
1193 static void dump_write_console_output_request( const struct write_console_output_request *req )
1195 fprintf( stderr, " handle=%p,", req->handle );
1196 fprintf( stderr, " x=%d,", req->x );
1197 fprintf( stderr, " y=%d,", req->y );
1198 fprintf( stderr, " mode=%d,", req->mode );
1199 fprintf( stderr, " wrap=%d,", req->wrap );
1200 fprintf( stderr, " data=" );
1201 dump_varargs_bytes( cur_size );
1204 static void dump_write_console_output_reply( const struct write_console_output_reply *req )
1206 fprintf( stderr, " written=%d,", req->written );
1207 fprintf( stderr, " width=%d,", req->width );
1208 fprintf( stderr, " height=%d", req->height );
1211 static void dump_fill_console_output_request( const struct fill_console_output_request *req )
1213 fprintf( stderr, " handle=%p,", req->handle );
1214 fprintf( stderr, " x=%d,", req->x );
1215 fprintf( stderr, " y=%d,", req->y );
1216 fprintf( stderr, " mode=%d,", req->mode );
1217 fprintf( stderr, " count=%d,", req->count );
1218 fprintf( stderr, " wrap=%d,", req->wrap );
1219 fprintf( stderr, " data=" );
1220 dump_char_info( &req->data );
1223 static void dump_fill_console_output_reply( const struct fill_console_output_reply *req )
1225 fprintf( stderr, " written=%d", req->written );
1228 static void dump_read_console_output_request( const struct read_console_output_request *req )
1230 fprintf( stderr, " handle=%p,", req->handle );
1231 fprintf( stderr, " x=%d,", req->x );
1232 fprintf( stderr, " y=%d,", req->y );
1233 fprintf( stderr, " mode=%d,", req->mode );
1234 fprintf( stderr, " wrap=%d", req->wrap );
1237 static void dump_read_console_output_reply( const struct read_console_output_reply *req )
1239 fprintf( stderr, " width=%d,", req->width );
1240 fprintf( stderr, " height=%d,", req->height );
1241 fprintf( stderr, " data=" );
1242 dump_varargs_bytes( cur_size );
1245 static void dump_move_console_output_request( const struct move_console_output_request *req )
1247 fprintf( stderr, " handle=%p,", req->handle );
1248 fprintf( stderr, " x_src=%d,", req->x_src );
1249 fprintf( stderr, " y_src=%d,", req->y_src );
1250 fprintf( stderr, " x_dst=%d,", req->x_dst );
1251 fprintf( stderr, " y_dst=%d,", req->y_dst );
1252 fprintf( stderr, " w=%d,", req->w );
1253 fprintf( stderr, " h=%d", req->h );
1256 static void dump_send_console_signal_request( const struct send_console_signal_request *req )
1258 fprintf( stderr, " signal=%d,", req->signal );
1259 fprintf( stderr, " group_id=%04x", req->group_id );
1262 static void dump_create_change_notification_request( const struct create_change_notification_request *req )
1264 fprintf( stderr, " handle=%p,", req->handle );
1265 fprintf( stderr, " subtree=%d,", req->subtree );
1266 fprintf( stderr, " filter=%08x", req->filter );
1269 static void dump_create_change_notification_reply( const struct create_change_notification_reply *req )
1271 fprintf( stderr, " handle=%p", req->handle );
1274 static void dump_next_change_notification_request( const struct next_change_notification_request *req )
1276 fprintf( stderr, " handle=%p", req->handle );
1279 static void dump_create_mapping_request( const struct create_mapping_request *req )
1281 fprintf( stderr, " size_high=%d,", req->size_high );
1282 fprintf( stderr, " size_low=%d,", req->size_low );
1283 fprintf( stderr, " protect=%d,", req->protect );
1284 fprintf( stderr, " access=%08x,", req->access );
1285 fprintf( stderr, " inherit=%d,", req->inherit );
1286 fprintf( stderr, " file_handle=%p,", req->file_handle );
1287 fprintf( stderr, " name=" );
1288 dump_varargs_unicode_str( cur_size );
1291 static void dump_create_mapping_reply( const struct create_mapping_reply *req )
1293 fprintf( stderr, " handle=%p", req->handle );
1296 static void dump_open_mapping_request( const struct open_mapping_request *req )
1298 fprintf( stderr, " access=%08x,", req->access );
1299 fprintf( stderr, " inherit=%d,", req->inherit );
1300 fprintf( stderr, " name=" );
1301 dump_varargs_unicode_str( cur_size );
1304 static void dump_open_mapping_reply( const struct open_mapping_reply *req )
1306 fprintf( stderr, " handle=%p", req->handle );
1309 static void dump_get_mapping_info_request( const struct get_mapping_info_request *req )
1311 fprintf( stderr, " handle=%p", req->handle );
1314 static void dump_get_mapping_info_reply( const struct get_mapping_info_reply *req )
1316 fprintf( stderr, " size_high=%d,", req->size_high );
1317 fprintf( stderr, " size_low=%d,", req->size_low );
1318 fprintf( stderr, " protect=%d,", req->protect );
1319 fprintf( stderr, " header_size=%d,", req->header_size );
1320 fprintf( stderr, " base=%p,", req->base );
1321 fprintf( stderr, " shared_file=%p,", req->shared_file );
1322 fprintf( stderr, " shared_size=%d,", req->shared_size );
1323 fprintf( stderr, " drive_type=%d", req->drive_type );
1326 static void dump_create_device_request( const struct create_device_request *req )
1328 fprintf( stderr, " access=%08x,", req->access );
1329 fprintf( stderr, " inherit=%d,", req->inherit );
1330 fprintf( stderr, " id=%d", req->id );
1333 static void dump_create_device_reply( const struct create_device_reply *req )
1335 fprintf( stderr, " handle=%p", req->handle );
1338 static void dump_get_device_id_request( const struct get_device_id_request *req )
1340 fprintf( stderr, " handle=%p", req->handle );
1343 static void dump_get_device_id_reply( const struct get_device_id_reply *req )
1345 fprintf( stderr, " id=%d", req->id );
1348 static void dump_create_snapshot_request( const struct create_snapshot_request *req )
1350 fprintf( stderr, " inherit=%d,", req->inherit );
1351 fprintf( stderr, " flags=%d,", req->flags );
1352 fprintf( stderr, " pid=%04x", req->pid );
1355 static void dump_create_snapshot_reply( const struct create_snapshot_reply *req )
1357 fprintf( stderr, " handle=%p", req->handle );
1360 static void dump_next_process_request( const struct next_process_request *req )
1362 fprintf( stderr, " handle=%p,", req->handle );
1363 fprintf( stderr, " reset=%d", req->reset );
1366 static void dump_next_process_reply( const struct next_process_reply *req )
1368 fprintf( stderr, " count=%d,", req->count );
1369 fprintf( stderr, " pid=%04x,", req->pid );
1370 fprintf( stderr, " ppid=%04x,", req->ppid );
1371 fprintf( stderr, " heap=%p,", req->heap );
1372 fprintf( stderr, " module=%p,", req->module );
1373 fprintf( stderr, " threads=%d,", req->threads );
1374 fprintf( stderr, " priority=%d,", req->priority );
1375 fprintf( stderr, " filename=" );
1376 dump_varargs_string( cur_size );
1379 static void dump_next_thread_request( const struct next_thread_request *req )
1381 fprintf( stderr, " handle=%p,", req->handle );
1382 fprintf( stderr, " reset=%d", req->reset );
1385 static void dump_next_thread_reply( const struct next_thread_reply *req )
1387 fprintf( stderr, " count=%d,", req->count );
1388 fprintf( stderr, " pid=%04x,", req->pid );
1389 fprintf( stderr, " tid=%04x,", req->tid );
1390 fprintf( stderr, " base_pri=%d,", req->base_pri );
1391 fprintf( stderr, " delta_pri=%d", req->delta_pri );
1394 static void dump_next_module_request( const struct next_module_request *req )
1396 fprintf( stderr, " handle=%p,", req->handle );
1397 fprintf( stderr, " reset=%d", req->reset );
1400 static void dump_next_module_reply( const struct next_module_reply *req )
1402 fprintf( stderr, " pid=%04x,", req->pid );
1403 fprintf( stderr, " base=%p,", req->base );
1404 fprintf( stderr, " size=%d,", req->size );
1405 fprintf( stderr, " filename=" );
1406 dump_varargs_string( cur_size );
1409 static void dump_wait_debug_event_request( const struct wait_debug_event_request *req )
1411 fprintf( stderr, " get_handle=%d", req->get_handle );
1414 static void dump_wait_debug_event_reply( const struct wait_debug_event_reply *req )
1416 fprintf( stderr, " pid=%04x,", req->pid );
1417 fprintf( stderr, " tid=%04x,", req->tid );
1418 fprintf( stderr, " wait=%p,", req->wait );
1419 fprintf( stderr, " event=" );
1420 dump_varargs_debug_event( cur_size );
1423 static void dump_queue_exception_event_request( const struct queue_exception_event_request *req )
1425 fprintf( stderr, " first=%d,", req->first );
1426 fprintf( stderr, " record=" );
1427 dump_varargs_exc_event( cur_size );
1430 static void dump_queue_exception_event_reply( const struct queue_exception_event_reply *req )
1432 fprintf( stderr, " handle=%p", req->handle );
1435 static void dump_get_exception_status_request( const struct get_exception_status_request *req )
1437 fprintf( stderr, " handle=%p", req->handle );
1440 static void dump_get_exception_status_reply( const struct get_exception_status_reply *req )
1442 fprintf( stderr, " status=%d,", req->status );
1443 fprintf( stderr, " context=" );
1444 dump_varargs_context( cur_size );
1447 static void dump_output_debug_string_request( const struct output_debug_string_request *req )
1449 fprintf( stderr, " string=%p,", req->string );
1450 fprintf( stderr, " unicode=%d,", req->unicode );
1451 fprintf( stderr, " length=%d", req->length );
1454 static void dump_continue_debug_event_request( const struct continue_debug_event_request *req )
1456 fprintf( stderr, " pid=%04x,", req->pid );
1457 fprintf( stderr, " tid=%04x,", req->tid );
1458 fprintf( stderr, " status=%d", req->status );
1461 static void dump_debug_process_request( const struct debug_process_request *req )
1463 fprintf( stderr, " pid=%04x,", req->pid );
1464 fprintf( stderr, " attach=%d", req->attach );
1467 static void dump_debug_break_request( const struct debug_break_request *req )
1469 fprintf( stderr, " handle=%p", req->handle );
1472 static void dump_debug_break_reply( const struct debug_break_reply *req )
1474 fprintf( stderr, " self=%d", req->self );
1477 static void dump_set_debugger_kill_on_exit_request( const struct set_debugger_kill_on_exit_request *req )
1479 fprintf( stderr, " kill_on_exit=%d", req->kill_on_exit );
1482 static void dump_read_process_memory_request( const struct read_process_memory_request *req )
1484 fprintf( stderr, " handle=%p,", req->handle );
1485 fprintf( stderr, " addr=%p", req->addr );
1488 static void dump_read_process_memory_reply( const struct read_process_memory_reply *req )
1490 fprintf( stderr, " data=" );
1491 dump_varargs_bytes( cur_size );
1494 static void dump_write_process_memory_request( const struct write_process_memory_request *req )
1496 fprintf( stderr, " handle=%p,", req->handle );
1497 fprintf( stderr, " addr=%p,", req->addr );
1498 fprintf( stderr, " first_mask=%08x,", req->first_mask );
1499 fprintf( stderr, " last_mask=%08x,", req->last_mask );
1500 fprintf( stderr, " data=" );
1501 dump_varargs_bytes( cur_size );
1504 static void dump_create_key_request( const struct create_key_request *req )
1506 fprintf( stderr, " parent=%p,", req->parent );
1507 fprintf( stderr, " access=%08x,", req->access );
1508 fprintf( stderr, " options=%08x,", req->options );
1509 fprintf( stderr, " modif=%ld,", req->modif );
1510 fprintf( stderr, " namelen=%d,", req->namelen );
1511 fprintf( stderr, " name=" );
1512 dump_varargs_unicode_str( min(cur_size,req->namelen) );
1513 fputc( ',', stderr );
1514 fprintf( stderr, " class=" );
1515 dump_varargs_unicode_str( cur_size );
1518 static void dump_create_key_reply( const struct create_key_reply *req )
1520 fprintf( stderr, " hkey=%p,", req->hkey );
1521 fprintf( stderr, " created=%d", req->created );
1524 static void dump_open_key_request( const struct open_key_request *req )
1526 fprintf( stderr, " parent=%p,", req->parent );
1527 fprintf( stderr, " access=%08x,", req->access );
1528 fprintf( stderr, " name=" );
1529 dump_varargs_unicode_str( cur_size );
1532 static void dump_open_key_reply( const struct open_key_reply *req )
1534 fprintf( stderr, " hkey=%p", req->hkey );
1537 static void dump_delete_key_request( const struct delete_key_request *req )
1539 fprintf( stderr, " hkey=%p", req->hkey );
1542 static void dump_enum_key_request( const struct enum_key_request *req )
1544 fprintf( stderr, " hkey=%p,", req->hkey );
1545 fprintf( stderr, " index=%d,", req->index );
1546 fprintf( stderr, " info_class=%d", req->info_class );
1549 static void dump_enum_key_reply( const struct enum_key_reply *req )
1551 fprintf( stderr, " subkeys=%d,", req->subkeys );
1552 fprintf( stderr, " max_subkey=%d,", req->max_subkey );
1553 fprintf( stderr, " max_class=%d,", req->max_class );
1554 fprintf( stderr, " values=%d,", req->values );
1555 fprintf( stderr, " max_value=%d,", req->max_value );
1556 fprintf( stderr, " max_data=%d,", req->max_data );
1557 fprintf( stderr, " modif=%ld,", req->modif );
1558 fprintf( stderr, " total=%d,", req->total );
1559 fprintf( stderr, " namelen=%d,", req->namelen );
1560 fprintf( stderr, " name=" );
1561 dump_varargs_unicode_str( min(cur_size,req->namelen) );
1562 fputc( ',', stderr );
1563 fprintf( stderr, " class=" );
1564 dump_varargs_unicode_str( cur_size );
1567 static void dump_set_key_value_request( const struct set_key_value_request *req )
1569 fprintf( stderr, " hkey=%p,", req->hkey );
1570 fprintf( stderr, " type=%d,", req->type );
1571 fprintf( stderr, " namelen=%d,", req->namelen );
1572 fprintf( stderr, " name=" );
1573 dump_varargs_unicode_str( min(cur_size,req->namelen) );
1574 fputc( ',', stderr );
1575 fprintf( stderr, " data=" );
1576 dump_varargs_bytes( cur_size );
1579 static void dump_get_key_value_request( const struct get_key_value_request *req )
1581 fprintf( stderr, " hkey=%p,", req->hkey );
1582 fprintf( stderr, " name=" );
1583 dump_varargs_unicode_str( cur_size );
1586 static void dump_get_key_value_reply( const struct get_key_value_reply *req )
1588 fprintf( stderr, " type=%d,", req->type );
1589 fprintf( stderr, " total=%d,", req->total );
1590 fprintf( stderr, " data=" );
1591 dump_varargs_bytes( cur_size );
1594 static void dump_enum_key_value_request( const struct enum_key_value_request *req )
1596 fprintf( stderr, " hkey=%p,", req->hkey );
1597 fprintf( stderr, " index=%d,", req->index );
1598 fprintf( stderr, " info_class=%d", req->info_class );
1601 static void dump_enum_key_value_reply( const struct enum_key_value_reply *req )
1603 fprintf( stderr, " type=%d,", req->type );
1604 fprintf( stderr, " total=%d,", req->total );
1605 fprintf( stderr, " namelen=%d,", req->namelen );
1606 fprintf( stderr, " name=" );
1607 dump_varargs_unicode_str( min(cur_size,req->namelen) );
1608 fputc( ',', stderr );
1609 fprintf( stderr, " data=" );
1610 dump_varargs_bytes( cur_size );
1613 static void dump_delete_key_value_request( const struct delete_key_value_request *req )
1615 fprintf( stderr, " hkey=%p,", req->hkey );
1616 fprintf( stderr, " name=" );
1617 dump_varargs_unicode_str( cur_size );
1620 static void dump_load_registry_request( const struct load_registry_request *req )
1622 fprintf( stderr, " hkey=%p,", req->hkey );
1623 fprintf( stderr, " file=%p,", req->file );
1624 fprintf( stderr, " name=" );
1625 dump_varargs_unicode_str( cur_size );
1628 static void dump_save_registry_request( const struct save_registry_request *req )
1630 fprintf( stderr, " hkey=%p,", req->hkey );
1631 fprintf( stderr, " file=%p", req->file );
1634 static void dump_save_registry_atexit_request( const struct save_registry_atexit_request *req )
1636 fprintf( stderr, " hkey=%p,", req->hkey );
1637 fprintf( stderr, " file=" );
1638 dump_varargs_string( cur_size );
1641 static void dump_set_registry_levels_request( const struct set_registry_levels_request *req )
1643 fprintf( stderr, " current=%d,", req->current );
1644 fprintf( stderr, " saving=%d,", req->saving );
1645 fprintf( stderr, " period=%d", req->period );
1648 static void dump_set_registry_notification_request( const struct set_registry_notification_request *req )
1650 fprintf( stderr, " hkey=%p,", req->hkey );
1651 fprintf( stderr, " event=%p,", req->event );
1652 fprintf( stderr, " subtree=%d,", req->subtree );
1653 fprintf( stderr, " filter=%08x", req->filter );
1656 static void dump_create_timer_request( const struct create_timer_request *req )
1658 fprintf( stderr, " inherit=%d,", req->inherit );
1659 fprintf( stderr, " manual=%d,", req->manual );
1660 fprintf( stderr, " name=" );
1661 dump_varargs_unicode_str( cur_size );
1664 static void dump_create_timer_reply( const struct create_timer_reply *req )
1666 fprintf( stderr, " handle=%p", req->handle );
1669 static void dump_open_timer_request( const struct open_timer_request *req )
1671 fprintf( stderr, " access=%08x,", req->access );
1672 fprintf( stderr, " inherit=%d,", req->inherit );
1673 fprintf( stderr, " name=" );
1674 dump_varargs_unicode_str( cur_size );
1677 static void dump_open_timer_reply( const struct open_timer_reply *req )
1679 fprintf( stderr, " handle=%p", req->handle );
1682 static void dump_set_timer_request( const struct set_timer_request *req )
1684 fprintf( stderr, " handle=%p,", req->handle );
1685 fprintf( stderr, " expire=" );
1686 dump_abs_time( &req->expire );
1687 fprintf( stderr, "," );
1688 fprintf( stderr, " period=%d,", req->period );
1689 fprintf( stderr, " callback=%p,", req->callback );
1690 fprintf( stderr, " arg=%p", req->arg );
1693 static void dump_set_timer_reply( const struct set_timer_reply *req )
1695 fprintf( stderr, " signaled=%d", req->signaled );
1698 static void dump_cancel_timer_request( const struct cancel_timer_request *req )
1700 fprintf( stderr, " handle=%p", req->handle );
1703 static void dump_cancel_timer_reply( const struct cancel_timer_reply *req )
1705 fprintf( stderr, " signaled=%d", req->signaled );
1708 static void dump_get_thread_context_request( const struct get_thread_context_request *req )
1710 fprintf( stderr, " handle=%p,", req->handle );
1711 fprintf( stderr, " flags=%08x", req->flags );
1714 static void dump_get_thread_context_reply( const struct get_thread_context_reply *req )
1716 fprintf( stderr, " context=" );
1717 dump_varargs_context( cur_size );
1720 static void dump_set_thread_context_request( const struct set_thread_context_request *req )
1722 fprintf( stderr, " handle=%p,", req->handle );
1723 fprintf( stderr, " flags=%08x,", req->flags );
1724 fprintf( stderr, " context=" );
1725 dump_varargs_context( cur_size );
1728 static void dump_get_selector_entry_request( const struct get_selector_entry_request *req )
1730 fprintf( stderr, " handle=%p,", req->handle );
1731 fprintf( stderr, " entry=%d", req->entry );
1734 static void dump_get_selector_entry_reply( const struct get_selector_entry_reply *req )
1736 fprintf( stderr, " base=%08x,", req->base );
1737 fprintf( stderr, " limit=%08x,", req->limit );
1738 fprintf( stderr, " flags=%02x", req->flags );
1741 static void dump_add_atom_request( const struct add_atom_request *req )
1743 fprintf( stderr, " local=%d,", req->local );
1744 fprintf( stderr, " name=" );
1745 dump_varargs_unicode_str( cur_size );
1748 static void dump_add_atom_reply( const struct add_atom_reply *req )
1750 fprintf( stderr, " atom=%04x", req->atom );
1753 static void dump_delete_atom_request( const struct delete_atom_request *req )
1755 fprintf( stderr, " atom=%04x,", req->atom );
1756 fprintf( stderr, " local=%d", req->local );
1759 static void dump_find_atom_request( const struct find_atom_request *req )
1761 fprintf( stderr, " local=%d,", req->local );
1762 fprintf( stderr, " name=" );
1763 dump_varargs_unicode_str( cur_size );
1766 static void dump_find_atom_reply( const struct find_atom_reply *req )
1768 fprintf( stderr, " atom=%04x", req->atom );
1771 static void dump_get_atom_name_request( const struct get_atom_name_request *req )
1773 fprintf( stderr, " atom=%04x,", req->atom );
1774 fprintf( stderr, " local=%d", req->local );
1777 static void dump_get_atom_name_reply( const struct get_atom_name_reply *req )
1779 fprintf( stderr, " count=%d,", req->count );
1780 fprintf( stderr, " name=" );
1781 dump_varargs_unicode_str( cur_size );
1784 static void dump_init_atom_table_request( const struct init_atom_table_request *req )
1786 fprintf( stderr, " entries=%d", req->entries );
1789 static void dump_get_msg_queue_request( const struct get_msg_queue_request *req )
1793 static void dump_get_msg_queue_reply( const struct get_msg_queue_reply *req )
1795 fprintf( stderr, " handle=%p", req->handle );
1798 static void dump_set_queue_mask_request( const struct set_queue_mask_request *req )
1800 fprintf( stderr, " wake_mask=%08x,", req->wake_mask );
1801 fprintf( stderr, " changed_mask=%08x,", req->changed_mask );
1802 fprintf( stderr, " skip_wait=%d", req->skip_wait );
1805 static void dump_set_queue_mask_reply( const struct set_queue_mask_reply *req )
1807 fprintf( stderr, " wake_bits=%08x,", req->wake_bits );
1808 fprintf( stderr, " changed_bits=%08x", req->changed_bits );
1811 static void dump_get_queue_status_request( const struct get_queue_status_request *req )
1813 fprintf( stderr, " clear=%d", req->clear );
1816 static void dump_get_queue_status_reply( const struct get_queue_status_reply *req )
1818 fprintf( stderr, " wake_bits=%08x,", req->wake_bits );
1819 fprintf( stderr, " changed_bits=%08x", req->changed_bits );
1822 static void dump_wait_input_idle_request( const struct wait_input_idle_request *req )
1824 fprintf( stderr, " handle=%p,", req->handle );
1825 fprintf( stderr, " timeout=%d", req->timeout );
1828 static void dump_wait_input_idle_reply( const struct wait_input_idle_reply *req )
1830 fprintf( stderr, " event=%p", req->event );
1833 static void dump_send_message_request( const struct send_message_request *req )
1835 fprintf( stderr, " id=%04x,", req->id );
1836 fprintf( stderr, " type=%d,", req->type );
1837 fprintf( stderr, " flags=%d,", req->flags );
1838 fprintf( stderr, " win=%p,", req->win );
1839 fprintf( stderr, " msg=%08x,", req->msg );
1840 fprintf( stderr, " wparam=%08x,", req->wparam );
1841 fprintf( stderr, " lparam=%08x,", req->lparam );
1842 fprintf( stderr, " x=%d,", req->x );
1843 fprintf( stderr, " y=%d,", req->y );
1844 fprintf( stderr, " time=%08x,", req->time );
1845 fprintf( stderr, " info=%08x,", req->info );
1846 fprintf( stderr, " timeout=%d,", req->timeout );
1847 fprintf( stderr, " data=" );
1848 dump_varargs_bytes( cur_size );
1851 static void dump_get_message_request( const struct get_message_request *req )
1853 fprintf( stderr, " flags=%d,", req->flags );
1854 fprintf( stderr, " get_win=%p,", req->get_win );
1855 fprintf( stderr, " get_first=%08x,", req->get_first );
1856 fprintf( stderr, " get_last=%08x", req->get_last );
1859 static void dump_get_message_reply( const struct get_message_reply *req )
1861 fprintf( stderr, " type=%d,", req->type );
1862 fprintf( stderr, " win=%p,", req->win );
1863 fprintf( stderr, " msg=%08x,", req->msg );
1864 fprintf( stderr, " wparam=%08x,", req->wparam );
1865 fprintf( stderr, " lparam=%08x,", req->lparam );
1866 fprintf( stderr, " x=%d,", req->x );
1867 fprintf( stderr, " y=%d,", req->y );
1868 fprintf( stderr, " time=%08x,", req->time );
1869 fprintf( stderr, " info=%08x,", req->info );
1870 fprintf( stderr, " total=%d,", req->total );
1871 fprintf( stderr, " data=" );
1872 dump_varargs_bytes( cur_size );
1875 static void dump_reply_message_request( const struct reply_message_request *req )
1877 fprintf( stderr, " type=%d,", req->type );
1878 fprintf( stderr, " result=%08x,", req->result );
1879 fprintf( stderr, " remove=%d,", req->remove );
1880 fprintf( stderr, " data=" );
1881 dump_varargs_bytes( cur_size );
1884 static void dump_get_message_reply_request( const struct get_message_reply_request *req )
1886 fprintf( stderr, " cancel=%d", req->cancel );
1889 static void dump_get_message_reply_reply( const struct get_message_reply_reply *req )
1891 fprintf( stderr, " result=%08x,", req->result );
1892 fprintf( stderr, " data=" );
1893 dump_varargs_bytes( cur_size );
1896 static void dump_set_win_timer_request( const struct set_win_timer_request *req )
1898 fprintf( stderr, " win=%p,", req->win );
1899 fprintf( stderr, " msg=%08x,", req->msg );
1900 fprintf( stderr, " id=%08x,", req->id );
1901 fprintf( stderr, " rate=%08x,", req->rate );
1902 fprintf( stderr, " lparam=%08x", req->lparam );
1905 static void dump_kill_win_timer_request( const struct kill_win_timer_request *req )
1907 fprintf( stderr, " win=%p,", req->win );
1908 fprintf( stderr, " msg=%08x,", req->msg );
1909 fprintf( stderr, " id=%08x", req->id );
1912 static void dump_create_serial_request( const struct create_serial_request *req )
1914 fprintf( stderr, " access=%08x,", req->access );
1915 fprintf( stderr, " inherit=%d,", req->inherit );
1916 fprintf( stderr, " attributes=%08x,", req->attributes );
1917 fprintf( stderr, " sharing=%08x,", req->sharing );
1918 fprintf( stderr, " name=" );
1919 dump_varargs_string( cur_size );
1922 static void dump_create_serial_reply( const struct create_serial_reply *req )
1924 fprintf( stderr, " handle=%p", req->handle );
1927 static void dump_get_serial_info_request( const struct get_serial_info_request *req )
1929 fprintf( stderr, " handle=%p", req->handle );
1932 static void dump_get_serial_info_reply( const struct get_serial_info_reply *req )
1934 fprintf( stderr, " readinterval=%08x,", req->readinterval );
1935 fprintf( stderr, " readconst=%08x,", req->readconst );
1936 fprintf( stderr, " readmult=%08x,", req->readmult );
1937 fprintf( stderr, " writeconst=%08x,", req->writeconst );
1938 fprintf( stderr, " writemult=%08x,", req->writemult );
1939 fprintf( stderr, " eventmask=%08x,", req->eventmask );
1940 fprintf( stderr, " commerror=%08x", req->commerror );
1943 static void dump_set_serial_info_request( const struct set_serial_info_request *req )
1945 fprintf( stderr, " handle=%p,", req->handle );
1946 fprintf( stderr, " flags=%d,", req->flags );
1947 fprintf( stderr, " readinterval=%08x,", req->readinterval );
1948 fprintf( stderr, " readconst=%08x,", req->readconst );
1949 fprintf( stderr, " readmult=%08x,", req->readmult );
1950 fprintf( stderr, " writeconst=%08x,", req->writeconst );
1951 fprintf( stderr, " writemult=%08x,", req->writemult );
1952 fprintf( stderr, " eventmask=%08x,", req->eventmask );
1953 fprintf( stderr, " commerror=%08x", req->commerror );
1956 static void dump_register_async_request( const struct register_async_request *req )
1958 fprintf( stderr, " handle=%p,", req->handle );
1959 fprintf( stderr, " type=%d,", req->type );
1960 fprintf( stderr, " overlapped=%p,", req->overlapped );
1961 fprintf( stderr, " count=%d,", req->count );
1962 fprintf( stderr, " status=%08x", req->status );
1965 static void dump_create_named_pipe_request( const struct create_named_pipe_request *req )
1967 fprintf( stderr, " openmode=%08x,", req->openmode );
1968 fprintf( stderr, " pipemode=%08x,", req->pipemode );
1969 fprintf( stderr, " maxinstances=%08x,", req->maxinstances );
1970 fprintf( stderr, " outsize=%08x,", req->outsize );
1971 fprintf( stderr, " insize=%08x,", req->insize );
1972 fprintf( stderr, " timeout=%08x,", req->timeout );
1973 fprintf( stderr, " name=" );
1974 dump_varargs_unicode_str( cur_size );
1977 static void dump_create_named_pipe_reply( const struct create_named_pipe_reply *req )
1979 fprintf( stderr, " handle=%p", req->handle );
1982 static void dump_open_named_pipe_request( const struct open_named_pipe_request *req )
1984 fprintf( stderr, " access=%08x,", req->access );
1985 fprintf( stderr, " inherit=%d,", req->inherit );
1986 fprintf( stderr, " name=" );
1987 dump_varargs_unicode_str( cur_size );
1990 static void dump_open_named_pipe_reply( const struct open_named_pipe_reply *req )
1992 fprintf( stderr, " handle=%p", req->handle );
1995 static void dump_connect_named_pipe_request( const struct connect_named_pipe_request *req )
1997 fprintf( stderr, " handle=%p,", req->handle );
1998 fprintf( stderr, " overlapped=%p,", req->overlapped );
1999 fprintf( stderr, " func=%p", req->func );
2002 static void dump_wait_named_pipe_request( const struct wait_named_pipe_request *req )
2004 fprintf( stderr, " timeout=%08x,", req->timeout );
2005 fprintf( stderr, " overlapped=%p,", req->overlapped );
2006 fprintf( stderr, " func=%p,", req->func );
2007 fprintf( stderr, " name=" );
2008 dump_varargs_unicode_str( cur_size );
2011 static void dump_disconnect_named_pipe_request( const struct disconnect_named_pipe_request *req )
2013 fprintf( stderr, " handle=%p", req->handle );
2016 static void dump_disconnect_named_pipe_reply( const struct disconnect_named_pipe_reply *req )
2018 fprintf( stderr, " fd=%d", req->fd );
2021 static void dump_get_named_pipe_info_request( const struct get_named_pipe_info_request *req )
2023 fprintf( stderr, " handle=%p", req->handle );
2026 static void dump_get_named_pipe_info_reply( const struct get_named_pipe_info_reply *req )
2028 fprintf( stderr, " flags=%08x,", req->flags );
2029 fprintf( stderr, " maxinstances=%08x,", req->maxinstances );
2030 fprintf( stderr, " outsize=%08x,", req->outsize );
2031 fprintf( stderr, " insize=%08x", req->insize );
2034 static void dump_create_smb_request( const struct create_smb_request *req )
2036 fprintf( stderr, " fd=%d,", req->fd );
2037 fprintf( stderr, " tree_id=%08x,", req->tree_id );
2038 fprintf( stderr, " user_id=%08x,", req->user_id );
2039 fprintf( stderr, " file_id=%08x,", req->file_id );
2040 fprintf( stderr, " dialect=%08x", req->dialect );
2043 static void dump_create_smb_reply( const struct create_smb_reply *req )
2045 fprintf( stderr, " handle=%p", req->handle );
2048 static void dump_get_smb_info_request( const struct get_smb_info_request *req )
2050 fprintf( stderr, " handle=%p,", req->handle );
2051 fprintf( stderr, " flags=%08x,", req->flags );
2052 fprintf( stderr, " offset=%08x", req->offset );
2055 static void dump_get_smb_info_reply( const struct get_smb_info_reply *req )
2057 fprintf( stderr, " tree_id=%08x,", req->tree_id );
2058 fprintf( stderr, " user_id=%08x,", req->user_id );
2059 fprintf( stderr, " dialect=%08x,", req->dialect );
2060 fprintf( stderr, " file_id=%08x,", req->file_id );
2061 fprintf( stderr, " offset=%08x", req->offset );
2064 static void dump_create_window_request( const struct create_window_request *req )
2066 fprintf( stderr, " parent=%p,", req->parent );
2067 fprintf( stderr, " owner=%p,", req->owner );
2068 fprintf( stderr, " atom=%04x", req->atom );
2071 static void dump_create_window_reply( const struct create_window_reply *req )
2073 fprintf( stderr, " handle=%p", req->handle );
2076 static void dump_link_window_request( const struct link_window_request *req )
2078 fprintf( stderr, " handle=%p,", req->handle );
2079 fprintf( stderr, " parent=%p,", req->parent );
2080 fprintf( stderr, " previous=%p", req->previous );
2083 static void dump_link_window_reply( const struct link_window_reply *req )
2085 fprintf( stderr, " full_parent=%p", req->full_parent );
2088 static void dump_destroy_window_request( const struct destroy_window_request *req )
2090 fprintf( stderr, " handle=%p", req->handle );
2093 static void dump_set_window_owner_request( const struct set_window_owner_request *req )
2095 fprintf( stderr, " handle=%p,", req->handle );
2096 fprintf( stderr, " owner=%p", req->owner );
2099 static void dump_set_window_owner_reply( const struct set_window_owner_reply *req )
2101 fprintf( stderr, " full_owner=%p,", req->full_owner );
2102 fprintf( stderr, " prev_owner=%p", req->prev_owner );
2105 static void dump_get_window_info_request( const struct get_window_info_request *req )
2107 fprintf( stderr, " handle=%p", req->handle );
2110 static void dump_get_window_info_reply( const struct get_window_info_reply *req )
2112 fprintf( stderr, " full_handle=%p,", req->full_handle );
2113 fprintf( stderr, " last_active=%p,", req->last_active );
2114 fprintf( stderr, " pid=%04x,", req->pid );
2115 fprintf( stderr, " tid=%04x,", req->tid );
2116 fprintf( stderr, " atom=%04x", req->atom );
2119 static void dump_set_window_info_request( const struct set_window_info_request *req )
2121 fprintf( stderr, " handle=%p,", req->handle );
2122 fprintf( stderr, " flags=%08x,", req->flags );
2123 fprintf( stderr, " style=%08x,", req->style );
2124 fprintf( stderr, " ex_style=%08x,", req->ex_style );
2125 fprintf( stderr, " id=%08x,", req->id );
2126 fprintf( stderr, " instance=%p,", req->instance );
2127 fprintf( stderr, " user_data=%p", req->user_data );
2130 static void dump_set_window_info_reply( const struct set_window_info_reply *req )
2132 fprintf( stderr, " old_style=%08x,", req->old_style );
2133 fprintf( stderr, " old_ex_style=%08x,", req->old_ex_style );
2134 fprintf( stderr, " old_id=%08x,", req->old_id );
2135 fprintf( stderr, " old_instance=%p,", req->old_instance );
2136 fprintf( stderr, " old_user_data=%p", req->old_user_data );
2139 static void dump_get_window_parents_request( const struct get_window_parents_request *req )
2141 fprintf( stderr, " handle=%p", req->handle );
2144 static void dump_get_window_parents_reply( const struct get_window_parents_reply *req )
2146 fprintf( stderr, " count=%d,", req->count );
2147 fprintf( stderr, " parents=" );
2148 dump_varargs_user_handles( cur_size );
2151 static void dump_get_window_children_request( const struct get_window_children_request *req )
2153 fprintf( stderr, " parent=%p,", req->parent );
2154 fprintf( stderr, " atom=%04x,", req->atom );
2155 fprintf( stderr, " tid=%04x", req->tid );
2158 static void dump_get_window_children_reply( const struct get_window_children_reply *req )
2160 fprintf( stderr, " count=%d,", req->count );
2161 fprintf( stderr, " children=" );
2162 dump_varargs_user_handles( cur_size );
2165 static void dump_get_window_tree_request( const struct get_window_tree_request *req )
2167 fprintf( stderr, " handle=%p", req->handle );
2170 static void dump_get_window_tree_reply( const struct get_window_tree_reply *req )
2172 fprintf( stderr, " parent=%p,", req->parent );
2173 fprintf( stderr, " owner=%p,", req->owner );
2174 fprintf( stderr, " next_sibling=%p,", req->next_sibling );
2175 fprintf( stderr, " prev_sibling=%p,", req->prev_sibling );
2176 fprintf( stderr, " first_sibling=%p,", req->first_sibling );
2177 fprintf( stderr, " last_sibling=%p,", req->last_sibling );
2178 fprintf( stderr, " first_child=%p,", req->first_child );
2179 fprintf( stderr, " last_child=%p", req->last_child );
2182 static void dump_set_window_rectangles_request( const struct set_window_rectangles_request *req )
2184 fprintf( stderr, " handle=%p,", req->handle );
2185 fprintf( stderr, " window=" );
2186 dump_rectangle( &req->window );
2187 fprintf( stderr, "," );
2188 fprintf( stderr, " client=" );
2189 dump_rectangle( &req->client );
2192 static void dump_get_window_rectangles_request( const struct get_window_rectangles_request *req )
2194 fprintf( stderr, " handle=%p", req->handle );
2197 static void dump_get_window_rectangles_reply( const struct get_window_rectangles_reply *req )
2199 fprintf( stderr, " window=" );
2200 dump_rectangle( &req->window );
2201 fprintf( stderr, "," );
2202 fprintf( stderr, " client=" );
2203 dump_rectangle( &req->client );
2206 static void dump_get_window_text_request( const struct get_window_text_request *req )
2208 fprintf( stderr, " handle=%p", req->handle );
2211 static void dump_get_window_text_reply( const struct get_window_text_reply *req )
2213 fprintf( stderr, " text=" );
2214 dump_varargs_unicode_str( cur_size );
2217 static void dump_set_window_text_request( const struct set_window_text_request *req )
2219 fprintf( stderr, " handle=%p,", req->handle );
2220 fprintf( stderr, " text=" );
2221 dump_varargs_unicode_str( cur_size );
2224 static void dump_inc_window_paint_count_request( const struct inc_window_paint_count_request *req )
2226 fprintf( stderr, " handle=%p,", req->handle );
2227 fprintf( stderr, " incr=%d", req->incr );
2230 static void dump_get_windows_offset_request( const struct get_windows_offset_request *req )
2232 fprintf( stderr, " from=%p,", req->from );
2233 fprintf( stderr, " to=%p", req->to );
2236 static void dump_get_windows_offset_reply( const struct get_windows_offset_reply *req )
2238 fprintf( stderr, " x=%d,", req->x );
2239 fprintf( stderr, " y=%d", req->y );
2242 static void dump_set_window_property_request( const struct set_window_property_request *req )
2244 fprintf( stderr, " window=%p,", req->window );
2245 fprintf( stderr, " atom=%04x,", req->atom );
2246 fprintf( stderr, " string=%d,", req->string );
2247 fprintf( stderr, " handle=%p", req->handle );
2250 static void dump_remove_window_property_request( const struct remove_window_property_request *req )
2252 fprintf( stderr, " window=%p,", req->window );
2253 fprintf( stderr, " atom=%04x", req->atom );
2256 static void dump_remove_window_property_reply( const struct remove_window_property_reply *req )
2258 fprintf( stderr, " handle=%p", req->handle );
2261 static void dump_get_window_property_request( const struct get_window_property_request *req )
2263 fprintf( stderr, " window=%p,", req->window );
2264 fprintf( stderr, " atom=%04x", req->atom );
2267 static void dump_get_window_property_reply( const struct get_window_property_reply *req )
2269 fprintf( stderr, " handle=%p", req->handle );
2272 static void dump_get_window_properties_request( const struct get_window_properties_request *req )
2274 fprintf( stderr, " window=%p", req->window );
2277 static void dump_get_window_properties_reply( const struct get_window_properties_reply *req )
2279 fprintf( stderr, " total=%d,", req->total );
2280 fprintf( stderr, " props=" );
2281 dump_varargs_properties( cur_size );
2284 static void dump_attach_thread_input_request( const struct attach_thread_input_request *req )
2286 fprintf( stderr, " tid_from=%04x,", req->tid_from );
2287 fprintf( stderr, " tid_to=%04x,", req->tid_to );
2288 fprintf( stderr, " attach=%d", req->attach );
2291 static void dump_get_thread_input_request( const struct get_thread_input_request *req )
2293 fprintf( stderr, " tid=%04x", req->tid );
2296 static void dump_get_thread_input_reply( const struct get_thread_input_reply *req )
2298 fprintf( stderr, " focus=%p,", req->focus );
2299 fprintf( stderr, " capture=%p,", req->capture );
2300 fprintf( stderr, " active=%p,", req->active );
2301 fprintf( stderr, " foreground=%p,", req->foreground );
2302 fprintf( stderr, " menu_owner=%p,", req->menu_owner );
2303 fprintf( stderr, " move_size=%p,", req->move_size );
2304 fprintf( stderr, " caret=%p,", req->caret );
2305 fprintf( stderr, " rect=" );
2306 dump_rectangle( &req->rect );
2309 static void dump_get_key_state_request( const struct get_key_state_request *req )
2311 fprintf( stderr, " tid=%04x,", req->tid );
2312 fprintf( stderr, " key=%d", req->key );
2315 static void dump_get_key_state_reply( const struct get_key_state_reply *req )
2317 fprintf( stderr, " state=%02x,", req->state );
2318 fprintf( stderr, " keystate=" );
2319 dump_varargs_bytes( cur_size );
2322 static void dump_set_key_state_request( const struct set_key_state_request *req )
2324 fprintf( stderr, " tid=%04x,", req->tid );
2325 fprintf( stderr, " keystate=" );
2326 dump_varargs_bytes( cur_size );
2329 static void dump_set_foreground_window_request( const struct set_foreground_window_request *req )
2331 fprintf( stderr, " handle=%p", req->handle );
2334 static void dump_set_foreground_window_reply( const struct set_foreground_window_reply *req )
2336 fprintf( stderr, " previous=%p,", req->previous );
2337 fprintf( stderr, " send_msg_old=%d,", req->send_msg_old );
2338 fprintf( stderr, " send_msg_new=%d", req->send_msg_new );
2341 static void dump_set_focus_window_request( const struct set_focus_window_request *req )
2343 fprintf( stderr, " handle=%p", req->handle );
2346 static void dump_set_focus_window_reply( const struct set_focus_window_reply *req )
2348 fprintf( stderr, " previous=%p", req->previous );
2351 static void dump_set_active_window_request( const struct set_active_window_request *req )
2353 fprintf( stderr, " handle=%p", req->handle );
2356 static void dump_set_active_window_reply( const struct set_active_window_reply *req )
2358 fprintf( stderr, " previous=%p", req->previous );
2361 static void dump_set_capture_window_request( const struct set_capture_window_request *req )
2363 fprintf( stderr, " handle=%p,", req->handle );
2364 fprintf( stderr, " flags=%08x", req->flags );
2367 static void dump_set_capture_window_reply( const struct set_capture_window_reply *req )
2369 fprintf( stderr, " previous=%p,", req->previous );
2370 fprintf( stderr, " full_handle=%p", req->full_handle );
2373 static void dump_set_caret_window_request( const struct set_caret_window_request *req )
2375 fprintf( stderr, " handle=%p,", req->handle );
2376 fprintf( stderr, " width=%d,", req->width );
2377 fprintf( stderr, " height=%d", req->height );
2380 static void dump_set_caret_window_reply( const struct set_caret_window_reply *req )
2382 fprintf( stderr, " previous=%p,", req->previous );
2383 fprintf( stderr, " old_rect=" );
2384 dump_rectangle( &req->old_rect );
2385 fprintf( stderr, "," );
2386 fprintf( stderr, " old_hide=%d,", req->old_hide );
2387 fprintf( stderr, " old_state=%d", req->old_state );
2390 static void dump_set_caret_info_request( const struct set_caret_info_request *req )
2392 fprintf( stderr, " flags=%08x,", req->flags );
2393 fprintf( stderr, " handle=%p,", req->handle );
2394 fprintf( stderr, " x=%d,", req->x );
2395 fprintf( stderr, " y=%d,", req->y );
2396 fprintf( stderr, " hide=%d,", req->hide );
2397 fprintf( stderr, " state=%d", req->state );
2400 static void dump_set_caret_info_reply( const struct set_caret_info_reply *req )
2402 fprintf( stderr, " full_handle=%p,", req->full_handle );
2403 fprintf( stderr, " old_rect=" );
2404 dump_rectangle( &req->old_rect );
2405 fprintf( stderr, "," );
2406 fprintf( stderr, " old_hide=%d,", req->old_hide );
2407 fprintf( stderr, " old_state=%d", req->old_state );
2410 static void dump_set_hook_request( const struct set_hook_request *req )
2412 fprintf( stderr, " id=%d,", req->id );
2413 fprintf( stderr, " tid=%04x,", req->tid );
2414 fprintf( stderr, " proc=%p,", req->proc );
2415 fprintf( stderr, " unicode=%d,", req->unicode );
2416 fprintf( stderr, " module=" );
2417 dump_varargs_unicode_str( cur_size );
2420 static void dump_set_hook_reply( const struct set_hook_reply *req )
2422 fprintf( stderr, " handle=%p", req->handle );
2425 static void dump_remove_hook_request( const struct remove_hook_request *req )
2427 fprintf( stderr, " handle=%p,", req->handle );
2428 fprintf( stderr, " id=%d,", req->id );
2429 fprintf( stderr, " proc=%p", req->proc );
2432 static void dump_start_hook_chain_request( const struct start_hook_chain_request *req )
2434 fprintf( stderr, " id=%d", req->id );
2437 static void dump_start_hook_chain_reply( const struct start_hook_chain_reply *req )
2439 fprintf( stderr, " handle=%p,", req->handle );
2440 fprintf( stderr, " proc=%p,", req->proc );
2441 fprintf( stderr, " unicode=%d,", req->unicode );
2442 fprintf( stderr, " module=" );
2443 dump_varargs_unicode_str( cur_size );
2446 static void dump_finish_hook_chain_request( const struct finish_hook_chain_request *req )
2448 fprintf( stderr, " id=%d", req->id );
2451 static void dump_get_next_hook_request( const struct get_next_hook_request *req )
2453 fprintf( stderr, " handle=%p", req->handle );
2456 static void dump_get_next_hook_reply( const struct get_next_hook_reply *req )
2458 fprintf( stderr, " next=%p,", req->next );
2459 fprintf( stderr, " id=%d,", req->id );
2460 fprintf( stderr, " proc=%p,", req->proc );
2461 fprintf( stderr, " prev_unicode=%d,", req->prev_unicode );
2462 fprintf( stderr, " next_unicode=%d,", req->next_unicode );
2463 fprintf( stderr, " module=" );
2464 dump_varargs_unicode_str( cur_size );
2467 static void dump_set_clipboard_info_request( const struct set_clipboard_info_request *req )
2469 fprintf( stderr, " flags=%08x,", req->flags );
2470 fprintf( stderr, " clipboard=%p,", req->clipboard );
2471 fprintf( stderr, " owner=%p,", req->owner );
2472 fprintf( stderr, " viewer=%p,", req->viewer );
2473 fprintf( stderr, " seqno=%08x", req->seqno );
2476 static void dump_set_clipboard_info_reply( const struct set_clipboard_info_reply *req )
2478 fprintf( stderr, " flags=%08x,", req->flags );
2479 fprintf( stderr, " old_clipboard=%p,", req->old_clipboard );
2480 fprintf( stderr, " old_owner=%p,", req->old_owner );
2481 fprintf( stderr, " old_viewer=%p,", req->old_viewer );
2482 fprintf( stderr, " seqno=%08x", req->seqno );
2485 static const dump_func req_dumpers[REQ_NB_REQUESTS] = {
2486 (dump_func)dump_new_process_request,
2487 (dump_func)dump_get_new_process_info_request,
2488 (dump_func)dump_new_thread_request,
2489 (dump_func)dump_boot_done_request,
2490 (dump_func)dump_init_process_request,
2491 (dump_func)dump_get_startup_info_request,
2492 (dump_func)dump_init_process_done_request,
2493 (dump_func)dump_init_thread_request,
2494 (dump_func)dump_terminate_process_request,
2495 (dump_func)dump_terminate_thread_request,
2496 (dump_func)dump_get_process_info_request,
2497 (dump_func)dump_set_process_info_request,
2498 (dump_func)dump_get_thread_info_request,
2499 (dump_func)dump_set_thread_info_request,
2500 (dump_func)dump_get_dll_info_request,
2501 (dump_func)dump_suspend_thread_request,
2502 (dump_func)dump_resume_thread_request,
2503 (dump_func)dump_load_dll_request,
2504 (dump_func)dump_unload_dll_request,
2505 (dump_func)dump_queue_apc_request,
2506 (dump_func)dump_get_apc_request,
2507 (dump_func)dump_close_handle_request,
2508 (dump_func)dump_set_handle_info_request,
2509 (dump_func)dump_dup_handle_request,
2510 (dump_func)dump_open_process_request,
2511 (dump_func)dump_open_thread_request,
2512 (dump_func)dump_select_request,
2513 (dump_func)dump_create_event_request,
2514 (dump_func)dump_event_op_request,
2515 (dump_func)dump_open_event_request,
2516 (dump_func)dump_create_mutex_request,
2517 (dump_func)dump_release_mutex_request,
2518 (dump_func)dump_open_mutex_request,
2519 (dump_func)dump_create_semaphore_request,
2520 (dump_func)dump_release_semaphore_request,
2521 (dump_func)dump_open_semaphore_request,
2522 (dump_func)dump_create_file_request,
2523 (dump_func)dump_alloc_file_handle_request,
2524 (dump_func)dump_get_handle_fd_request,
2525 (dump_func)dump_set_file_pointer_request,
2526 (dump_func)dump_truncate_file_request,
2527 (dump_func)dump_set_file_time_request,
2528 (dump_func)dump_flush_file_request,
2529 (dump_func)dump_get_file_info_request,
2530 (dump_func)dump_lock_file_request,
2531 (dump_func)dump_unlock_file_request,
2532 (dump_func)dump_create_socket_request,
2533 (dump_func)dump_accept_socket_request,
2534 (dump_func)dump_set_socket_event_request,
2535 (dump_func)dump_get_socket_event_request,
2536 (dump_func)dump_enable_socket_event_request,
2537 (dump_func)dump_set_socket_deferred_request,
2538 (dump_func)dump_alloc_console_request,
2539 (dump_func)dump_free_console_request,
2540 (dump_func)dump_get_console_renderer_events_request,
2541 (dump_func)dump_open_console_request,
2542 (dump_func)dump_get_console_wait_event_request,
2543 (dump_func)dump_get_console_mode_request,
2544 (dump_func)dump_set_console_mode_request,
2545 (dump_func)dump_set_console_input_info_request,
2546 (dump_func)dump_get_console_input_info_request,
2547 (dump_func)dump_append_console_input_history_request,
2548 (dump_func)dump_get_console_input_history_request,
2549 (dump_func)dump_create_console_output_request,
2550 (dump_func)dump_set_console_output_info_request,
2551 (dump_func)dump_get_console_output_info_request,
2552 (dump_func)dump_write_console_input_request,
2553 (dump_func)dump_read_console_input_request,
2554 (dump_func)dump_write_console_output_request,
2555 (dump_func)dump_fill_console_output_request,
2556 (dump_func)dump_read_console_output_request,
2557 (dump_func)dump_move_console_output_request,
2558 (dump_func)dump_send_console_signal_request,
2559 (dump_func)dump_create_change_notification_request,
2560 (dump_func)dump_next_change_notification_request,
2561 (dump_func)dump_create_mapping_request,
2562 (dump_func)dump_open_mapping_request,
2563 (dump_func)dump_get_mapping_info_request,
2564 (dump_func)dump_create_device_request,
2565 (dump_func)dump_get_device_id_request,
2566 (dump_func)dump_create_snapshot_request,
2567 (dump_func)dump_next_process_request,
2568 (dump_func)dump_next_thread_request,
2569 (dump_func)dump_next_module_request,
2570 (dump_func)dump_wait_debug_event_request,
2571 (dump_func)dump_queue_exception_event_request,
2572 (dump_func)dump_get_exception_status_request,
2573 (dump_func)dump_output_debug_string_request,
2574 (dump_func)dump_continue_debug_event_request,
2575 (dump_func)dump_debug_process_request,
2576 (dump_func)dump_debug_break_request,
2577 (dump_func)dump_set_debugger_kill_on_exit_request,
2578 (dump_func)dump_read_process_memory_request,
2579 (dump_func)dump_write_process_memory_request,
2580 (dump_func)dump_create_key_request,
2581 (dump_func)dump_open_key_request,
2582 (dump_func)dump_delete_key_request,
2583 (dump_func)dump_enum_key_request,
2584 (dump_func)dump_set_key_value_request,
2585 (dump_func)dump_get_key_value_request,
2586 (dump_func)dump_enum_key_value_request,
2587 (dump_func)dump_delete_key_value_request,
2588 (dump_func)dump_load_registry_request,
2589 (dump_func)dump_save_registry_request,
2590 (dump_func)dump_save_registry_atexit_request,
2591 (dump_func)dump_set_registry_levels_request,
2592 (dump_func)dump_set_registry_notification_request,
2593 (dump_func)dump_create_timer_request,
2594 (dump_func)dump_open_timer_request,
2595 (dump_func)dump_set_timer_request,
2596 (dump_func)dump_cancel_timer_request,
2597 (dump_func)dump_get_thread_context_request,
2598 (dump_func)dump_set_thread_context_request,
2599 (dump_func)dump_get_selector_entry_request,
2600 (dump_func)dump_add_atom_request,
2601 (dump_func)dump_delete_atom_request,
2602 (dump_func)dump_find_atom_request,
2603 (dump_func)dump_get_atom_name_request,
2604 (dump_func)dump_init_atom_table_request,
2605 (dump_func)dump_get_msg_queue_request,
2606 (dump_func)dump_set_queue_mask_request,
2607 (dump_func)dump_get_queue_status_request,
2608 (dump_func)dump_wait_input_idle_request,
2609 (dump_func)dump_send_message_request,
2610 (dump_func)dump_get_message_request,
2611 (dump_func)dump_reply_message_request,
2612 (dump_func)dump_get_message_reply_request,
2613 (dump_func)dump_set_win_timer_request,
2614 (dump_func)dump_kill_win_timer_request,
2615 (dump_func)dump_create_serial_request,
2616 (dump_func)dump_get_serial_info_request,
2617 (dump_func)dump_set_serial_info_request,
2618 (dump_func)dump_register_async_request,
2619 (dump_func)dump_create_named_pipe_request,
2620 (dump_func)dump_open_named_pipe_request,
2621 (dump_func)dump_connect_named_pipe_request,
2622 (dump_func)dump_wait_named_pipe_request,
2623 (dump_func)dump_disconnect_named_pipe_request,
2624 (dump_func)dump_get_named_pipe_info_request,
2625 (dump_func)dump_create_smb_request,
2626 (dump_func)dump_get_smb_info_request,
2627 (dump_func)dump_create_window_request,
2628 (dump_func)dump_link_window_request,
2629 (dump_func)dump_destroy_window_request,
2630 (dump_func)dump_set_window_owner_request,
2631 (dump_func)dump_get_window_info_request,
2632 (dump_func)dump_set_window_info_request,
2633 (dump_func)dump_get_window_parents_request,
2634 (dump_func)dump_get_window_children_request,
2635 (dump_func)dump_get_window_tree_request,
2636 (dump_func)dump_set_window_rectangles_request,
2637 (dump_func)dump_get_window_rectangles_request,
2638 (dump_func)dump_get_window_text_request,
2639 (dump_func)dump_set_window_text_request,
2640 (dump_func)dump_inc_window_paint_count_request,
2641 (dump_func)dump_get_windows_offset_request,
2642 (dump_func)dump_set_window_property_request,
2643 (dump_func)dump_remove_window_property_request,
2644 (dump_func)dump_get_window_property_request,
2645 (dump_func)dump_get_window_properties_request,
2646 (dump_func)dump_attach_thread_input_request,
2647 (dump_func)dump_get_thread_input_request,
2648 (dump_func)dump_get_key_state_request,
2649 (dump_func)dump_set_key_state_request,
2650 (dump_func)dump_set_foreground_window_request,
2651 (dump_func)dump_set_focus_window_request,
2652 (dump_func)dump_set_active_window_request,
2653 (dump_func)dump_set_capture_window_request,
2654 (dump_func)dump_set_caret_window_request,
2655 (dump_func)dump_set_caret_info_request,
2656 (dump_func)dump_set_hook_request,
2657 (dump_func)dump_remove_hook_request,
2658 (dump_func)dump_start_hook_chain_request,
2659 (dump_func)dump_finish_hook_chain_request,
2660 (dump_func)dump_get_next_hook_request,
2661 (dump_func)dump_set_clipboard_info_request,
2664 static const dump_func reply_dumpers[REQ_NB_REQUESTS] = {
2665 (dump_func)dump_new_process_reply,
2666 (dump_func)dump_get_new_process_info_reply,
2667 (dump_func)dump_new_thread_reply,
2668 (dump_func)0,
2669 (dump_func)dump_init_process_reply,
2670 (dump_func)dump_get_startup_info_reply,
2671 (dump_func)dump_init_process_done_reply,
2672 (dump_func)dump_init_thread_reply,
2673 (dump_func)dump_terminate_process_reply,
2674 (dump_func)dump_terminate_thread_reply,
2675 (dump_func)dump_get_process_info_reply,
2676 (dump_func)0,
2677 (dump_func)dump_get_thread_info_reply,
2678 (dump_func)0,
2679 (dump_func)dump_get_dll_info_reply,
2680 (dump_func)dump_suspend_thread_reply,
2681 (dump_func)dump_resume_thread_reply,
2682 (dump_func)0,
2683 (dump_func)0,
2684 (dump_func)0,
2685 (dump_func)dump_get_apc_reply,
2686 (dump_func)dump_close_handle_reply,
2687 (dump_func)dump_set_handle_info_reply,
2688 (dump_func)dump_dup_handle_reply,
2689 (dump_func)dump_open_process_reply,
2690 (dump_func)dump_open_thread_reply,
2691 (dump_func)0,
2692 (dump_func)dump_create_event_reply,
2693 (dump_func)0,
2694 (dump_func)dump_open_event_reply,
2695 (dump_func)dump_create_mutex_reply,
2696 (dump_func)0,
2697 (dump_func)dump_open_mutex_reply,
2698 (dump_func)dump_create_semaphore_reply,
2699 (dump_func)dump_release_semaphore_reply,
2700 (dump_func)dump_open_semaphore_reply,
2701 (dump_func)dump_create_file_reply,
2702 (dump_func)dump_alloc_file_handle_reply,
2703 (dump_func)dump_get_handle_fd_reply,
2704 (dump_func)dump_set_file_pointer_reply,
2705 (dump_func)0,
2706 (dump_func)0,
2707 (dump_func)dump_flush_file_reply,
2708 (dump_func)dump_get_file_info_reply,
2709 (dump_func)dump_lock_file_reply,
2710 (dump_func)0,
2711 (dump_func)dump_create_socket_reply,
2712 (dump_func)dump_accept_socket_reply,
2713 (dump_func)0,
2714 (dump_func)dump_get_socket_event_reply,
2715 (dump_func)0,
2716 (dump_func)0,
2717 (dump_func)dump_alloc_console_reply,
2718 (dump_func)0,
2719 (dump_func)dump_get_console_renderer_events_reply,
2720 (dump_func)dump_open_console_reply,
2721 (dump_func)dump_get_console_wait_event_reply,
2722 (dump_func)dump_get_console_mode_reply,
2723 (dump_func)0,
2724 (dump_func)0,
2725 (dump_func)dump_get_console_input_info_reply,
2726 (dump_func)0,
2727 (dump_func)dump_get_console_input_history_reply,
2728 (dump_func)dump_create_console_output_reply,
2729 (dump_func)0,
2730 (dump_func)dump_get_console_output_info_reply,
2731 (dump_func)dump_write_console_input_reply,
2732 (dump_func)dump_read_console_input_reply,
2733 (dump_func)dump_write_console_output_reply,
2734 (dump_func)dump_fill_console_output_reply,
2735 (dump_func)dump_read_console_output_reply,
2736 (dump_func)0,
2737 (dump_func)0,
2738 (dump_func)dump_create_change_notification_reply,
2739 (dump_func)0,
2740 (dump_func)dump_create_mapping_reply,
2741 (dump_func)dump_open_mapping_reply,
2742 (dump_func)dump_get_mapping_info_reply,
2743 (dump_func)dump_create_device_reply,
2744 (dump_func)dump_get_device_id_reply,
2745 (dump_func)dump_create_snapshot_reply,
2746 (dump_func)dump_next_process_reply,
2747 (dump_func)dump_next_thread_reply,
2748 (dump_func)dump_next_module_reply,
2749 (dump_func)dump_wait_debug_event_reply,
2750 (dump_func)dump_queue_exception_event_reply,
2751 (dump_func)dump_get_exception_status_reply,
2752 (dump_func)0,
2753 (dump_func)0,
2754 (dump_func)0,
2755 (dump_func)dump_debug_break_reply,
2756 (dump_func)0,
2757 (dump_func)dump_read_process_memory_reply,
2758 (dump_func)0,
2759 (dump_func)dump_create_key_reply,
2760 (dump_func)dump_open_key_reply,
2761 (dump_func)0,
2762 (dump_func)dump_enum_key_reply,
2763 (dump_func)0,
2764 (dump_func)dump_get_key_value_reply,
2765 (dump_func)dump_enum_key_value_reply,
2766 (dump_func)0,
2767 (dump_func)0,
2768 (dump_func)0,
2769 (dump_func)0,
2770 (dump_func)0,
2771 (dump_func)0,
2772 (dump_func)dump_create_timer_reply,
2773 (dump_func)dump_open_timer_reply,
2774 (dump_func)dump_set_timer_reply,
2775 (dump_func)dump_cancel_timer_reply,
2776 (dump_func)dump_get_thread_context_reply,
2777 (dump_func)0,
2778 (dump_func)dump_get_selector_entry_reply,
2779 (dump_func)dump_add_atom_reply,
2780 (dump_func)0,
2781 (dump_func)dump_find_atom_reply,
2782 (dump_func)dump_get_atom_name_reply,
2783 (dump_func)0,
2784 (dump_func)dump_get_msg_queue_reply,
2785 (dump_func)dump_set_queue_mask_reply,
2786 (dump_func)dump_get_queue_status_reply,
2787 (dump_func)dump_wait_input_idle_reply,
2788 (dump_func)0,
2789 (dump_func)dump_get_message_reply,
2790 (dump_func)0,
2791 (dump_func)dump_get_message_reply_reply,
2792 (dump_func)0,
2793 (dump_func)0,
2794 (dump_func)dump_create_serial_reply,
2795 (dump_func)dump_get_serial_info_reply,
2796 (dump_func)0,
2797 (dump_func)0,
2798 (dump_func)dump_create_named_pipe_reply,
2799 (dump_func)dump_open_named_pipe_reply,
2800 (dump_func)0,
2801 (dump_func)0,
2802 (dump_func)dump_disconnect_named_pipe_reply,
2803 (dump_func)dump_get_named_pipe_info_reply,
2804 (dump_func)dump_create_smb_reply,
2805 (dump_func)dump_get_smb_info_reply,
2806 (dump_func)dump_create_window_reply,
2807 (dump_func)dump_link_window_reply,
2808 (dump_func)0,
2809 (dump_func)dump_set_window_owner_reply,
2810 (dump_func)dump_get_window_info_reply,
2811 (dump_func)dump_set_window_info_reply,
2812 (dump_func)dump_get_window_parents_reply,
2813 (dump_func)dump_get_window_children_reply,
2814 (dump_func)dump_get_window_tree_reply,
2815 (dump_func)0,
2816 (dump_func)dump_get_window_rectangles_reply,
2817 (dump_func)dump_get_window_text_reply,
2818 (dump_func)0,
2819 (dump_func)0,
2820 (dump_func)dump_get_windows_offset_reply,
2821 (dump_func)0,
2822 (dump_func)dump_remove_window_property_reply,
2823 (dump_func)dump_get_window_property_reply,
2824 (dump_func)dump_get_window_properties_reply,
2825 (dump_func)0,
2826 (dump_func)dump_get_thread_input_reply,
2827 (dump_func)dump_get_key_state_reply,
2828 (dump_func)0,
2829 (dump_func)dump_set_foreground_window_reply,
2830 (dump_func)dump_set_focus_window_reply,
2831 (dump_func)dump_set_active_window_reply,
2832 (dump_func)dump_set_capture_window_reply,
2833 (dump_func)dump_set_caret_window_reply,
2834 (dump_func)dump_set_caret_info_reply,
2835 (dump_func)dump_set_hook_reply,
2836 (dump_func)0,
2837 (dump_func)dump_start_hook_chain_reply,
2838 (dump_func)0,
2839 (dump_func)dump_get_next_hook_reply,
2840 (dump_func)dump_set_clipboard_info_reply,
2843 static const char * const req_names[REQ_NB_REQUESTS] = {
2844 "new_process",
2845 "get_new_process_info",
2846 "new_thread",
2847 "boot_done",
2848 "init_process",
2849 "get_startup_info",
2850 "init_process_done",
2851 "init_thread",
2852 "terminate_process",
2853 "terminate_thread",
2854 "get_process_info",
2855 "set_process_info",
2856 "get_thread_info",
2857 "set_thread_info",
2858 "get_dll_info",
2859 "suspend_thread",
2860 "resume_thread",
2861 "load_dll",
2862 "unload_dll",
2863 "queue_apc",
2864 "get_apc",
2865 "close_handle",
2866 "set_handle_info",
2867 "dup_handle",
2868 "open_process",
2869 "open_thread",
2870 "select",
2871 "create_event",
2872 "event_op",
2873 "open_event",
2874 "create_mutex",
2875 "release_mutex",
2876 "open_mutex",
2877 "create_semaphore",
2878 "release_semaphore",
2879 "open_semaphore",
2880 "create_file",
2881 "alloc_file_handle",
2882 "get_handle_fd",
2883 "set_file_pointer",
2884 "truncate_file",
2885 "set_file_time",
2886 "flush_file",
2887 "get_file_info",
2888 "lock_file",
2889 "unlock_file",
2890 "create_socket",
2891 "accept_socket",
2892 "set_socket_event",
2893 "get_socket_event",
2894 "enable_socket_event",
2895 "set_socket_deferred",
2896 "alloc_console",
2897 "free_console",
2898 "get_console_renderer_events",
2899 "open_console",
2900 "get_console_wait_event",
2901 "get_console_mode",
2902 "set_console_mode",
2903 "set_console_input_info",
2904 "get_console_input_info",
2905 "append_console_input_history",
2906 "get_console_input_history",
2907 "create_console_output",
2908 "set_console_output_info",
2909 "get_console_output_info",
2910 "write_console_input",
2911 "read_console_input",
2912 "write_console_output",
2913 "fill_console_output",
2914 "read_console_output",
2915 "move_console_output",
2916 "send_console_signal",
2917 "create_change_notification",
2918 "next_change_notification",
2919 "create_mapping",
2920 "open_mapping",
2921 "get_mapping_info",
2922 "create_device",
2923 "get_device_id",
2924 "create_snapshot",
2925 "next_process",
2926 "next_thread",
2927 "next_module",
2928 "wait_debug_event",
2929 "queue_exception_event",
2930 "get_exception_status",
2931 "output_debug_string",
2932 "continue_debug_event",
2933 "debug_process",
2934 "debug_break",
2935 "set_debugger_kill_on_exit",
2936 "read_process_memory",
2937 "write_process_memory",
2938 "create_key",
2939 "open_key",
2940 "delete_key",
2941 "enum_key",
2942 "set_key_value",
2943 "get_key_value",
2944 "enum_key_value",
2945 "delete_key_value",
2946 "load_registry",
2947 "save_registry",
2948 "save_registry_atexit",
2949 "set_registry_levels",
2950 "set_registry_notification",
2951 "create_timer",
2952 "open_timer",
2953 "set_timer",
2954 "cancel_timer",
2955 "get_thread_context",
2956 "set_thread_context",
2957 "get_selector_entry",
2958 "add_atom",
2959 "delete_atom",
2960 "find_atom",
2961 "get_atom_name",
2962 "init_atom_table",
2963 "get_msg_queue",
2964 "set_queue_mask",
2965 "get_queue_status",
2966 "wait_input_idle",
2967 "send_message",
2968 "get_message",
2969 "reply_message",
2970 "get_message_reply",
2971 "set_win_timer",
2972 "kill_win_timer",
2973 "create_serial",
2974 "get_serial_info",
2975 "set_serial_info",
2976 "register_async",
2977 "create_named_pipe",
2978 "open_named_pipe",
2979 "connect_named_pipe",
2980 "wait_named_pipe",
2981 "disconnect_named_pipe",
2982 "get_named_pipe_info",
2983 "create_smb",
2984 "get_smb_info",
2985 "create_window",
2986 "link_window",
2987 "destroy_window",
2988 "set_window_owner",
2989 "get_window_info",
2990 "set_window_info",
2991 "get_window_parents",
2992 "get_window_children",
2993 "get_window_tree",
2994 "set_window_rectangles",
2995 "get_window_rectangles",
2996 "get_window_text",
2997 "set_window_text",
2998 "inc_window_paint_count",
2999 "get_windows_offset",
3000 "set_window_property",
3001 "remove_window_property",
3002 "get_window_property",
3003 "get_window_properties",
3004 "attach_thread_input",
3005 "get_thread_input",
3006 "get_key_state",
3007 "set_key_state",
3008 "set_foreground_window",
3009 "set_focus_window",
3010 "set_active_window",
3011 "set_capture_window",
3012 "set_caret_window",
3013 "set_caret_info",
3014 "set_hook",
3015 "remove_hook",
3016 "start_hook_chain",
3017 "finish_hook_chain",
3018 "get_next_hook",
3019 "set_clipboard_info",
3022 /* ### make_requests end ### */
3023 /* Everything above this line is generated automatically by tools/make_requests */
3025 static const char *get_status_name( unsigned int status )
3027 #define NAME(status) { #status, STATUS_##status }
3028 static const struct
3030 const char *name;
3031 unsigned int value;
3032 } status_names[] =
3034 NAME(ACCESS_DENIED),
3035 NAME(ACCESS_VIOLATION),
3036 NAME(BUFFER_OVERFLOW),
3037 NAME(CHILD_MUST_BE_VOLATILE),
3038 NAME(DIRECTORY_NOT_EMPTY),
3039 NAME(DISK_FULL),
3040 NAME(FILE_LOCK_CONFLICT),
3041 NAME(INVALID_FILE_FOR_SECTION),
3042 NAME(INVALID_HANDLE),
3043 NAME(INVALID_PARAMETER),
3044 NAME(KEY_DELETED),
3045 NAME(MEDIA_WRITE_PROTECTED),
3046 NAME(MUTANT_NOT_OWNED),
3047 NAME(NOT_REGISTRY_FILE),
3048 NAME(NO_MEMORY),
3049 NAME(NO_MORE_ENTRIES),
3050 NAME(NO_MORE_FILES),
3051 NAME(NO_SUCH_FILE),
3052 NAME(OBJECT_NAME_COLLISION),
3053 NAME(OBJECT_NAME_INVALID),
3054 NAME(OBJECT_NAME_NOT_FOUND),
3055 NAME(OBJECT_PATH_INVALID),
3056 NAME(OBJECT_TYPE_MISMATCH),
3057 NAME(PENDING),
3058 NAME(PIPE_BROKEN),
3059 NAME(SEMAPHORE_LIMIT_EXCEEDED),
3060 NAME(SHARING_VIOLATION),
3061 NAME(SUSPEND_COUNT_EXCEEDED),
3062 NAME(TIMEOUT),
3063 NAME(TOO_MANY_OPENED_FILES),
3064 NAME(UNSUCCESSFUL),
3065 NAME(USER_APC),
3066 { NULL, 0 } /* terminator */
3068 #undef NAME
3070 int i;
3071 static char buffer[10];
3073 if (status)
3075 for (i = 0; status_names[i].name; i++)
3076 if (status_names[i].value == status) return status_names[i].name;
3078 sprintf( buffer, "%x", status );
3079 return buffer;
3082 void trace_request(void)
3084 enum request req = current->req.request_header.req;
3085 if (req < REQ_NB_REQUESTS)
3087 fprintf( stderr, "%04x: %s(", current->id, req_names[req] );
3088 if (req_dumpers[req])
3090 cur_pos = 0;
3091 cur_data = get_req_data();
3092 cur_size = get_req_data_size();
3093 req_dumpers[req]( &current->req );
3095 fprintf( stderr, " )\n" );
3097 else fprintf( stderr, "%04x: %d(?)\n", current->id, req );
3100 void trace_reply( enum request req, const union generic_reply *reply )
3102 if (req < REQ_NB_REQUESTS)
3104 fprintf( stderr, "%04x: %s() = %s",
3105 current->id, req_names[req], get_status_name(current->error) );
3106 if (reply_dumpers[req])
3108 fprintf( stderr, " {" );
3109 cur_pos = 0;
3110 cur_data = current->reply_data;
3111 cur_size = reply->reply_header.reply_size;
3112 reply_dumpers[req]( reply );
3113 fprintf( stderr, " }" );
3115 fputc( '\n', stderr );
3117 else fprintf( stderr, "%04x: %d() = %s\n",
3118 current->id, req, get_status_name(current->error) );