2 * Server request tracing
4 * Copyright (C) 1999 Alexandre Julliard
11 #include <sys/types.h>
23 /* utility functions */
25 static const void *get_data( const void *req )
27 return (char *)get_req_data(req) + cur_pos;
30 static size_t get_size( const void *req )
32 return get_req_data_size(req) - cur_pos;
35 static void dump_uints( const int *ptr, int len )
40 fprintf( stderr, "%08x", *ptr++ );
41 if (--len) fputc( ',', stderr );
46 static void dump_rectangle( const void *req, const rectangle_t *rect )
48 fprintf( stderr, "{%d,%d;%d,%d}",
49 rect->left, rect->top, rect->right, rect->bottom );
52 static void dump_context( const CONTEXT *context )
55 fprintf( stderr, "{flags=%08lx,eax=%08lx,ebx=%08lx,ecx=%08lx,edx=%08lx,esi=%08lx,edi=%08lx,"
56 "ebp=%08lx,eip=%08lx,esp=%08lx,eflags=%08lx,cs=%04lx,ds=%04lx,es=%04lx,"
57 "fs=%04lx,gs=%04lx,dr0=%08lx,dr1=%08lx,dr2=%08lx,dr3=%08lx,dr6=%08lx,dr7=%08lx,",
58 context->ContextFlags, context->Eax, context->Ebx, context->Ecx, context->Edx,
59 context->Esi, context->Edi, context->Ebp, context->Eip, context->Esp, context->EFlags,
60 context->SegCs, context->SegDs, context->SegEs, context->SegFs, context->SegGs,
61 context->Dr0, context->Dr1, context->Dr2, context->Dr3, context->Dr6, context->Dr7 );
62 fprintf( stderr, "float=" );
63 dump_uints( (int *)&context->FloatSave, sizeof(context->FloatSave) / sizeof(int) );
64 fprintf( stderr, "}" );
66 dump_uints( (int *)context, sizeof(*context) / sizeof(int) );
70 static void dump_exc_record( const EXCEPTION_RECORD *rec )
73 fprintf( stderr, "{code=%lx,flags=%lx,rec=%p,addr=%p,params={",
74 rec->ExceptionCode, rec->ExceptionFlags, rec->ExceptionRecord,
75 rec->ExceptionAddress );
76 for (i = 0; i < min(rec->NumberParameters,EXCEPTION_MAXIMUM_PARAMETERS); i++)
78 if (i) fputc( ',', stderr );
79 fprintf( stderr, "%lx", rec->ExceptionInformation[i] );
84 static size_t dump_varargs_ints( const void *req )
86 const int *data = get_data(req);
87 size_t len = get_size(req) / sizeof(*data);
92 fprintf( stderr, "%d", *data++ );
93 if (--len) fputc( ',', stderr );
99 static size_t dump_varargs_handles( const void *req )
101 const handle_t *data = get_data(req);
102 size_t len = get_size(req) / sizeof(*data);
104 fputc( '{', stderr );
107 fprintf( stderr, "%d", *data++ );
108 if (--len) fputc( ',', stderr );
110 fputc( '}', stderr );
111 return get_size(req);
114 static size_t dump_varargs_ptrs( const void *req )
116 void * const *data = get_data(req);
117 size_t len = get_size(req) / sizeof(*data);
119 fputc( '{', stderr );
122 fprintf( stderr, "%p", *data++ );
123 if (--len) fputc( ',', stderr );
125 fputc( '}', stderr );
126 return get_size(req);
129 static size_t dump_varargs_user_handles( const void *req )
131 const user_handle_t *data = get_data(req);
132 size_t len = get_size(req) / sizeof(*data);
134 fputc( '{', stderr );
137 fprintf( stderr, "%08x", *data++ );
138 if (--len) fputc( ',', stderr );
140 fputc( '}', stderr );
141 return get_size(req);
144 static size_t dump_varargs_bytes( const void *req )
146 const unsigned char *data = get_data(req);
147 size_t len = get_size(req);
149 fputc( '{', stderr );
152 fprintf( stderr, "%02x", *data++ );
153 if (--len) fputc( ',', stderr );
155 fputc( '}', stderr );
156 return get_size(req);
159 static size_t dump_varargs_string( const void *req )
161 fprintf( stderr, "\"%.*s\"", (int)get_size(req), (char *)get_data(req) );
162 return get_size(req);
165 static size_t dump_varargs_unicode_len_str( const void *req )
167 const WCHAR *str = get_data(req);
168 int len = *str++ + sizeof(WCHAR);
169 len = min( len, get_size(req) );
170 fprintf( stderr, "L\"" );
171 if (len >= sizeof(WCHAR)) dump_strW( str, (len / sizeof(WCHAR)) - 1, stderr, "\"\"" );
172 fputc( '\"', stderr );
176 static size_t dump_varargs_unicode_str( const void *req )
178 fprintf( stderr, "L\"" );
179 dump_strW( get_data(req), get_size(req) / sizeof(WCHAR), stderr, "\"\"" );
180 fputc( '\"', stderr );
181 return get_size(req);
184 static size_t dump_varargs_context( const void *req )
186 dump_context( get_data(req) );
187 return get_size(req);
190 static size_t dump_varargs_exc_event( const void *req )
192 const CONTEXT *ptr = get_data(req);
193 fprintf( stderr, "{context=" );
195 fprintf( stderr, ",rec=" );
196 dump_exc_record( (EXCEPTION_RECORD *)(ptr + 1) );
197 fputc( '}', stderr );
198 return get_size(req);
201 static size_t dump_varargs_debug_event( const void *req )
203 const debug_event_t *event = get_data(req);
207 fprintf( stderr, "{}" );
212 case EXCEPTION_DEBUG_EVENT:
213 fprintf( stderr, "{exception," );
214 dump_exc_record( &event->info.exception.record );
215 fprintf( stderr, ",first=%d}", event->info.exception.first );
217 case CREATE_THREAD_DEBUG_EVENT:
218 fprintf( stderr, "{create_thread,thread=%d,teb=%p,start=%p}",
219 event->info.create_thread.handle, event->info.create_thread.teb,
220 event->info.create_thread.start );
222 case CREATE_PROCESS_DEBUG_EVENT:
223 fprintf( stderr, "{create_process,file=%d,process=%d,thread=%d,base=%p,offset=%d,"
224 "size=%d,teb=%p,start=%p,name=%p,unicode=%d}",
225 event->info.create_process.file, event->info.create_process.process,
226 event->info.create_process.thread, event->info.create_process.base,
227 event->info.create_process.dbg_offset, event->info.create_process.dbg_size,
228 event->info.create_process.teb, event->info.create_process.start,
229 event->info.create_process.name, event->info.create_process.unicode );
231 case EXIT_THREAD_DEBUG_EVENT:
232 fprintf( stderr, "{exit_thread,code=%d}", event->info.exit.exit_code );
234 case EXIT_PROCESS_DEBUG_EVENT:
235 fprintf( stderr, "{exit_process,code=%d}", event->info.exit.exit_code );
237 case LOAD_DLL_DEBUG_EVENT:
238 fprintf( stderr, "{load_dll,file=%d,base=%p,offset=%d,size=%d,name=%p,unicode=%d}",
239 event->info.load_dll.handle, event->info.load_dll.base,
240 event->info.load_dll.dbg_offset, event->info.load_dll.dbg_size,
241 event->info.load_dll.name, event->info.load_dll.unicode );
243 case UNLOAD_DLL_DEBUG_EVENT:
244 fprintf( stderr, "{unload_dll,base=%p}", event->info.unload_dll.base );
246 case OUTPUT_DEBUG_STRING_EVENT:
247 fprintf( stderr, "{output_string,data=%p,unicode=%d,len=%d}",
248 event->info.output_string.string, event->info.output_string.unicode,
249 event->info.output_string.length );
252 fprintf( stderr, "{rip,err=%d,type=%d}",
253 event->info.rip_info.error, event->info.rip_info.type );
255 case 0: /* zero is the code returned on timeouts */
256 fprintf( stderr, "{}" );
259 fprintf( stderr, "{code=??? (%d)}", event->code );
262 return get_size(req);
265 static size_t dump_varargs_input_records( const void *req )
267 const INPUT_RECORD *rec = get_data(req);
268 size_t len = get_size(req) / sizeof(*rec);
270 fputc( '{', stderr );
273 fprintf( stderr, "{%04x,...}", rec->EventType );
275 if (--len) fputc( ',', stderr );
277 fputc( '}', stderr );
278 return get_size(req);
281 static size_t dump_varargs_properties( const void *req )
283 const property_data_t *prop = get_data(req);
284 size_t len = get_size(req) / sizeof(*prop);
286 fputc( '{', stderr );
289 fprintf( stderr, "{atom=%04x,str=%d,handle=%08x}",
290 prop->atom, prop->string, prop->handle );
292 if (--len) fputc( ',', stderr );
294 fputc( '}', stderr );
295 return get_size(req);
298 typedef void (*dump_func)( const void *req );
300 /* Everything below this line is generated automatically by tools/make_requests */
301 /* ### make_requests begin ### */
303 static void dump_new_process_request( const struct new_process_request *req )
305 fprintf( stderr, " inherit_all=%d,", req->inherit_all );
306 fprintf( stderr, " create_flags=%d,", req->create_flags );
307 fprintf( stderr, " start_flags=%d,", req->start_flags );
308 fprintf( stderr, " exe_file=%d,", req->exe_file );
309 fprintf( stderr, " hstdin=%d,", req->hstdin );
310 fprintf( stderr, " hstdout=%d,", req->hstdout );
311 fprintf( stderr, " hstderr=%d,", req->hstderr );
312 fprintf( stderr, " cmd_show=%d,", req->cmd_show );
313 fprintf( stderr, " filename=" );
314 cur_pos += dump_varargs_string( req );
317 static void dump_new_process_reply( const struct new_process_request *req )
319 fprintf( stderr, " info=%d", req->info );
322 static void dump_get_new_process_info_request( const struct get_new_process_info_request *req )
324 fprintf( stderr, " info=%d,", req->info );
325 fprintf( stderr, " pinherit=%d,", req->pinherit );
326 fprintf( stderr, " tinherit=%d", req->tinherit );
329 static void dump_get_new_process_info_reply( const struct get_new_process_info_request *req )
331 fprintf( stderr, " pid=%p,", req->pid );
332 fprintf( stderr, " phandle=%d,", req->phandle );
333 fprintf( stderr, " tid=%p,", req->tid );
334 fprintf( stderr, " thandle=%d,", req->thandle );
335 fprintf( stderr, " event=%d", req->event );
338 static void dump_new_thread_request( const struct new_thread_request *req )
340 fprintf( stderr, " suspend=%d,", req->suspend );
341 fprintf( stderr, " inherit=%d,", req->inherit );
342 fprintf( stderr, " request_fd=%d", req->request_fd );
345 static void dump_new_thread_reply( const struct new_thread_request *req )
347 fprintf( stderr, " tid=%p,", req->tid );
348 fprintf( stderr, " handle=%d", req->handle );
351 static void dump_boot_done_request( const struct boot_done_request *req )
353 fprintf( stderr, " debug_level=%d", req->debug_level );
356 static void dump_init_process_request( const struct init_process_request *req )
358 fprintf( stderr, " ldt_copy=%p,", req->ldt_copy );
359 fprintf( stderr, " ppid=%d", req->ppid );
362 static void dump_init_process_reply( const struct init_process_request *req )
364 fprintf( stderr, " create_flags=%d,", req->create_flags );
365 fprintf( stderr, " start_flags=%d,", req->start_flags );
366 fprintf( stderr, " server_start=%08x,", req->server_start );
367 fprintf( stderr, " exe_file=%d,", req->exe_file );
368 fprintf( stderr, " hstdin=%d,", req->hstdin );
369 fprintf( stderr, " hstdout=%d,", req->hstdout );
370 fprintf( stderr, " hstderr=%d,", req->hstderr );
371 fprintf( stderr, " cmd_show=%d,", req->cmd_show );
372 fprintf( stderr, " filename=" );
373 cur_pos += dump_varargs_string( req );
376 static void dump_init_process_done_request( const struct init_process_done_request *req )
378 fprintf( stderr, " module=%p,", req->module );
379 fprintf( stderr, " entry=%p,", req->entry );
380 fprintf( stderr, " name=%p,", req->name );
381 fprintf( stderr, " exe_file=%d,", req->exe_file );
382 fprintf( stderr, " gui=%d", req->gui );
385 static void dump_init_process_done_reply( const struct init_process_done_request *req )
387 fprintf( stderr, " debugged=%d", req->debugged );
390 static void dump_init_thread_request( const struct init_thread_request *req )
392 fprintf( stderr, " unix_pid=%d,", req->unix_pid );
393 fprintf( stderr, " teb=%p,", req->teb );
394 fprintf( stderr, " entry=%p,", req->entry );
395 fprintf( stderr, " reply_fd=%d,", req->reply_fd );
396 fprintf( stderr, " wait_fd=%d", req->wait_fd );
399 static void dump_init_thread_reply( const struct init_thread_request *req )
401 fprintf( stderr, " pid=%p,", req->pid );
402 fprintf( stderr, " tid=%p,", req->tid );
403 fprintf( stderr, " boot=%d,", req->boot );
404 fprintf( stderr, " version=%d", req->version );
407 static void dump_set_thread_buffer_request( const struct set_thread_buffer_request *req )
409 fprintf( stderr, " fd=%d", req->fd );
412 static void dump_set_thread_buffer_reply( const struct set_thread_buffer_request *req )
414 fprintf( stderr, " offset=%08x,", req->offset );
415 fprintf( stderr, " size=%08x", req->size );
418 static void dump_terminate_process_request( const struct terminate_process_request *req )
420 fprintf( stderr, " handle=%d,", req->handle );
421 fprintf( stderr, " exit_code=%d", req->exit_code );
424 static void dump_terminate_process_reply( const struct terminate_process_request *req )
426 fprintf( stderr, " self=%d", req->self );
429 static void dump_terminate_thread_request( const struct terminate_thread_request *req )
431 fprintf( stderr, " handle=%d,", req->handle );
432 fprintf( stderr, " exit_code=%d", req->exit_code );
435 static void dump_terminate_thread_reply( const struct terminate_thread_request *req )
437 fprintf( stderr, " self=%d,", req->self );
438 fprintf( stderr, " last=%d", req->last );
441 static void dump_get_process_info_request( const struct get_process_info_request *req )
443 fprintf( stderr, " handle=%d", req->handle );
446 static void dump_get_process_info_reply( const struct get_process_info_request *req )
448 fprintf( stderr, " pid=%p,", req->pid );
449 fprintf( stderr, " debugged=%d,", req->debugged );
450 fprintf( stderr, " exit_code=%d,", req->exit_code );
451 fprintf( stderr, " priority=%d,", req->priority );
452 fprintf( stderr, " process_affinity=%d,", req->process_affinity );
453 fprintf( stderr, " system_affinity=%d", req->system_affinity );
456 static void dump_set_process_info_request( const struct set_process_info_request *req )
458 fprintf( stderr, " handle=%d,", req->handle );
459 fprintf( stderr, " mask=%d,", req->mask );
460 fprintf( stderr, " priority=%d,", req->priority );
461 fprintf( stderr, " affinity=%d", req->affinity );
464 static void dump_get_thread_info_request( const struct get_thread_info_request *req )
466 fprintf( stderr, " handle=%d,", req->handle );
467 fprintf( stderr, " tid_in=%p", req->tid_in );
470 static void dump_get_thread_info_reply( const struct get_thread_info_request *req )
472 fprintf( stderr, " tid=%p,", req->tid );
473 fprintf( stderr, " teb=%p,", req->teb );
474 fprintf( stderr, " exit_code=%d,", req->exit_code );
475 fprintf( stderr, " priority=%d", req->priority );
478 static void dump_set_thread_info_request( const struct set_thread_info_request *req )
480 fprintf( stderr, " handle=%d,", req->handle );
481 fprintf( stderr, " mask=%d,", req->mask );
482 fprintf( stderr, " priority=%d,", req->priority );
483 fprintf( stderr, " affinity=%d", req->affinity );
486 static void dump_suspend_thread_request( const struct suspend_thread_request *req )
488 fprintf( stderr, " handle=%d", req->handle );
491 static void dump_suspend_thread_reply( const struct suspend_thread_request *req )
493 fprintf( stderr, " count=%d", req->count );
496 static void dump_resume_thread_request( const struct resume_thread_request *req )
498 fprintf( stderr, " handle=%d", req->handle );
501 static void dump_resume_thread_reply( const struct resume_thread_request *req )
503 fprintf( stderr, " count=%d", req->count );
506 static void dump_load_dll_request( const struct load_dll_request *req )
508 fprintf( stderr, " handle=%d,", req->handle );
509 fprintf( stderr, " base=%p,", req->base );
510 fprintf( stderr, " dbg_offset=%d,", req->dbg_offset );
511 fprintf( stderr, " dbg_size=%d,", req->dbg_size );
512 fprintf( stderr, " name=%p", req->name );
515 static void dump_unload_dll_request( const struct unload_dll_request *req )
517 fprintf( stderr, " base=%p", req->base );
520 static void dump_queue_apc_request( const struct queue_apc_request *req )
522 fprintf( stderr, " handle=%d,", req->handle );
523 fprintf( stderr, " user=%d,", req->user );
524 fprintf( stderr, " func=%p,", req->func );
525 fprintf( stderr, " param=%p", req->param );
528 static void dump_get_apc_request( const struct get_apc_request *req )
530 fprintf( stderr, " alertable=%d", req->alertable );
533 static void dump_get_apc_reply( const struct get_apc_request *req )
535 fprintf( stderr, " func=%p,", req->func );
536 fprintf( stderr, " type=%d,", req->type );
537 fprintf( stderr, " args=" );
538 cur_pos += dump_varargs_ptrs( req );
541 static void dump_close_handle_request( const struct close_handle_request *req )
543 fprintf( stderr, " handle=%d", req->handle );
546 static void dump_close_handle_reply( const struct close_handle_request *req )
548 fprintf( stderr, " fd=%d", req->fd );
551 static void dump_set_handle_info_request( const struct set_handle_info_request *req )
553 fprintf( stderr, " handle=%d,", req->handle );
554 fprintf( stderr, " flags=%d,", req->flags );
555 fprintf( stderr, " mask=%d,", req->mask );
556 fprintf( stderr, " fd=%d", req->fd );
559 static void dump_set_handle_info_reply( const struct set_handle_info_request *req )
561 fprintf( stderr, " old_flags=%d,", req->old_flags );
562 fprintf( stderr, " cur_fd=%d", req->cur_fd );
565 static void dump_dup_handle_request( const struct dup_handle_request *req )
567 fprintf( stderr, " src_process=%d,", req->src_process );
568 fprintf( stderr, " src_handle=%d,", req->src_handle );
569 fprintf( stderr, " dst_process=%d,", req->dst_process );
570 fprintf( stderr, " access=%08x,", req->access );
571 fprintf( stderr, " inherit=%d,", req->inherit );
572 fprintf( stderr, " options=%d", req->options );
575 static void dump_dup_handle_reply( const struct dup_handle_request *req )
577 fprintf( stderr, " handle=%d,", req->handle );
578 fprintf( stderr, " fd=%d", req->fd );
581 static void dump_open_process_request( const struct open_process_request *req )
583 fprintf( stderr, " pid=%p,", req->pid );
584 fprintf( stderr, " access=%08x,", req->access );
585 fprintf( stderr, " inherit=%d", req->inherit );
588 static void dump_open_process_reply( const struct open_process_request *req )
590 fprintf( stderr, " handle=%d", req->handle );
593 static void dump_select_request( const struct select_request *req )
595 fprintf( stderr, " flags=%d,", req->flags );
596 fprintf( stderr, " cookie=%p,", req->cookie );
597 fprintf( stderr, " sec=%d,", req->sec );
598 fprintf( stderr, " usec=%d,", req->usec );
599 fprintf( stderr, " handles=" );
600 cur_pos += dump_varargs_handles( req );
603 static void dump_create_event_request( const struct create_event_request *req )
605 fprintf( stderr, " manual_reset=%d,", req->manual_reset );
606 fprintf( stderr, " initial_state=%d,", req->initial_state );
607 fprintf( stderr, " inherit=%d,", req->inherit );
608 fprintf( stderr, " name=" );
609 cur_pos += dump_varargs_unicode_str( req );
612 static void dump_create_event_reply( const struct create_event_request *req )
614 fprintf( stderr, " handle=%d", req->handle );
617 static void dump_event_op_request( const struct event_op_request *req )
619 fprintf( stderr, " handle=%d,", req->handle );
620 fprintf( stderr, " op=%d", req->op );
623 static void dump_open_event_request( const struct open_event_request *req )
625 fprintf( stderr, " access=%08x,", req->access );
626 fprintf( stderr, " inherit=%d,", req->inherit );
627 fprintf( stderr, " name=" );
628 cur_pos += dump_varargs_unicode_str( req );
631 static void dump_open_event_reply( const struct open_event_request *req )
633 fprintf( stderr, " handle=%d", req->handle );
636 static void dump_create_mutex_request( const struct create_mutex_request *req )
638 fprintf( stderr, " owned=%d,", req->owned );
639 fprintf( stderr, " inherit=%d,", req->inherit );
640 fprintf( stderr, " name=" );
641 cur_pos += dump_varargs_unicode_str( req );
644 static void dump_create_mutex_reply( const struct create_mutex_request *req )
646 fprintf( stderr, " handle=%d", req->handle );
649 static void dump_release_mutex_request( const struct release_mutex_request *req )
651 fprintf( stderr, " handle=%d", req->handle );
654 static void dump_open_mutex_request( const struct open_mutex_request *req )
656 fprintf( stderr, " access=%08x,", req->access );
657 fprintf( stderr, " inherit=%d,", req->inherit );
658 fprintf( stderr, " name=" );
659 cur_pos += dump_varargs_unicode_str( req );
662 static void dump_open_mutex_reply( const struct open_mutex_request *req )
664 fprintf( stderr, " handle=%d", req->handle );
667 static void dump_create_semaphore_request( const struct create_semaphore_request *req )
669 fprintf( stderr, " initial=%08x,", req->initial );
670 fprintf( stderr, " max=%08x,", req->max );
671 fprintf( stderr, " inherit=%d,", req->inherit );
672 fprintf( stderr, " name=" );
673 cur_pos += dump_varargs_unicode_str( req );
676 static void dump_create_semaphore_reply( const struct create_semaphore_request *req )
678 fprintf( stderr, " handle=%d", req->handle );
681 static void dump_release_semaphore_request( const struct release_semaphore_request *req )
683 fprintf( stderr, " handle=%d,", req->handle );
684 fprintf( stderr, " count=%08x", req->count );
687 static void dump_release_semaphore_reply( const struct release_semaphore_request *req )
689 fprintf( stderr, " prev_count=%08x", req->prev_count );
692 static void dump_open_semaphore_request( const struct open_semaphore_request *req )
694 fprintf( stderr, " access=%08x,", req->access );
695 fprintf( stderr, " inherit=%d,", req->inherit );
696 fprintf( stderr, " name=" );
697 cur_pos += dump_varargs_unicode_str( req );
700 static void dump_open_semaphore_reply( const struct open_semaphore_request *req )
702 fprintf( stderr, " handle=%d", req->handle );
705 static void dump_create_file_request( const struct create_file_request *req )
707 fprintf( stderr, " access=%08x,", req->access );
708 fprintf( stderr, " inherit=%d,", req->inherit );
709 fprintf( stderr, " sharing=%08x,", req->sharing );
710 fprintf( stderr, " create=%d,", req->create );
711 fprintf( stderr, " attrs=%08x,", req->attrs );
712 fprintf( stderr, " drive_type=%d,", req->drive_type );
713 fprintf( stderr, " filename=" );
714 cur_pos += dump_varargs_string( req );
717 static void dump_create_file_reply( const struct create_file_request *req )
719 fprintf( stderr, " handle=%d", req->handle );
722 static void dump_alloc_file_handle_request( const struct alloc_file_handle_request *req )
724 fprintf( stderr, " access=%08x,", req->access );
725 fprintf( stderr, " fd=%d", req->fd );
728 static void dump_alloc_file_handle_reply( const struct alloc_file_handle_request *req )
730 fprintf( stderr, " handle=%d", req->handle );
733 static void dump_get_handle_fd_request( const struct get_handle_fd_request *req )
735 fprintf( stderr, " handle=%d,", req->handle );
736 fprintf( stderr, " access=%08x", req->access );
739 static void dump_get_handle_fd_reply( const struct get_handle_fd_request *req )
741 fprintf( stderr, " fd=%d,", req->fd );
742 fprintf( stderr, " type=%d", req->type );
745 static void dump_set_file_pointer_request( const struct set_file_pointer_request *req )
747 fprintf( stderr, " handle=%d,", req->handle );
748 fprintf( stderr, " low=%d,", req->low );
749 fprintf( stderr, " high=%d,", req->high );
750 fprintf( stderr, " whence=%d", req->whence );
753 static void dump_set_file_pointer_reply( const struct set_file_pointer_request *req )
755 fprintf( stderr, " new_low=%d,", req->new_low );
756 fprintf( stderr, " new_high=%d", req->new_high );
759 static void dump_truncate_file_request( const struct truncate_file_request *req )
761 fprintf( stderr, " handle=%d", req->handle );
764 static void dump_set_file_time_request( const struct set_file_time_request *req )
766 fprintf( stderr, " handle=%d,", req->handle );
767 fprintf( stderr, " access_time=%ld,", req->access_time );
768 fprintf( stderr, " write_time=%ld", req->write_time );
771 static void dump_flush_file_request( const struct flush_file_request *req )
773 fprintf( stderr, " handle=%d", req->handle );
776 static void dump_get_file_info_request( const struct get_file_info_request *req )
778 fprintf( stderr, " handle=%d", req->handle );
781 static void dump_get_file_info_reply( const struct get_file_info_request *req )
783 fprintf( stderr, " type=%d,", req->type );
784 fprintf( stderr, " attr=%d,", req->attr );
785 fprintf( stderr, " access_time=%ld,", req->access_time );
786 fprintf( stderr, " write_time=%ld,", req->write_time );
787 fprintf( stderr, " size_high=%d,", req->size_high );
788 fprintf( stderr, " size_low=%d,", req->size_low );
789 fprintf( stderr, " links=%d,", req->links );
790 fprintf( stderr, " index_high=%d,", req->index_high );
791 fprintf( stderr, " index_low=%d,", req->index_low );
792 fprintf( stderr, " serial=%08x", req->serial );
795 static void dump_lock_file_request( const struct lock_file_request *req )
797 fprintf( stderr, " handle=%d,", req->handle );
798 fprintf( stderr, " offset_low=%08x,", req->offset_low );
799 fprintf( stderr, " offset_high=%08x,", req->offset_high );
800 fprintf( stderr, " count_low=%08x,", req->count_low );
801 fprintf( stderr, " count_high=%08x", req->count_high );
804 static void dump_unlock_file_request( const struct unlock_file_request *req )
806 fprintf( stderr, " handle=%d,", req->handle );
807 fprintf( stderr, " offset_low=%08x,", req->offset_low );
808 fprintf( stderr, " offset_high=%08x,", req->offset_high );
809 fprintf( stderr, " count_low=%08x,", req->count_low );
810 fprintf( stderr, " count_high=%08x", req->count_high );
813 static void dump_create_pipe_request( const struct create_pipe_request *req )
815 fprintf( stderr, " inherit=%d", req->inherit );
818 static void dump_create_pipe_reply( const struct create_pipe_request *req )
820 fprintf( stderr, " handle_read=%d,", req->handle_read );
821 fprintf( stderr, " handle_write=%d", req->handle_write );
824 static void dump_create_socket_request( const struct create_socket_request *req )
826 fprintf( stderr, " access=%08x,", req->access );
827 fprintf( stderr, " inherit=%d,", req->inherit );
828 fprintf( stderr, " family=%d,", req->family );
829 fprintf( stderr, " type=%d,", req->type );
830 fprintf( stderr, " protocol=%d", req->protocol );
833 static void dump_create_socket_reply( const struct create_socket_request *req )
835 fprintf( stderr, " handle=%d", req->handle );
838 static void dump_accept_socket_request( const struct accept_socket_request *req )
840 fprintf( stderr, " lhandle=%d,", req->lhandle );
841 fprintf( stderr, " access=%08x,", req->access );
842 fprintf( stderr, " inherit=%d", req->inherit );
845 static void dump_accept_socket_reply( const struct accept_socket_request *req )
847 fprintf( stderr, " handle=%d", req->handle );
850 static void dump_set_socket_event_request( const struct set_socket_event_request *req )
852 fprintf( stderr, " handle=%d,", req->handle );
853 fprintf( stderr, " mask=%08x,", req->mask );
854 fprintf( stderr, " event=%d", req->event );
857 static void dump_get_socket_event_request( const struct get_socket_event_request *req )
859 fprintf( stderr, " handle=%d,", req->handle );
860 fprintf( stderr, " service=%d,", req->service );
861 fprintf( stderr, " s_event=%d,", req->s_event );
862 fprintf( stderr, " c_event=%d", req->c_event );
865 static void dump_get_socket_event_reply( const struct get_socket_event_request *req )
867 fprintf( stderr, " mask=%08x,", req->mask );
868 fprintf( stderr, " pmask=%08x,", req->pmask );
869 fprintf( stderr, " state=%08x,", req->state );
870 fprintf( stderr, " errors=" );
871 cur_pos += dump_varargs_ints( req );
874 static void dump_enable_socket_event_request( const struct enable_socket_event_request *req )
876 fprintf( stderr, " handle=%d,", req->handle );
877 fprintf( stderr, " mask=%08x,", req->mask );
878 fprintf( stderr, " sstate=%08x,", req->sstate );
879 fprintf( stderr, " cstate=%08x", req->cstate );
882 static void dump_alloc_console_request( const struct alloc_console_request *req )
884 fprintf( stderr, " access=%08x,", req->access );
885 fprintf( stderr, " inherit=%d", req->inherit );
888 static void dump_alloc_console_reply( const struct alloc_console_request *req )
890 fprintf( stderr, " handle_in=%d,", req->handle_in );
891 fprintf( stderr, " handle_out=%d", req->handle_out );
894 static void dump_free_console_request( const struct free_console_request *req )
898 static void dump_open_console_request( const struct open_console_request *req )
900 fprintf( stderr, " output=%d,", req->output );
901 fprintf( stderr, " access=%08x,", req->access );
902 fprintf( stderr, " inherit=%d", req->inherit );
905 static void dump_open_console_reply( const struct open_console_request *req )
907 fprintf( stderr, " handle=%d", req->handle );
910 static void dump_set_console_fd_request( const struct set_console_fd_request *req )
912 fprintf( stderr, " handle=%d,", req->handle );
913 fprintf( stderr, " fd_in=%d,", req->fd_in );
914 fprintf( stderr, " fd_out=%d,", req->fd_out );
915 fprintf( stderr, " pid=%d", req->pid );
918 static void dump_get_console_mode_request( const struct get_console_mode_request *req )
920 fprintf( stderr, " handle=%d", req->handle );
923 static void dump_get_console_mode_reply( const struct get_console_mode_request *req )
925 fprintf( stderr, " mode=%d", req->mode );
928 static void dump_set_console_mode_request( const struct set_console_mode_request *req )
930 fprintf( stderr, " handle=%d,", req->handle );
931 fprintf( stderr, " mode=%d", req->mode );
934 static void dump_set_console_info_request( const struct set_console_info_request *req )
936 fprintf( stderr, " handle=%d,", req->handle );
937 fprintf( stderr, " mask=%d,", req->mask );
938 fprintf( stderr, " cursor_size=%d,", req->cursor_size );
939 fprintf( stderr, " cursor_visible=%d,", req->cursor_visible );
940 fprintf( stderr, " title=" );
941 cur_pos += dump_varargs_string( req );
944 static void dump_get_console_info_request( const struct get_console_info_request *req )
946 fprintf( stderr, " handle=%d", req->handle );
949 static void dump_get_console_info_reply( const struct get_console_info_request *req )
951 fprintf( stderr, " cursor_size=%d,", req->cursor_size );
952 fprintf( stderr, " cursor_visible=%d,", req->cursor_visible );
953 fprintf( stderr, " pid=%d,", req->pid );
954 fprintf( stderr, " title=" );
955 cur_pos += dump_varargs_string( req );
958 static void dump_write_console_input_request( const struct write_console_input_request *req )
960 fprintf( stderr, " handle=%d,", req->handle );
961 fprintf( stderr, " rec=" );
962 cur_pos += dump_varargs_input_records( req );
965 static void dump_write_console_input_reply( const struct write_console_input_request *req )
967 fprintf( stderr, " written=%d", req->written );
970 static void dump_read_console_input_request( const struct read_console_input_request *req )
972 fprintf( stderr, " handle=%d,", req->handle );
973 fprintf( stderr, " flush=%d", req->flush );
976 static void dump_read_console_input_reply( const struct read_console_input_request *req )
978 fprintf( stderr, " read=%d,", req->read );
979 fprintf( stderr, " rec=" );
980 cur_pos += dump_varargs_input_records( req );
983 static void dump_create_change_notification_request( const struct create_change_notification_request *req )
985 fprintf( stderr, " subtree=%d,", req->subtree );
986 fprintf( stderr, " filter=%d", req->filter );
989 static void dump_create_change_notification_reply( const struct create_change_notification_request *req )
991 fprintf( stderr, " handle=%d", req->handle );
994 static void dump_create_mapping_request( const struct create_mapping_request *req )
996 fprintf( stderr, " size_high=%d,", req->size_high );
997 fprintf( stderr, " size_low=%d,", req->size_low );
998 fprintf( stderr, " protect=%d,", req->protect );
999 fprintf( stderr, " inherit=%d,", req->inherit );
1000 fprintf( stderr, " file_handle=%d,", req->file_handle );
1001 fprintf( stderr, " name=" );
1002 cur_pos += dump_varargs_unicode_str( req );
1005 static void dump_create_mapping_reply( const struct create_mapping_request *req )
1007 fprintf( stderr, " handle=%d", req->handle );
1010 static void dump_open_mapping_request( const struct open_mapping_request *req )
1012 fprintf( stderr, " access=%08x,", req->access );
1013 fprintf( stderr, " inherit=%d,", req->inherit );
1014 fprintf( stderr, " name=" );
1015 cur_pos += dump_varargs_unicode_str( req );
1018 static void dump_open_mapping_reply( const struct open_mapping_request *req )
1020 fprintf( stderr, " handle=%d", req->handle );
1023 static void dump_get_mapping_info_request( const struct get_mapping_info_request *req )
1025 fprintf( stderr, " handle=%d", req->handle );
1028 static void dump_get_mapping_info_reply( const struct get_mapping_info_request *req )
1030 fprintf( stderr, " size_high=%d,", req->size_high );
1031 fprintf( stderr, " size_low=%d,", req->size_low );
1032 fprintf( stderr, " protect=%d,", req->protect );
1033 fprintf( stderr, " header_size=%d,", req->header_size );
1034 fprintf( stderr, " base=%p,", req->base );
1035 fprintf( stderr, " shared_file=%d,", req->shared_file );
1036 fprintf( stderr, " shared_size=%d,", req->shared_size );
1037 fprintf( stderr, " drive_type=%d", req->drive_type );
1040 static void dump_create_device_request( const struct create_device_request *req )
1042 fprintf( stderr, " access=%08x,", req->access );
1043 fprintf( stderr, " inherit=%d,", req->inherit );
1044 fprintf( stderr, " id=%d", req->id );
1047 static void dump_create_device_reply( const struct create_device_request *req )
1049 fprintf( stderr, " handle=%d", req->handle );
1052 static void dump_create_snapshot_request( const struct create_snapshot_request *req )
1054 fprintf( stderr, " inherit=%d,", req->inherit );
1055 fprintf( stderr, " flags=%d,", req->flags );
1056 fprintf( stderr, " pid=%p", req->pid );
1059 static void dump_create_snapshot_reply( const struct create_snapshot_request *req )
1061 fprintf( stderr, " handle=%d", req->handle );
1064 static void dump_next_process_request( const struct next_process_request *req )
1066 fprintf( stderr, " handle=%d,", req->handle );
1067 fprintf( stderr, " reset=%d", req->reset );
1070 static void dump_next_process_reply( const struct next_process_request *req )
1072 fprintf( stderr, " count=%d,", req->count );
1073 fprintf( stderr, " pid=%p,", req->pid );
1074 fprintf( stderr, " threads=%d,", req->threads );
1075 fprintf( stderr, " priority=%d", req->priority );
1078 static void dump_next_thread_request( const struct next_thread_request *req )
1080 fprintf( stderr, " handle=%d,", req->handle );
1081 fprintf( stderr, " reset=%d", req->reset );
1084 static void dump_next_thread_reply( const struct next_thread_request *req )
1086 fprintf( stderr, " count=%d,", req->count );
1087 fprintf( stderr, " pid=%p,", req->pid );
1088 fprintf( stderr, " tid=%p,", req->tid );
1089 fprintf( stderr, " base_pri=%d,", req->base_pri );
1090 fprintf( stderr, " delta_pri=%d", req->delta_pri );
1093 static void dump_next_module_request( const struct next_module_request *req )
1095 fprintf( stderr, " handle=%d,", req->handle );
1096 fprintf( stderr, " reset=%d", req->reset );
1099 static void dump_next_module_reply( const struct next_module_request *req )
1101 fprintf( stderr, " pid=%p,", req->pid );
1102 fprintf( stderr, " base=%p", req->base );
1105 static void dump_wait_debug_event_request( const struct wait_debug_event_request *req )
1107 fprintf( stderr, " get_handle=%d", req->get_handle );
1110 static void dump_wait_debug_event_reply( const struct wait_debug_event_request *req )
1112 fprintf( stderr, " pid=%p,", req->pid );
1113 fprintf( stderr, " tid=%p,", req->tid );
1114 fprintf( stderr, " wait=%d,", req->wait );
1115 fprintf( stderr, " event=" );
1116 cur_pos += dump_varargs_debug_event( req );
1119 static void dump_queue_exception_event_request( const struct queue_exception_event_request *req )
1121 fprintf( stderr, " first=%d,", req->first );
1122 fprintf( stderr, " record=" );
1123 cur_pos += dump_varargs_exc_event( req );
1126 static void dump_queue_exception_event_reply( const struct queue_exception_event_request *req )
1128 fprintf( stderr, " handle=%d", req->handle );
1131 static void dump_get_exception_status_request( const struct get_exception_status_request *req )
1135 static void dump_get_exception_status_reply( const struct get_exception_status_request *req )
1137 fprintf( stderr, " handle=%d,", req->handle );
1138 fprintf( stderr, " status=%d,", req->status );
1139 fprintf( stderr, " context=" );
1140 cur_pos += dump_varargs_context( req );
1143 static void dump_output_debug_string_request( const struct output_debug_string_request *req )
1145 fprintf( stderr, " string=%p,", req->string );
1146 fprintf( stderr, " unicode=%d,", req->unicode );
1147 fprintf( stderr, " length=%d", req->length );
1150 static void dump_continue_debug_event_request( const struct continue_debug_event_request *req )
1152 fprintf( stderr, " pid=%p,", req->pid );
1153 fprintf( stderr, " tid=%p,", req->tid );
1154 fprintf( stderr, " status=%d", req->status );
1157 static void dump_debug_process_request( const struct debug_process_request *req )
1159 fprintf( stderr, " pid=%p", req->pid );
1162 static void dump_read_process_memory_request( const struct read_process_memory_request *req )
1164 fprintf( stderr, " handle=%d,", req->handle );
1165 fprintf( stderr, " addr=%p,", req->addr );
1166 fprintf( stderr, " len=%d", req->len );
1169 static void dump_read_process_memory_reply( const struct read_process_memory_request *req )
1171 fprintf( stderr, " data=" );
1172 cur_pos += dump_varargs_bytes( req );
1175 static void dump_write_process_memory_request( const struct write_process_memory_request *req )
1177 fprintf( stderr, " handle=%d,", req->handle );
1178 fprintf( stderr, " addr=%p,", req->addr );
1179 fprintf( stderr, " len=%d,", req->len );
1180 fprintf( stderr, " first_mask=%08x,", req->first_mask );
1181 fprintf( stderr, " last_mask=%08x,", req->last_mask );
1182 fprintf( stderr, " data=" );
1183 cur_pos += dump_varargs_bytes( req );
1186 static void dump_create_key_request( const struct create_key_request *req )
1188 fprintf( stderr, " parent=%d,", req->parent );
1189 fprintf( stderr, " access=%08x,", req->access );
1190 fprintf( stderr, " options=%08x,", req->options );
1191 fprintf( stderr, " modif=%ld,", req->modif );
1192 fprintf( stderr, " name=" );
1193 cur_pos += dump_varargs_unicode_len_str( req );
1194 fputc( ',', stderr );
1195 fprintf( stderr, " class=" );
1196 cur_pos += dump_varargs_unicode_str( req );
1199 static void dump_create_key_reply( const struct create_key_request *req )
1201 fprintf( stderr, " hkey=%d,", req->hkey );
1202 fprintf( stderr, " created=%d", req->created );
1205 static void dump_open_key_request( const struct open_key_request *req )
1207 fprintf( stderr, " parent=%d,", req->parent );
1208 fprintf( stderr, " access=%08x,", req->access );
1209 fprintf( stderr, " name=" );
1210 cur_pos += dump_varargs_unicode_str( req );
1213 static void dump_open_key_reply( const struct open_key_request *req )
1215 fprintf( stderr, " hkey=%d", req->hkey );
1218 static void dump_delete_key_request( const struct delete_key_request *req )
1220 fprintf( stderr, " hkey=%d", req->hkey );
1223 static void dump_enum_key_request( const struct enum_key_request *req )
1225 fprintf( stderr, " hkey=%d,", req->hkey );
1226 fprintf( stderr, " index=%d,", req->index );
1227 fprintf( stderr, " full=%d", req->full );
1230 static void dump_enum_key_reply( const struct enum_key_request *req )
1232 fprintf( stderr, " subkeys=%d,", req->subkeys );
1233 fprintf( stderr, " max_subkey=%d,", req->max_subkey );
1234 fprintf( stderr, " max_class=%d,", req->max_class );
1235 fprintf( stderr, " values=%d,", req->values );
1236 fprintf( stderr, " max_value=%d,", req->max_value );
1237 fprintf( stderr, " max_data=%d,", req->max_data );
1238 fprintf( stderr, " modif=%ld,", req->modif );
1239 fprintf( stderr, " name=" );
1240 cur_pos += dump_varargs_unicode_len_str( req );
1241 fputc( ',', stderr );
1242 fprintf( stderr, " class=" );
1243 cur_pos += dump_varargs_unicode_str( req );
1246 static void dump_set_key_value_request( const struct set_key_value_request *req )
1248 fprintf( stderr, " hkey=%d,", req->hkey );
1249 fprintf( stderr, " type=%d,", req->type );
1250 fprintf( stderr, " total=%08x,", req->total );
1251 fprintf( stderr, " offset=%08x,", req->offset );
1252 fprintf( stderr, " name=" );
1253 cur_pos += dump_varargs_unicode_len_str( req );
1254 fputc( ',', stderr );
1255 fprintf( stderr, " data=" );
1256 cur_pos += dump_varargs_bytes( req );
1259 static void dump_get_key_value_request( const struct get_key_value_request *req )
1261 fprintf( stderr, " hkey=%d,", req->hkey );
1262 fprintf( stderr, " offset=%08x,", req->offset );
1263 fprintf( stderr, " name=" );
1264 cur_pos += dump_varargs_unicode_len_str( req );
1267 static void dump_get_key_value_reply( const struct get_key_value_request *req )
1269 fprintf( stderr, " type=%d,", req->type );
1270 fprintf( stderr, " len=%d,", req->len );
1271 fprintf( stderr, " data=" );
1272 cur_pos += dump_varargs_bytes( req );
1275 static void dump_enum_key_value_request( const struct enum_key_value_request *req )
1277 fprintf( stderr, " hkey=%d,", req->hkey );
1278 fprintf( stderr, " index=%d,", req->index );
1279 fprintf( stderr, " offset=%08x", req->offset );
1282 static void dump_enum_key_value_reply( const struct enum_key_value_request *req )
1284 fprintf( stderr, " type=%d,", req->type );
1285 fprintf( stderr, " len=%d,", req->len );
1286 fprintf( stderr, " name=" );
1287 cur_pos += dump_varargs_unicode_len_str( req );
1288 fputc( ',', stderr );
1289 fprintf( stderr, " data=" );
1290 cur_pos += dump_varargs_bytes( req );
1293 static void dump_delete_key_value_request( const struct delete_key_value_request *req )
1295 fprintf( stderr, " hkey=%d,", req->hkey );
1296 fprintf( stderr, " name=" );
1297 cur_pos += dump_varargs_unicode_str( req );
1300 static void dump_load_registry_request( const struct load_registry_request *req )
1302 fprintf( stderr, " hkey=%d,", req->hkey );
1303 fprintf( stderr, " file=%d,", req->file );
1304 fprintf( stderr, " name=" );
1305 cur_pos += dump_varargs_unicode_str( req );
1308 static void dump_save_registry_request( const struct save_registry_request *req )
1310 fprintf( stderr, " hkey=%d,", req->hkey );
1311 fprintf( stderr, " file=%d", req->file );
1314 static void dump_save_registry_atexit_request( const struct save_registry_atexit_request *req )
1316 fprintf( stderr, " hkey=%d,", req->hkey );
1317 fprintf( stderr, " file=" );
1318 cur_pos += dump_varargs_string( req );
1321 static void dump_set_registry_levels_request( const struct set_registry_levels_request *req )
1323 fprintf( stderr, " current=%d,", req->current );
1324 fprintf( stderr, " saving=%d,", req->saving );
1325 fprintf( stderr, " period=%d", req->period );
1328 static void dump_create_timer_request( const struct create_timer_request *req )
1330 fprintf( stderr, " inherit=%d,", req->inherit );
1331 fprintf( stderr, " manual=%d,", req->manual );
1332 fprintf( stderr, " name=" );
1333 cur_pos += dump_varargs_unicode_str( req );
1336 static void dump_create_timer_reply( const struct create_timer_request *req )
1338 fprintf( stderr, " handle=%d", req->handle );
1341 static void dump_open_timer_request( const struct open_timer_request *req )
1343 fprintf( stderr, " access=%08x,", req->access );
1344 fprintf( stderr, " inherit=%d,", req->inherit );
1345 fprintf( stderr, " name=" );
1346 cur_pos += dump_varargs_unicode_str( req );
1349 static void dump_open_timer_reply( const struct open_timer_request *req )
1351 fprintf( stderr, " handle=%d", req->handle );
1354 static void dump_set_timer_request( const struct set_timer_request *req )
1356 fprintf( stderr, " handle=%d,", req->handle );
1357 fprintf( stderr, " sec=%d,", req->sec );
1358 fprintf( stderr, " usec=%d,", req->usec );
1359 fprintf( stderr, " period=%d,", req->period );
1360 fprintf( stderr, " callback=%p,", req->callback );
1361 fprintf( stderr, " arg=%p", req->arg );
1364 static void dump_cancel_timer_request( const struct cancel_timer_request *req )
1366 fprintf( stderr, " handle=%d", req->handle );
1369 static void dump_get_thread_context_request( const struct get_thread_context_request *req )
1371 fprintf( stderr, " handle=%d,", req->handle );
1372 fprintf( stderr, " flags=%08x", req->flags );
1375 static void dump_get_thread_context_reply( const struct get_thread_context_request *req )
1377 fprintf( stderr, " context=" );
1378 cur_pos += dump_varargs_context( req );
1381 static void dump_set_thread_context_request( const struct set_thread_context_request *req )
1383 fprintf( stderr, " handle=%d,", req->handle );
1384 fprintf( stderr, " flags=%08x,", req->flags );
1385 fprintf( stderr, " context=" );
1386 cur_pos += dump_varargs_context( req );
1389 static void dump_get_selector_entry_request( const struct get_selector_entry_request *req )
1391 fprintf( stderr, " handle=%d,", req->handle );
1392 fprintf( stderr, " entry=%d", req->entry );
1395 static void dump_get_selector_entry_reply( const struct get_selector_entry_request *req )
1397 fprintf( stderr, " base=%08x,", req->base );
1398 fprintf( stderr, " limit=%08x,", req->limit );
1399 fprintf( stderr, " flags=%02x", req->flags );
1402 static void dump_add_atom_request( const struct add_atom_request *req )
1404 fprintf( stderr, " local=%d,", req->local );
1405 fprintf( stderr, " name=" );
1406 cur_pos += dump_varargs_unicode_str( req );
1409 static void dump_add_atom_reply( const struct add_atom_request *req )
1411 fprintf( stderr, " atom=%04x", req->atom );
1414 static void dump_delete_atom_request( const struct delete_atom_request *req )
1416 fprintf( stderr, " atom=%04x,", req->atom );
1417 fprintf( stderr, " local=%d", req->local );
1420 static void dump_find_atom_request( const struct find_atom_request *req )
1422 fprintf( stderr, " local=%d,", req->local );
1423 fprintf( stderr, " name=" );
1424 cur_pos += dump_varargs_unicode_str( req );
1427 static void dump_find_atom_reply( const struct find_atom_request *req )
1429 fprintf( stderr, " atom=%04x", req->atom );
1432 static void dump_get_atom_name_request( const struct get_atom_name_request *req )
1434 fprintf( stderr, " atom=%04x,", req->atom );
1435 fprintf( stderr, " local=%d", req->local );
1438 static void dump_get_atom_name_reply( const struct get_atom_name_request *req )
1440 fprintf( stderr, " count=%d,", req->count );
1441 fprintf( stderr, " name=" );
1442 cur_pos += dump_varargs_unicode_str( req );
1445 static void dump_init_atom_table_request( const struct init_atom_table_request *req )
1447 fprintf( stderr, " entries=%d", req->entries );
1450 static void dump_get_msg_queue_request( const struct get_msg_queue_request *req )
1454 static void dump_get_msg_queue_reply( const struct get_msg_queue_request *req )
1456 fprintf( stderr, " handle=%d", req->handle );
1459 static void dump_inc_queue_paint_count_request( const struct inc_queue_paint_count_request *req )
1461 fprintf( stderr, " id=%p,", req->id );
1462 fprintf( stderr, " incr=%d", req->incr );
1465 static void dump_set_queue_mask_request( const struct set_queue_mask_request *req )
1467 fprintf( stderr, " wake_mask=%08x,", req->wake_mask );
1468 fprintf( stderr, " changed_mask=%08x,", req->changed_mask );
1469 fprintf( stderr, " skip_wait=%d", req->skip_wait );
1472 static void dump_set_queue_mask_reply( const struct set_queue_mask_request *req )
1474 fprintf( stderr, " wake_bits=%08x,", req->wake_bits );
1475 fprintf( stderr, " changed_bits=%08x", req->changed_bits );
1478 static void dump_get_queue_status_request( const struct get_queue_status_request *req )
1480 fprintf( stderr, " clear=%d", req->clear );
1483 static void dump_get_queue_status_reply( const struct get_queue_status_request *req )
1485 fprintf( stderr, " wake_bits=%08x,", req->wake_bits );
1486 fprintf( stderr, " changed_bits=%08x", req->changed_bits );
1489 static void dump_wait_input_idle_request( const struct wait_input_idle_request *req )
1491 fprintf( stderr, " handle=%d,", req->handle );
1492 fprintf( stderr, " timeout=%d", req->timeout );
1495 static void dump_wait_input_idle_reply( const struct wait_input_idle_request *req )
1497 fprintf( stderr, " event=%d", req->event );
1500 static void dump_send_message_request( const struct send_message_request *req )
1502 fprintf( stderr, " id=%p,", req->id );
1503 fprintf( stderr, " type=%d,", req->type );
1504 fprintf( stderr, " win=%08x,", req->win );
1505 fprintf( stderr, " msg=%08x,", req->msg );
1506 fprintf( stderr, " wparam=%08x,", req->wparam );
1507 fprintf( stderr, " lparam=%08x,", req->lparam );
1508 fprintf( stderr, " x=%d,", req->x );
1509 fprintf( stderr, " y=%d,", req->y );
1510 fprintf( stderr, " time=%08x,", req->time );
1511 fprintf( stderr, " info=%08x,", req->info );
1512 fprintf( stderr, " timeout=%d,", req->timeout );
1513 fprintf( stderr, " data=" );
1514 cur_pos += dump_varargs_bytes( req );
1517 static void dump_get_message_request( const struct get_message_request *req )
1519 fprintf( stderr, " flags=%d,", req->flags );
1520 fprintf( stderr, " get_win=%08x,", req->get_win );
1521 fprintf( stderr, " get_first=%08x,", req->get_first );
1522 fprintf( stderr, " get_last=%08x", req->get_last );
1525 static void dump_get_message_reply( const struct get_message_request *req )
1527 fprintf( stderr, " type=%d,", req->type );
1528 fprintf( stderr, " win=%08x,", req->win );
1529 fprintf( stderr, " msg=%08x,", req->msg );
1530 fprintf( stderr, " wparam=%08x,", req->wparam );
1531 fprintf( stderr, " lparam=%08x,", req->lparam );
1532 fprintf( stderr, " x=%d,", req->x );
1533 fprintf( stderr, " y=%d,", req->y );
1534 fprintf( stderr, " time=%08x,", req->time );
1535 fprintf( stderr, " info=%08x,", req->info );
1536 fprintf( stderr, " data=" );
1537 cur_pos += dump_varargs_bytes( req );
1540 static void dump_reply_message_request( const struct reply_message_request *req )
1542 fprintf( stderr, " result=%08x,", req->result );
1543 fprintf( stderr, " remove=%d,", req->remove );
1544 fprintf( stderr, " data=" );
1545 cur_pos += dump_varargs_bytes( req );
1548 static void dump_get_message_reply_request( const struct get_message_reply_request *req )
1550 fprintf( stderr, " cancel=%d", req->cancel );
1553 static void dump_get_message_reply_reply( const struct get_message_reply_request *req )
1555 fprintf( stderr, " result=%08x,", req->result );
1556 fprintf( stderr, " data=" );
1557 cur_pos += dump_varargs_bytes( req );
1560 static void dump_set_win_timer_request( const struct set_win_timer_request *req )
1562 fprintf( stderr, " win=%08x,", req->win );
1563 fprintf( stderr, " msg=%08x,", req->msg );
1564 fprintf( stderr, " id=%08x,", req->id );
1565 fprintf( stderr, " rate=%08x,", req->rate );
1566 fprintf( stderr, " lparam=%08x", req->lparam );
1569 static void dump_kill_win_timer_request( const struct kill_win_timer_request *req )
1571 fprintf( stderr, " win=%08x,", req->win );
1572 fprintf( stderr, " msg=%08x,", req->msg );
1573 fprintf( stderr, " id=%08x", req->id );
1576 static void dump_create_serial_request( const struct create_serial_request *req )
1578 fprintf( stderr, " access=%08x,", req->access );
1579 fprintf( stderr, " inherit=%d,", req->inherit );
1580 fprintf( stderr, " attributes=%08x,", req->attributes );
1581 fprintf( stderr, " sharing=%08x,", req->sharing );
1582 fprintf( stderr, " name=" );
1583 cur_pos += dump_varargs_string( req );
1586 static void dump_create_serial_reply( const struct create_serial_request *req )
1588 fprintf( stderr, " handle=%d", req->handle );
1591 static void dump_get_serial_info_request( const struct get_serial_info_request *req )
1593 fprintf( stderr, " handle=%d", req->handle );
1596 static void dump_get_serial_info_reply( const struct get_serial_info_request *req )
1598 fprintf( stderr, " readinterval=%08x,", req->readinterval );
1599 fprintf( stderr, " readconst=%08x,", req->readconst );
1600 fprintf( stderr, " readmult=%08x,", req->readmult );
1601 fprintf( stderr, " writeconst=%08x,", req->writeconst );
1602 fprintf( stderr, " writemult=%08x,", req->writemult );
1603 fprintf( stderr, " eventmask=%08x,", req->eventmask );
1604 fprintf( stderr, " commerror=%08x", req->commerror );
1607 static void dump_set_serial_info_request( const struct set_serial_info_request *req )
1609 fprintf( stderr, " handle=%d,", req->handle );
1610 fprintf( stderr, " flags=%d,", req->flags );
1611 fprintf( stderr, " readinterval=%08x,", req->readinterval );
1612 fprintf( stderr, " readconst=%08x,", req->readconst );
1613 fprintf( stderr, " readmult=%08x,", req->readmult );
1614 fprintf( stderr, " writeconst=%08x,", req->writeconst );
1615 fprintf( stderr, " writemult=%08x,", req->writemult );
1616 fprintf( stderr, " eventmask=%08x,", req->eventmask );
1617 fprintf( stderr, " commerror=%08x", req->commerror );
1620 static void dump_create_async_request( const struct create_async_request *req )
1622 fprintf( stderr, " file_handle=%d,", req->file_handle );
1623 fprintf( stderr, " count=%d,", req->count );
1624 fprintf( stderr, " type=%d", req->type );
1627 static void dump_create_async_reply( const struct create_async_request *req )
1629 fprintf( stderr, " timeout=%d", req->timeout );
1632 static void dump_create_named_pipe_request( const struct create_named_pipe_request *req )
1634 fprintf( stderr, " openmode=%08x,", req->openmode );
1635 fprintf( stderr, " pipemode=%08x,", req->pipemode );
1636 fprintf( stderr, " maxinstances=%08x,", req->maxinstances );
1637 fprintf( stderr, " outsize=%08x,", req->outsize );
1638 fprintf( stderr, " insize=%08x,", req->insize );
1639 fprintf( stderr, " timeout=%08x,", req->timeout );
1640 fprintf( stderr, " filename=" );
1641 cur_pos += dump_varargs_string( req );
1644 static void dump_create_named_pipe_reply( const struct create_named_pipe_request *req )
1646 fprintf( stderr, " handle=%d", req->handle );
1649 static void dump_open_named_pipe_request( const struct open_named_pipe_request *req )
1651 fprintf( stderr, " access=%08x,", req->access );
1652 fprintf( stderr, " filename=" );
1653 cur_pos += dump_varargs_string( req );
1656 static void dump_open_named_pipe_reply( const struct open_named_pipe_request *req )
1658 fprintf( stderr, " handle=%d", req->handle );
1661 static void dump_connect_named_pipe_request( const struct connect_named_pipe_request *req )
1663 fprintf( stderr, " handle=%d,", req->handle );
1664 fprintf( stderr, " event=%d", req->event );
1667 static void dump_wait_named_pipe_request( const struct wait_named_pipe_request *req )
1669 fprintf( stderr, " timeout=%08x,", req->timeout );
1670 fprintf( stderr, " event=%d,", req->event );
1671 fprintf( stderr, " filename=" );
1672 cur_pos += dump_varargs_string( req );
1675 static void dump_disconnect_named_pipe_request( const struct disconnect_named_pipe_request *req )
1677 fprintf( stderr, " handle=%d", req->handle );
1680 static void dump_get_named_pipe_info_request( const struct get_named_pipe_info_request *req )
1682 fprintf( stderr, " handle=%d", req->handle );
1685 static void dump_get_named_pipe_info_reply( const struct get_named_pipe_info_request *req )
1687 fprintf( stderr, " flags=%08x,", req->flags );
1688 fprintf( stderr, " maxinstances=%08x,", req->maxinstances );
1689 fprintf( stderr, " outsize=%08x,", req->outsize );
1690 fprintf( stderr, " insize=%08x", req->insize );
1693 static void dump_create_window_request( const struct create_window_request *req )
1695 fprintf( stderr, " parent=%08x,", req->parent );
1696 fprintf( stderr, " owner=%08x,", req->owner );
1697 fprintf( stderr, " atom=%04x", req->atom );
1700 static void dump_create_window_reply( const struct create_window_request *req )
1702 fprintf( stderr, " handle=%08x", req->handle );
1705 static void dump_link_window_request( const struct link_window_request *req )
1707 fprintf( stderr, " handle=%08x,", req->handle );
1708 fprintf( stderr, " parent=%08x,", req->parent );
1709 fprintf( stderr, " previous=%08x", req->previous );
1712 static void dump_link_window_reply( const struct link_window_request *req )
1714 fprintf( stderr, " full_parent=%08x", req->full_parent );
1717 static void dump_destroy_window_request( const struct destroy_window_request *req )
1719 fprintf( stderr, " handle=%08x", req->handle );
1722 static void dump_set_window_owner_request( const struct set_window_owner_request *req )
1724 fprintf( stderr, " handle=%08x,", req->handle );
1725 fprintf( stderr, " owner=%08x", req->owner );
1728 static void dump_set_window_owner_reply( const struct set_window_owner_request *req )
1730 fprintf( stderr, " full_owner=%08x", req->full_owner );
1733 static void dump_get_window_info_request( const struct get_window_info_request *req )
1735 fprintf( stderr, " handle=%08x", req->handle );
1738 static void dump_get_window_info_reply( const struct get_window_info_request *req )
1740 fprintf( stderr, " full_handle=%08x,", req->full_handle );
1741 fprintf( stderr, " pid=%p,", req->pid );
1742 fprintf( stderr, " tid=%p,", req->tid );
1743 fprintf( stderr, " atom=%04x", req->atom );
1746 static void dump_set_window_info_request( const struct set_window_info_request *req )
1748 fprintf( stderr, " handle=%08x,", req->handle );
1749 fprintf( stderr, " flags=%08x,", req->flags );
1750 fprintf( stderr, " style=%08x,", req->style );
1751 fprintf( stderr, " ex_style=%08x,", req->ex_style );
1752 fprintf( stderr, " id=%08x,", req->id );
1753 fprintf( stderr, " instance=%p,", req->instance );
1754 fprintf( stderr, " user_data=%p", req->user_data );
1757 static void dump_set_window_info_reply( const struct set_window_info_request *req )
1759 fprintf( stderr, " old_style=%08x,", req->old_style );
1760 fprintf( stderr, " old_ex_style=%08x,", req->old_ex_style );
1761 fprintf( stderr, " old_id=%08x,", req->old_id );
1762 fprintf( stderr, " old_instance=%p,", req->old_instance );
1763 fprintf( stderr, " old_user_data=%p", req->old_user_data );
1766 static void dump_get_window_parents_request( const struct get_window_parents_request *req )
1768 fprintf( stderr, " handle=%08x", req->handle );
1771 static void dump_get_window_parents_reply( const struct get_window_parents_request *req )
1773 fprintf( stderr, " count=%d,", req->count );
1774 fprintf( stderr, " parents=" );
1775 cur_pos += dump_varargs_user_handles( req );
1778 static void dump_get_window_children_request( const struct get_window_children_request *req )
1780 fprintf( stderr, " parent=%08x,", req->parent );
1781 fprintf( stderr, " atom=%04x,", req->atom );
1782 fprintf( stderr, " tid=%p", req->tid );
1785 static void dump_get_window_children_reply( const struct get_window_children_request *req )
1787 fprintf( stderr, " count=%d,", req->count );
1788 fprintf( stderr, " children=" );
1789 cur_pos += dump_varargs_user_handles( req );
1792 static void dump_get_window_tree_request( const struct get_window_tree_request *req )
1794 fprintf( stderr, " handle=%08x", req->handle );
1797 static void dump_get_window_tree_reply( const struct get_window_tree_request *req )
1799 fprintf( stderr, " parent=%08x,", req->parent );
1800 fprintf( stderr, " owner=%08x,", req->owner );
1801 fprintf( stderr, " next_sibling=%08x,", req->next_sibling );
1802 fprintf( stderr, " prev_sibling=%08x,", req->prev_sibling );
1803 fprintf( stderr, " first_sibling=%08x,", req->first_sibling );
1804 fprintf( stderr, " last_sibling=%08x,", req->last_sibling );
1805 fprintf( stderr, " first_child=%08x,", req->first_child );
1806 fprintf( stderr, " last_child=%08x", req->last_child );
1809 static void dump_set_window_rectangles_request( const struct set_window_rectangles_request *req )
1811 fprintf( stderr, " handle=%08x,", req->handle );
1812 fprintf( stderr, " window=" );
1813 dump_rectangle( req, &req->window );
1814 fprintf( stderr, "," );
1815 fprintf( stderr, " client=" );
1816 dump_rectangle( req, &req->client );
1819 static void dump_get_window_rectangles_request( const struct get_window_rectangles_request *req )
1821 fprintf( stderr, " handle=%08x", req->handle );
1824 static void dump_get_window_rectangles_reply( const struct get_window_rectangles_request *req )
1826 fprintf( stderr, " window=" );
1827 dump_rectangle( req, &req->window );
1828 fprintf( stderr, "," );
1829 fprintf( stderr, " client=" );
1830 dump_rectangle( req, &req->client );
1833 static void dump_get_windows_offset_request( const struct get_windows_offset_request *req )
1835 fprintf( stderr, " from=%08x,", req->from );
1836 fprintf( stderr, " to=%08x", req->to );
1839 static void dump_get_windows_offset_reply( const struct get_windows_offset_request *req )
1841 fprintf( stderr, " x=%d,", req->x );
1842 fprintf( stderr, " y=%d", req->y );
1845 static void dump_set_window_property_request( const struct set_window_property_request *req )
1847 fprintf( stderr, " window=%08x,", req->window );
1848 fprintf( stderr, " atom=%04x,", req->atom );
1849 fprintf( stderr, " string=%d,", req->string );
1850 fprintf( stderr, " handle=%d", req->handle );
1853 static void dump_remove_window_property_request( const struct remove_window_property_request *req )
1855 fprintf( stderr, " window=%08x,", req->window );
1856 fprintf( stderr, " atom=%04x", req->atom );
1859 static void dump_remove_window_property_reply( const struct remove_window_property_request *req )
1861 fprintf( stderr, " handle=%d", req->handle );
1864 static void dump_get_window_property_request( const struct get_window_property_request *req )
1866 fprintf( stderr, " window=%08x,", req->window );
1867 fprintf( stderr, " atom=%04x", req->atom );
1870 static void dump_get_window_property_reply( const struct get_window_property_request *req )
1872 fprintf( stderr, " handle=%d", req->handle );
1875 static void dump_get_window_properties_request( const struct get_window_properties_request *req )
1877 fprintf( stderr, " window=%08x", req->window );
1880 static void dump_get_window_properties_reply( const struct get_window_properties_request *req )
1882 fprintf( stderr, " props=" );
1883 cur_pos += dump_varargs_properties( req );
1886 static const dump_func req_dumpers[REQ_NB_REQUESTS] = {
1887 (dump_func)dump_new_process_request,
1888 (dump_func)dump_get_new_process_info_request,
1889 (dump_func)dump_new_thread_request,
1890 (dump_func)dump_boot_done_request,
1891 (dump_func)dump_init_process_request,
1892 (dump_func)dump_init_process_done_request,
1893 (dump_func)dump_init_thread_request,
1894 (dump_func)dump_set_thread_buffer_request,
1895 (dump_func)dump_terminate_process_request,
1896 (dump_func)dump_terminate_thread_request,
1897 (dump_func)dump_get_process_info_request,
1898 (dump_func)dump_set_process_info_request,
1899 (dump_func)dump_get_thread_info_request,
1900 (dump_func)dump_set_thread_info_request,
1901 (dump_func)dump_suspend_thread_request,
1902 (dump_func)dump_resume_thread_request,
1903 (dump_func)dump_load_dll_request,
1904 (dump_func)dump_unload_dll_request,
1905 (dump_func)dump_queue_apc_request,
1906 (dump_func)dump_get_apc_request,
1907 (dump_func)dump_close_handle_request,
1908 (dump_func)dump_set_handle_info_request,
1909 (dump_func)dump_dup_handle_request,
1910 (dump_func)dump_open_process_request,
1911 (dump_func)dump_select_request,
1912 (dump_func)dump_create_event_request,
1913 (dump_func)dump_event_op_request,
1914 (dump_func)dump_open_event_request,
1915 (dump_func)dump_create_mutex_request,
1916 (dump_func)dump_release_mutex_request,
1917 (dump_func)dump_open_mutex_request,
1918 (dump_func)dump_create_semaphore_request,
1919 (dump_func)dump_release_semaphore_request,
1920 (dump_func)dump_open_semaphore_request,
1921 (dump_func)dump_create_file_request,
1922 (dump_func)dump_alloc_file_handle_request,
1923 (dump_func)dump_get_handle_fd_request,
1924 (dump_func)dump_set_file_pointer_request,
1925 (dump_func)dump_truncate_file_request,
1926 (dump_func)dump_set_file_time_request,
1927 (dump_func)dump_flush_file_request,
1928 (dump_func)dump_get_file_info_request,
1929 (dump_func)dump_lock_file_request,
1930 (dump_func)dump_unlock_file_request,
1931 (dump_func)dump_create_pipe_request,
1932 (dump_func)dump_create_socket_request,
1933 (dump_func)dump_accept_socket_request,
1934 (dump_func)dump_set_socket_event_request,
1935 (dump_func)dump_get_socket_event_request,
1936 (dump_func)dump_enable_socket_event_request,
1937 (dump_func)dump_alloc_console_request,
1938 (dump_func)dump_free_console_request,
1939 (dump_func)dump_open_console_request,
1940 (dump_func)dump_set_console_fd_request,
1941 (dump_func)dump_get_console_mode_request,
1942 (dump_func)dump_set_console_mode_request,
1943 (dump_func)dump_set_console_info_request,
1944 (dump_func)dump_get_console_info_request,
1945 (dump_func)dump_write_console_input_request,
1946 (dump_func)dump_read_console_input_request,
1947 (dump_func)dump_create_change_notification_request,
1948 (dump_func)dump_create_mapping_request,
1949 (dump_func)dump_open_mapping_request,
1950 (dump_func)dump_get_mapping_info_request,
1951 (dump_func)dump_create_device_request,
1952 (dump_func)dump_create_snapshot_request,
1953 (dump_func)dump_next_process_request,
1954 (dump_func)dump_next_thread_request,
1955 (dump_func)dump_next_module_request,
1956 (dump_func)dump_wait_debug_event_request,
1957 (dump_func)dump_queue_exception_event_request,
1958 (dump_func)dump_get_exception_status_request,
1959 (dump_func)dump_output_debug_string_request,
1960 (dump_func)dump_continue_debug_event_request,
1961 (dump_func)dump_debug_process_request,
1962 (dump_func)dump_read_process_memory_request,
1963 (dump_func)dump_write_process_memory_request,
1964 (dump_func)dump_create_key_request,
1965 (dump_func)dump_open_key_request,
1966 (dump_func)dump_delete_key_request,
1967 (dump_func)dump_enum_key_request,
1968 (dump_func)dump_set_key_value_request,
1969 (dump_func)dump_get_key_value_request,
1970 (dump_func)dump_enum_key_value_request,
1971 (dump_func)dump_delete_key_value_request,
1972 (dump_func)dump_load_registry_request,
1973 (dump_func)dump_save_registry_request,
1974 (dump_func)dump_save_registry_atexit_request,
1975 (dump_func)dump_set_registry_levels_request,
1976 (dump_func)dump_create_timer_request,
1977 (dump_func)dump_open_timer_request,
1978 (dump_func)dump_set_timer_request,
1979 (dump_func)dump_cancel_timer_request,
1980 (dump_func)dump_get_thread_context_request,
1981 (dump_func)dump_set_thread_context_request,
1982 (dump_func)dump_get_selector_entry_request,
1983 (dump_func)dump_add_atom_request,
1984 (dump_func)dump_delete_atom_request,
1985 (dump_func)dump_find_atom_request,
1986 (dump_func)dump_get_atom_name_request,
1987 (dump_func)dump_init_atom_table_request,
1988 (dump_func)dump_get_msg_queue_request,
1989 (dump_func)dump_inc_queue_paint_count_request,
1990 (dump_func)dump_set_queue_mask_request,
1991 (dump_func)dump_get_queue_status_request,
1992 (dump_func)dump_wait_input_idle_request,
1993 (dump_func)dump_send_message_request,
1994 (dump_func)dump_get_message_request,
1995 (dump_func)dump_reply_message_request,
1996 (dump_func)dump_get_message_reply_request,
1997 (dump_func)dump_set_win_timer_request,
1998 (dump_func)dump_kill_win_timer_request,
1999 (dump_func)dump_create_serial_request,
2000 (dump_func)dump_get_serial_info_request,
2001 (dump_func)dump_set_serial_info_request,
2002 (dump_func)dump_create_async_request,
2003 (dump_func)dump_create_named_pipe_request,
2004 (dump_func)dump_open_named_pipe_request,
2005 (dump_func)dump_connect_named_pipe_request,
2006 (dump_func)dump_wait_named_pipe_request,
2007 (dump_func)dump_disconnect_named_pipe_request,
2008 (dump_func)dump_get_named_pipe_info_request,
2009 (dump_func)dump_create_window_request,
2010 (dump_func)dump_link_window_request,
2011 (dump_func)dump_destroy_window_request,
2012 (dump_func)dump_set_window_owner_request,
2013 (dump_func)dump_get_window_info_request,
2014 (dump_func)dump_set_window_info_request,
2015 (dump_func)dump_get_window_parents_request,
2016 (dump_func)dump_get_window_children_request,
2017 (dump_func)dump_get_window_tree_request,
2018 (dump_func)dump_set_window_rectangles_request,
2019 (dump_func)dump_get_window_rectangles_request,
2020 (dump_func)dump_get_windows_offset_request,
2021 (dump_func)dump_set_window_property_request,
2022 (dump_func)dump_remove_window_property_request,
2023 (dump_func)dump_get_window_property_request,
2024 (dump_func)dump_get_window_properties_request,
2027 static const dump_func reply_dumpers[REQ_NB_REQUESTS] = {
2028 (dump_func)dump_new_process_reply,
2029 (dump_func)dump_get_new_process_info_reply,
2030 (dump_func)dump_new_thread_reply,
2032 (dump_func)dump_init_process_reply,
2033 (dump_func)dump_init_process_done_reply,
2034 (dump_func)dump_init_thread_reply,
2035 (dump_func)dump_set_thread_buffer_reply,
2036 (dump_func)dump_terminate_process_reply,
2037 (dump_func)dump_terminate_thread_reply,
2038 (dump_func)dump_get_process_info_reply,
2040 (dump_func)dump_get_thread_info_reply,
2042 (dump_func)dump_suspend_thread_reply,
2043 (dump_func)dump_resume_thread_reply,
2047 (dump_func)dump_get_apc_reply,
2048 (dump_func)dump_close_handle_reply,
2049 (dump_func)dump_set_handle_info_reply,
2050 (dump_func)dump_dup_handle_reply,
2051 (dump_func)dump_open_process_reply,
2053 (dump_func)dump_create_event_reply,
2055 (dump_func)dump_open_event_reply,
2056 (dump_func)dump_create_mutex_reply,
2058 (dump_func)dump_open_mutex_reply,
2059 (dump_func)dump_create_semaphore_reply,
2060 (dump_func)dump_release_semaphore_reply,
2061 (dump_func)dump_open_semaphore_reply,
2062 (dump_func)dump_create_file_reply,
2063 (dump_func)dump_alloc_file_handle_reply,
2064 (dump_func)dump_get_handle_fd_reply,
2065 (dump_func)dump_set_file_pointer_reply,
2069 (dump_func)dump_get_file_info_reply,
2072 (dump_func)dump_create_pipe_reply,
2073 (dump_func)dump_create_socket_reply,
2074 (dump_func)dump_accept_socket_reply,
2076 (dump_func)dump_get_socket_event_reply,
2078 (dump_func)dump_alloc_console_reply,
2080 (dump_func)dump_open_console_reply,
2082 (dump_func)dump_get_console_mode_reply,
2085 (dump_func)dump_get_console_info_reply,
2086 (dump_func)dump_write_console_input_reply,
2087 (dump_func)dump_read_console_input_reply,
2088 (dump_func)dump_create_change_notification_reply,
2089 (dump_func)dump_create_mapping_reply,
2090 (dump_func)dump_open_mapping_reply,
2091 (dump_func)dump_get_mapping_info_reply,
2092 (dump_func)dump_create_device_reply,
2093 (dump_func)dump_create_snapshot_reply,
2094 (dump_func)dump_next_process_reply,
2095 (dump_func)dump_next_thread_reply,
2096 (dump_func)dump_next_module_reply,
2097 (dump_func)dump_wait_debug_event_reply,
2098 (dump_func)dump_queue_exception_event_reply,
2099 (dump_func)dump_get_exception_status_reply,
2103 (dump_func)dump_read_process_memory_reply,
2105 (dump_func)dump_create_key_reply,
2106 (dump_func)dump_open_key_reply,
2108 (dump_func)dump_enum_key_reply,
2110 (dump_func)dump_get_key_value_reply,
2111 (dump_func)dump_enum_key_value_reply,
2117 (dump_func)dump_create_timer_reply,
2118 (dump_func)dump_open_timer_reply,
2121 (dump_func)dump_get_thread_context_reply,
2123 (dump_func)dump_get_selector_entry_reply,
2124 (dump_func)dump_add_atom_reply,
2126 (dump_func)dump_find_atom_reply,
2127 (dump_func)dump_get_atom_name_reply,
2129 (dump_func)dump_get_msg_queue_reply,
2131 (dump_func)dump_set_queue_mask_reply,
2132 (dump_func)dump_get_queue_status_reply,
2133 (dump_func)dump_wait_input_idle_reply,
2135 (dump_func)dump_get_message_reply,
2137 (dump_func)dump_get_message_reply_reply,
2140 (dump_func)dump_create_serial_reply,
2141 (dump_func)dump_get_serial_info_reply,
2143 (dump_func)dump_create_async_reply,
2144 (dump_func)dump_create_named_pipe_reply,
2145 (dump_func)dump_open_named_pipe_reply,
2149 (dump_func)dump_get_named_pipe_info_reply,
2150 (dump_func)dump_create_window_reply,
2151 (dump_func)dump_link_window_reply,
2153 (dump_func)dump_set_window_owner_reply,
2154 (dump_func)dump_get_window_info_reply,
2155 (dump_func)dump_set_window_info_reply,
2156 (dump_func)dump_get_window_parents_reply,
2157 (dump_func)dump_get_window_children_reply,
2158 (dump_func)dump_get_window_tree_reply,
2160 (dump_func)dump_get_window_rectangles_reply,
2161 (dump_func)dump_get_windows_offset_reply,
2163 (dump_func)dump_remove_window_property_reply,
2164 (dump_func)dump_get_window_property_reply,
2165 (dump_func)dump_get_window_properties_reply,
2168 static const char * const req_names[REQ_NB_REQUESTS] = {
2170 "get_new_process_info",
2174 "init_process_done",
2176 "set_thread_buffer",
2177 "terminate_process",
2201 "release_semaphore",
2204 "alloc_file_handle",
2218 "enable_socket_event",
2227 "write_console_input",
2228 "read_console_input",
2229 "create_change_notification",
2239 "queue_exception_event",
2240 "get_exception_status",
2241 "output_debug_string",
2242 "continue_debug_event",
2244 "read_process_memory",
2245 "write_process_memory",
2256 "save_registry_atexit",
2257 "set_registry_levels",
2262 "get_thread_context",
2263 "set_thread_context",
2264 "get_selector_entry",
2271 "inc_queue_paint_count",
2278 "get_message_reply",
2285 "create_named_pipe",
2287 "connect_named_pipe",
2289 "disconnect_named_pipe",
2290 "get_named_pipe_info",
2297 "get_window_parents",
2298 "get_window_children",
2300 "set_window_rectangles",
2301 "get_window_rectangles",
2302 "get_windows_offset",
2303 "set_window_property",
2304 "remove_window_property",
2305 "get_window_property",
2306 "get_window_properties",
2309 /* ### make_requests end ### */
2310 /* Everything above this line is generated automatically by tools/make_requests */
2312 static const char *get_status_name( unsigned int status )
2314 #define NAME(status) { #status, STATUS_##status }
2321 NAME(ACCESS_DENIED),
2322 NAME(ACCESS_VIOLATION),
2323 NAME(BUFFER_OVERFLOW),
2324 NAME(CHILD_MUST_BE_VOLATILE),
2325 NAME(DIRECTORY_NOT_EMPTY),
2327 NAME(FILE_LOCK_CONFLICT),
2328 NAME(INVALID_FILE_FOR_SECTION),
2329 NAME(INVALID_HANDLE),
2330 NAME(INVALID_PARAMETER),
2332 NAME(MEDIA_WRITE_PROTECTED),
2333 NAME(MUTANT_NOT_OWNED),
2334 NAME(NOT_REGISTRY_FILE),
2336 NAME(NO_MORE_ENTRIES),
2337 NAME(NO_MORE_FILES),
2339 NAME(OBJECT_NAME_COLLISION),
2340 NAME(OBJECT_NAME_INVALID),
2341 NAME(OBJECT_NAME_NOT_FOUND),
2342 NAME(OBJECT_PATH_INVALID),
2343 NAME(OBJECT_TYPE_MISMATCH),
2346 NAME(SEMAPHORE_LIMIT_EXCEEDED),
2347 NAME(SHARING_VIOLATION),
2348 NAME(SUSPEND_COUNT_EXCEEDED),
2350 NAME(TOO_MANY_OPENED_FILES),
2353 { NULL, 0 } /* terminator */
2358 static char buffer[10];
2362 for (i = 0; status_names[i].name; i++)
2363 if (status_names[i].value == status) return status_names[i].name;
2365 sprintf( buffer, "%x", status );
2369 void trace_request( struct thread *thread, const union generic_request *request )
2371 enum request req = request->header.req;
2373 if (req < REQ_NB_REQUESTS)
2375 fprintf( stderr, "%08x: %s(", (unsigned int)thread, req_names[req] );
2377 req_dumpers[req]( request );
2378 fprintf( stderr, " )\n" );
2380 else fprintf( stderr, "%08x: %d(?)\n", (unsigned int)thread, req );
2383 void trace_reply( struct thread *thread, const union generic_request *request )
2385 enum request req = request->header.req;
2386 if (req < REQ_NB_REQUESTS)
2388 fprintf( stderr, "%08x: %s() = %s",
2389 (unsigned int)thread, req_names[req], get_status_name(thread->error) );
2390 if (reply_dumpers[req])
2392 fprintf( stderr, " {" );
2394 reply_dumpers[req]( request );
2395 fprintf( stderr, " }" );
2397 fputc( '\n', stderr );
2399 else fprintf( stderr, "%08x: %d() = %s\n",
2400 (unsigned int)thread, req, get_status_name(thread->error) );