2 * Server request tracing
4 * Copyright (C) 1999 Alexandre Julliard
17 /* utility functions */
19 static void dump_ints( const int *ptr, int len )
24 fprintf( stderr, "%d", *ptr++ );
25 if (--len) fputc( ',', stderr );
30 static void dump_uints( const int *ptr, int len )
35 fprintf( stderr, "%08x", *ptr++ );
36 if (--len) fputc( ',', stderr );
41 static void dump_bytes( const unsigned char *ptr, int len )
46 fprintf( stderr, "%02x", *ptr++ );
47 if (--len) fputc( ',', stderr );
52 static void dump_unicode_string( const WCHAR *str )
54 fprintf( stderr, "L\"" );
55 dump_strW( str, strlenW(str), stderr, "\"\"" );
56 fputc( '\"', stderr );
59 static void dump_path_t( const path_t *path )
61 dump_unicode_string( *path );
64 static void dump_context( const CONTEXT *context )
67 fprintf( stderr, "{flags=%08lx,eax=%08lx,ebx=%08lx,ecx=%08lx,edx=%08lx,esi=%08lx,edi=%08lx,"
68 "ebp=%08lx,eip=%08lx,esp=%08lx,eflags=%08lx,cs=%04lx,ds=%04lx,es=%04lx,"
69 "fs=%04lx,gs=%04lx,dr0=%08lx,dr1=%08lx,dr2=%08lx,dr3=%08lx,dr6=%08lx,dr7=%08lx,",
70 context->ContextFlags, context->Eax, context->Ebx, context->Ecx, context->Edx,
71 context->Esi, context->Edi, context->Ebp, context->Eip, context->Esp, context->EFlags,
72 context->SegCs, context->SegDs, context->SegEs, context->SegFs, context->SegGs,
73 context->Dr0, context->Dr1, context->Dr2, context->Dr3, context->Dr6, context->Dr7 );
74 fprintf( stderr, "float=" );
75 dump_uints( (int *)&context->FloatSave, sizeof(context->FloatSave) / sizeof(int) );
76 fprintf( stderr, "}" );
78 dump_uints( (int *)context, sizeof(*context) / sizeof(int) );
82 static void dump_exc_record( const EXCEPTION_RECORD *rec )
85 fprintf( stderr, "{code=%lx,flags=%lx,rec=%p,addr=%p,params={",
86 rec->ExceptionCode, rec->ExceptionFlags, rec->ExceptionRecord,
87 rec->ExceptionAddress );
88 for (i = 0; i < rec->NumberParameters; i++)
90 if (i) fputc( ',', stderr );
91 fprintf( stderr, "%lx", rec->ExceptionInformation[i] );
96 static void dump_debug_event_t( const debug_event_t *event )
100 case EXCEPTION_DEBUG_EVENT:
101 fprintf( stderr, "{exception," );
102 dump_exc_record( &event->info.exception.record );
103 fprintf( stderr, ",first=%d}", event->info.exception.first );
105 case CREATE_THREAD_DEBUG_EVENT:
106 fprintf( stderr, "{create_thread,thread=%d,teb=%p,start=%p}",
107 event->info.create_thread.handle, event->info.create_thread.teb,
108 event->info.create_thread.start );
110 case CREATE_PROCESS_DEBUG_EVENT:
111 fprintf( stderr, "{create_process,file=%d,process=%d,thread=%d,base=%p,offset=%d,"
112 "size=%d,teb=%p,start=%p,name=%p,unicode=%d}",
113 event->info.create_process.file, event->info.create_process.process,
114 event->info.create_process.thread, event->info.create_process.base,
115 event->info.create_process.dbg_offset, event->info.create_process.dbg_size,
116 event->info.create_process.teb, event->info.create_process.start,
117 event->info.create_process.name, event->info.create_process.unicode );
119 case EXIT_THREAD_DEBUG_EVENT:
120 fprintf( stderr, "{exit_thread,code=%d}", event->info.exit.exit_code );
122 case EXIT_PROCESS_DEBUG_EVENT:
123 fprintf( stderr, "{exit_process,code=%d}", event->info.exit.exit_code );
125 case LOAD_DLL_DEBUG_EVENT:
126 fprintf( stderr, "{load_dll,file=%d,base=%p,offset=%d,size=%d,name=%p,unicode=%d}",
127 event->info.load_dll.handle, event->info.load_dll.base,
128 event->info.load_dll.dbg_offset, event->info.load_dll.dbg_size,
129 event->info.load_dll.name, event->info.load_dll.unicode );
131 case UNLOAD_DLL_DEBUG_EVENT:
132 fprintf( stderr, "{unload_dll,base=%p}", event->info.unload_dll.base );
134 case OUTPUT_DEBUG_STRING_EVENT:
135 fprintf( stderr, "{output_string,data=%p,unicode=%d,len=%d}",
136 event->info.output_string.string, event->info.output_string.unicode,
137 event->info.output_string.length );
140 fprintf( stderr, "{rip,err=%d,type=%d}",
141 event->info.rip_info.error, event->info.rip_info.type );
143 case 0: /* zero is the code returned on timeouts */
144 fprintf( stderr, "{}" );
147 fprintf( stderr, "{code=??? (%d)}", event->code );
153 /* dumping for functions for requests that have a variable part */
155 static void dump_varargs_select_request( const struct select_request *req )
157 dump_ints( req->handles, req->count );
160 static void dump_varargs_get_apcs_reply( const struct get_apcs_request *req )
163 for (i = 0; i < 2 * req->count; i++)
164 fprintf( stderr, "%c%p", i ? ',' : '{', req->apcs[i] );
165 fprintf( stderr, "}" );
168 static void dump_varargs_get_socket_event_reply( const struct get_socket_event_request *req )
170 dump_ints( req->errors, FD_MAX_EVENTS );
173 static void dump_varargs_read_process_memory_reply( const struct read_process_memory_request *req )
175 int count = MIN( req->len, get_req_size( req->data, sizeof(int) ) );
176 dump_bytes( (unsigned char *)req->data, count * sizeof(int) );
179 static void dump_varargs_write_process_memory_request( const struct write_process_memory_request *req )
181 int count = MIN( req->len, get_req_size( req->data, sizeof(int) ) );
182 dump_bytes( (unsigned char *)req->data, count * sizeof(int) );
185 static void dump_varargs_set_key_value_request( const struct set_key_value_request *req )
187 dump_bytes( req->data, req->len );
190 static void dump_varargs_get_key_value_reply( const struct get_key_value_request *req )
192 dump_bytes( req->data, req->len );
195 static void dump_varargs_enum_key_value_reply( const struct enum_key_value_request *req )
197 dump_bytes( req->data, req->len );
200 typedef void (*dump_func)( const void *req );
202 /* Everything below this line is generated automatically by tools/make_requests */
203 /* ### make_requests begin ### */
205 static void dump_new_process_request( const struct new_process_request *req )
207 fprintf( stderr, " inherit=%d,", req->inherit );
208 fprintf( stderr, " inherit_all=%d,", req->inherit_all );
209 fprintf( stderr, " create_flags=%d,", req->create_flags );
210 fprintf( stderr, " start_flags=%d,", req->start_flags );
211 fprintf( stderr, " exe_file=%d,", req->exe_file );
212 fprintf( stderr, " hstdin=%d,", req->hstdin );
213 fprintf( stderr, " hstdout=%d,", req->hstdout );
214 fprintf( stderr, " hstderr=%d,", req->hstderr );
215 fprintf( stderr, " event=%d,", req->event );
216 fprintf( stderr, " cmd_show=%d,", req->cmd_show );
217 fprintf( stderr, " env_ptr=%p,", req->env_ptr );
218 fprintf( stderr, " cmdline=\"%s\"", req->cmdline );
221 static void dump_new_process_reply( const struct new_process_request *req )
223 fprintf( stderr, " pid=%p,", req->pid );
224 fprintf( stderr, " phandle=%d,", req->phandle );
225 fprintf( stderr, " tid=%p,", req->tid );
226 fprintf( stderr, " thandle=%d", req->thandle );
229 static void dump_new_thread_request( const struct new_thread_request *req )
231 fprintf( stderr, " suspend=%d,", req->suspend );
232 fprintf( stderr, " inherit=%d", req->inherit );
235 static void dump_new_thread_reply( const struct new_thread_request *req )
237 fprintf( stderr, " tid=%p,", req->tid );
238 fprintf( stderr, " handle=%d", req->handle );
241 static void dump_boot_done_request( const struct boot_done_request *req )
243 fprintf( stderr, " debug_level=%d", req->debug_level );
246 static void dump_init_process_request( const struct init_process_request *req )
248 fprintf( stderr, " ldt_copy=%p,", req->ldt_copy );
249 fprintf( stderr, " ldt_flags=%p", req->ldt_flags );
252 static void dump_init_process_reply( const struct init_process_request *req )
254 fprintf( stderr, " start_flags=%d,", req->start_flags );
255 fprintf( stderr, " exe_file=%d,", req->exe_file );
256 fprintf( stderr, " hstdin=%d,", req->hstdin );
257 fprintf( stderr, " hstdout=%d,", req->hstdout );
258 fprintf( stderr, " hstderr=%d,", req->hstderr );
259 fprintf( stderr, " cmd_show=%d,", req->cmd_show );
260 fprintf( stderr, " env_ptr=%p,", req->env_ptr );
261 fprintf( stderr, " cmdline=\"%s\"", req->cmdline );
264 static void dump_init_process_done_request( const struct init_process_done_request *req )
266 fprintf( stderr, " module=%p,", req->module );
267 fprintf( stderr, " entry=%p", req->entry );
270 static void dump_init_process_done_reply( const struct init_process_done_request *req )
272 fprintf( stderr, " debugged=%d", req->debugged );
275 static void dump_init_thread_request( const struct init_thread_request *req )
277 fprintf( stderr, " unix_pid=%d,", req->unix_pid );
278 fprintf( stderr, " teb=%p,", req->teb );
279 fprintf( stderr, " entry=%p", req->entry );
282 static void dump_get_thread_buffer_request( const struct get_thread_buffer_request *req )
286 static void dump_get_thread_buffer_reply( const struct get_thread_buffer_request *req )
288 fprintf( stderr, " pid=%p,", req->pid );
289 fprintf( stderr, " tid=%p,", req->tid );
290 fprintf( stderr, " boot=%d,", req->boot );
291 fprintf( stderr, " version=%d", req->version );
294 static void dump_terminate_process_request( const struct terminate_process_request *req )
296 fprintf( stderr, " handle=%d,", req->handle );
297 fprintf( stderr, " exit_code=%d", req->exit_code );
300 static void dump_terminate_process_reply( const struct terminate_process_request *req )
302 fprintf( stderr, " self=%d", req->self );
305 static void dump_terminate_thread_request( const struct terminate_thread_request *req )
307 fprintf( stderr, " handle=%d,", req->handle );
308 fprintf( stderr, " exit_code=%d", req->exit_code );
311 static void dump_terminate_thread_reply( const struct terminate_thread_request *req )
313 fprintf( stderr, " self=%d,", req->self );
314 fprintf( stderr, " last=%d", req->last );
317 static void dump_get_process_info_request( const struct get_process_info_request *req )
319 fprintf( stderr, " handle=%d", req->handle );
322 static void dump_get_process_info_reply( const struct get_process_info_request *req )
324 fprintf( stderr, " pid=%p,", req->pid );
325 fprintf( stderr, " debugged=%d,", req->debugged );
326 fprintf( stderr, " exit_code=%d,", req->exit_code );
327 fprintf( stderr, " priority=%d,", req->priority );
328 fprintf( stderr, " process_affinity=%d,", req->process_affinity );
329 fprintf( stderr, " system_affinity=%d", req->system_affinity );
332 static void dump_set_process_info_request( const struct set_process_info_request *req )
334 fprintf( stderr, " handle=%d,", req->handle );
335 fprintf( stderr, " mask=%d,", req->mask );
336 fprintf( stderr, " priority=%d,", req->priority );
337 fprintf( stderr, " affinity=%d", req->affinity );
340 static void dump_get_thread_info_request( const struct get_thread_info_request *req )
342 fprintf( stderr, " handle=%d", req->handle );
345 static void dump_get_thread_info_reply( const struct get_thread_info_request *req )
347 fprintf( stderr, " tid=%p,", req->tid );
348 fprintf( stderr, " exit_code=%d,", req->exit_code );
349 fprintf( stderr, " priority=%d", req->priority );
352 static void dump_set_thread_info_request( const struct set_thread_info_request *req )
354 fprintf( stderr, " handle=%d,", req->handle );
355 fprintf( stderr, " mask=%d,", req->mask );
356 fprintf( stderr, " priority=%d,", req->priority );
357 fprintf( stderr, " affinity=%d", req->affinity );
360 static void dump_suspend_thread_request( const struct suspend_thread_request *req )
362 fprintf( stderr, " handle=%d", req->handle );
365 static void dump_suspend_thread_reply( const struct suspend_thread_request *req )
367 fprintf( stderr, " count=%d", req->count );
370 static void dump_resume_thread_request( const struct resume_thread_request *req )
372 fprintf( stderr, " handle=%d", req->handle );
375 static void dump_resume_thread_reply( const struct resume_thread_request *req )
377 fprintf( stderr, " count=%d", req->count );
380 static void dump_load_dll_request( const struct load_dll_request *req )
382 fprintf( stderr, " handle=%d,", req->handle );
383 fprintf( stderr, " base=%p,", req->base );
384 fprintf( stderr, " dbg_offset=%d,", req->dbg_offset );
385 fprintf( stderr, " dbg_size=%d,", req->dbg_size );
386 fprintf( stderr, " name=%p", req->name );
389 static void dump_unload_dll_request( const struct unload_dll_request *req )
391 fprintf( stderr, " base=%p", req->base );
394 static void dump_queue_apc_request( const struct queue_apc_request *req )
396 fprintf( stderr, " handle=%d,", req->handle );
397 fprintf( stderr, " func=%p,", req->func );
398 fprintf( stderr, " param=%p", req->param );
401 static void dump_get_apcs_request( const struct get_apcs_request *req )
405 static void dump_get_apcs_reply( const struct get_apcs_request *req )
407 fprintf( stderr, " count=%d,", req->count );
408 fprintf( stderr, " apcs=" );
409 dump_varargs_get_apcs_reply( req );
412 static void dump_close_handle_request( const struct close_handle_request *req )
414 fprintf( stderr, " handle=%d", req->handle );
417 static void dump_get_handle_info_request( const struct get_handle_info_request *req )
419 fprintf( stderr, " handle=%d", req->handle );
422 static void dump_get_handle_info_reply( const struct get_handle_info_request *req )
424 fprintf( stderr, " flags=%d", req->flags );
427 static void dump_set_handle_info_request( const struct set_handle_info_request *req )
429 fprintf( stderr, " handle=%d,", req->handle );
430 fprintf( stderr, " flags=%d,", req->flags );
431 fprintf( stderr, " mask=%d", req->mask );
434 static void dump_dup_handle_request( const struct dup_handle_request *req )
436 fprintf( stderr, " src_process=%d,", req->src_process );
437 fprintf( stderr, " src_handle=%d,", req->src_handle );
438 fprintf( stderr, " dst_process=%d,", req->dst_process );
439 fprintf( stderr, " access=%08x,", req->access );
440 fprintf( stderr, " inherit=%d,", req->inherit );
441 fprintf( stderr, " options=%d", req->options );
444 static void dump_dup_handle_reply( const struct dup_handle_request *req )
446 fprintf( stderr, " handle=%d", req->handle );
449 static void dump_open_process_request( const struct open_process_request *req )
451 fprintf( stderr, " pid=%p,", req->pid );
452 fprintf( stderr, " access=%08x,", req->access );
453 fprintf( stderr, " inherit=%d", req->inherit );
456 static void dump_open_process_reply( const struct open_process_request *req )
458 fprintf( stderr, " handle=%d", req->handle );
461 static void dump_select_request( const struct select_request *req )
463 fprintf( stderr, " count=%d,", req->count );
464 fprintf( stderr, " flags=%d,", req->flags );
465 fprintf( stderr, " timeout=%d,", req->timeout );
466 fprintf( stderr, " handles=" );
467 dump_varargs_select_request( req );
470 static void dump_select_reply( const struct select_request *req )
472 fprintf( stderr, " signaled=%d", req->signaled );
475 static void dump_create_event_request( const struct create_event_request *req )
477 fprintf( stderr, " manual_reset=%d,", req->manual_reset );
478 fprintf( stderr, " initial_state=%d,", req->initial_state );
479 fprintf( stderr, " inherit=%d,", req->inherit );
480 fprintf( stderr, " name=" );
481 dump_unicode_string( req->name );
484 static void dump_create_event_reply( const struct create_event_request *req )
486 fprintf( stderr, " handle=%d", req->handle );
489 static void dump_event_op_request( const struct event_op_request *req )
491 fprintf( stderr, " handle=%d,", req->handle );
492 fprintf( stderr, " op=%d", req->op );
495 static void dump_open_event_request( const struct open_event_request *req )
497 fprintf( stderr, " access=%08x,", req->access );
498 fprintf( stderr, " inherit=%d,", req->inherit );
499 fprintf( stderr, " name=" );
500 dump_unicode_string( req->name );
503 static void dump_open_event_reply( const struct open_event_request *req )
505 fprintf( stderr, " handle=%d", req->handle );
508 static void dump_create_mutex_request( const struct create_mutex_request *req )
510 fprintf( stderr, " owned=%d,", req->owned );
511 fprintf( stderr, " inherit=%d,", req->inherit );
512 fprintf( stderr, " name=" );
513 dump_unicode_string( req->name );
516 static void dump_create_mutex_reply( const struct create_mutex_request *req )
518 fprintf( stderr, " handle=%d", req->handle );
521 static void dump_release_mutex_request( const struct release_mutex_request *req )
523 fprintf( stderr, " handle=%d", req->handle );
526 static void dump_open_mutex_request( const struct open_mutex_request *req )
528 fprintf( stderr, " access=%08x,", req->access );
529 fprintf( stderr, " inherit=%d,", req->inherit );
530 fprintf( stderr, " name=" );
531 dump_unicode_string( req->name );
534 static void dump_open_mutex_reply( const struct open_mutex_request *req )
536 fprintf( stderr, " handle=%d", req->handle );
539 static void dump_create_semaphore_request( const struct create_semaphore_request *req )
541 fprintf( stderr, " initial=%08x,", req->initial );
542 fprintf( stderr, " max=%08x,", req->max );
543 fprintf( stderr, " inherit=%d,", req->inherit );
544 fprintf( stderr, " name=" );
545 dump_unicode_string( req->name );
548 static void dump_create_semaphore_reply( const struct create_semaphore_request *req )
550 fprintf( stderr, " handle=%d", req->handle );
553 static void dump_release_semaphore_request( const struct release_semaphore_request *req )
555 fprintf( stderr, " handle=%d,", req->handle );
556 fprintf( stderr, " count=%08x", req->count );
559 static void dump_release_semaphore_reply( const struct release_semaphore_request *req )
561 fprintf( stderr, " prev_count=%08x", req->prev_count );
564 static void dump_open_semaphore_request( const struct open_semaphore_request *req )
566 fprintf( stderr, " access=%08x,", req->access );
567 fprintf( stderr, " inherit=%d,", req->inherit );
568 fprintf( stderr, " name=" );
569 dump_unicode_string( req->name );
572 static void dump_open_semaphore_reply( const struct open_semaphore_request *req )
574 fprintf( stderr, " handle=%d", req->handle );
577 static void dump_create_file_request( const struct create_file_request *req )
579 fprintf( stderr, " access=%08x,", req->access );
580 fprintf( stderr, " inherit=%d,", req->inherit );
581 fprintf( stderr, " sharing=%08x,", req->sharing );
582 fprintf( stderr, " create=%d,", req->create );
583 fprintf( stderr, " attrs=%08x,", req->attrs );
584 fprintf( stderr, " name=\"%s\"", req->name );
587 static void dump_create_file_reply( const struct create_file_request *req )
589 fprintf( stderr, " handle=%d", req->handle );
592 static void dump_alloc_file_handle_request( const struct alloc_file_handle_request *req )
594 fprintf( stderr, " access=%08x", req->access );
597 static void dump_alloc_file_handle_reply( const struct alloc_file_handle_request *req )
599 fprintf( stderr, " handle=%d", req->handle );
602 static void dump_get_read_fd_request( const struct get_read_fd_request *req )
604 fprintf( stderr, " handle=%d", req->handle );
607 static void dump_get_write_fd_request( const struct get_write_fd_request *req )
609 fprintf( stderr, " handle=%d", req->handle );
612 static void dump_set_file_pointer_request( const struct set_file_pointer_request *req )
614 fprintf( stderr, " handle=%d,", req->handle );
615 fprintf( stderr, " low=%d,", req->low );
616 fprintf( stderr, " high=%d,", req->high );
617 fprintf( stderr, " whence=%d", req->whence );
620 static void dump_set_file_pointer_reply( const struct set_file_pointer_request *req )
622 fprintf( stderr, " new_low=%d,", req->new_low );
623 fprintf( stderr, " new_high=%d", req->new_high );
626 static void dump_truncate_file_request( const struct truncate_file_request *req )
628 fprintf( stderr, " handle=%d", req->handle );
631 static void dump_set_file_time_request( const struct set_file_time_request *req )
633 fprintf( stderr, " handle=%d,", req->handle );
634 fprintf( stderr, " access_time=%ld,", req->access_time );
635 fprintf( stderr, " write_time=%ld", req->write_time );
638 static void dump_flush_file_request( const struct flush_file_request *req )
640 fprintf( stderr, " handle=%d", req->handle );
643 static void dump_get_file_info_request( const struct get_file_info_request *req )
645 fprintf( stderr, " handle=%d", req->handle );
648 static void dump_get_file_info_reply( const struct get_file_info_request *req )
650 fprintf( stderr, " type=%d,", req->type );
651 fprintf( stderr, " attr=%d,", req->attr );
652 fprintf( stderr, " access_time=%ld,", req->access_time );
653 fprintf( stderr, " write_time=%ld,", req->write_time );
654 fprintf( stderr, " size_high=%d,", req->size_high );
655 fprintf( stderr, " size_low=%d,", req->size_low );
656 fprintf( stderr, " links=%d,", req->links );
657 fprintf( stderr, " index_high=%d,", req->index_high );
658 fprintf( stderr, " index_low=%d,", req->index_low );
659 fprintf( stderr, " serial=%08x", req->serial );
662 static void dump_lock_file_request( const struct lock_file_request *req )
664 fprintf( stderr, " handle=%d,", req->handle );
665 fprintf( stderr, " offset_low=%08x,", req->offset_low );
666 fprintf( stderr, " offset_high=%08x,", req->offset_high );
667 fprintf( stderr, " count_low=%08x,", req->count_low );
668 fprintf( stderr, " count_high=%08x", req->count_high );
671 static void dump_unlock_file_request( const struct unlock_file_request *req )
673 fprintf( stderr, " handle=%d,", req->handle );
674 fprintf( stderr, " offset_low=%08x,", req->offset_low );
675 fprintf( stderr, " offset_high=%08x,", req->offset_high );
676 fprintf( stderr, " count_low=%08x,", req->count_low );
677 fprintf( stderr, " count_high=%08x", req->count_high );
680 static void dump_create_pipe_request( const struct create_pipe_request *req )
682 fprintf( stderr, " inherit=%d", req->inherit );
685 static void dump_create_pipe_reply( const struct create_pipe_request *req )
687 fprintf( stderr, " handle_read=%d,", req->handle_read );
688 fprintf( stderr, " handle_write=%d", req->handle_write );
691 static void dump_create_socket_request( const struct create_socket_request *req )
693 fprintf( stderr, " access=%08x,", req->access );
694 fprintf( stderr, " inherit=%d,", req->inherit );
695 fprintf( stderr, " family=%d,", req->family );
696 fprintf( stderr, " type=%d,", req->type );
697 fprintf( stderr, " protocol=%d", req->protocol );
700 static void dump_create_socket_reply( const struct create_socket_request *req )
702 fprintf( stderr, " handle=%d", req->handle );
705 static void dump_accept_socket_request( const struct accept_socket_request *req )
707 fprintf( stderr, " lhandle=%d,", req->lhandle );
708 fprintf( stderr, " access=%08x,", req->access );
709 fprintf( stderr, " inherit=%d", req->inherit );
712 static void dump_accept_socket_reply( const struct accept_socket_request *req )
714 fprintf( stderr, " handle=%d", req->handle );
717 static void dump_set_socket_event_request( const struct set_socket_event_request *req )
719 fprintf( stderr, " handle=%d,", req->handle );
720 fprintf( stderr, " mask=%08x,", req->mask );
721 fprintf( stderr, " event=%d", req->event );
724 static void dump_get_socket_event_request( const struct get_socket_event_request *req )
726 fprintf( stderr, " handle=%d,", req->handle );
727 fprintf( stderr, " service=%d,", req->service );
728 fprintf( stderr, " s_event=%d", req->s_event );
731 static void dump_get_socket_event_reply( const struct get_socket_event_request *req )
733 fprintf( stderr, " mask=%08x,", req->mask );
734 fprintf( stderr, " pmask=%08x,", req->pmask );
735 fprintf( stderr, " state=%08x,", req->state );
736 fprintf( stderr, " errors=" );
737 dump_varargs_get_socket_event_reply( req );
740 static void dump_enable_socket_event_request( const struct enable_socket_event_request *req )
742 fprintf( stderr, " handle=%d,", req->handle );
743 fprintf( stderr, " mask=%08x,", req->mask );
744 fprintf( stderr, " sstate=%08x,", req->sstate );
745 fprintf( stderr, " cstate=%08x", req->cstate );
748 static void dump_alloc_console_request( const struct alloc_console_request *req )
750 fprintf( stderr, " access=%08x,", req->access );
751 fprintf( stderr, " inherit=%d", req->inherit );
754 static void dump_alloc_console_reply( const struct alloc_console_request *req )
756 fprintf( stderr, " handle_in=%d,", req->handle_in );
757 fprintf( stderr, " handle_out=%d", req->handle_out );
760 static void dump_free_console_request( const struct free_console_request *req )
762 fprintf( stderr, " dummy=%d", req->dummy );
765 static void dump_open_console_request( const struct open_console_request *req )
767 fprintf( stderr, " output=%d,", req->output );
768 fprintf( stderr, " access=%08x,", req->access );
769 fprintf( stderr, " inherit=%d", req->inherit );
772 static void dump_open_console_reply( const struct open_console_request *req )
774 fprintf( stderr, " handle=%d", req->handle );
777 static void dump_set_console_fd_request( const struct set_console_fd_request *req )
779 fprintf( stderr, " handle=%d,", req->handle );
780 fprintf( stderr, " file_handle=%d,", req->file_handle );
781 fprintf( stderr, " pid=%d", req->pid );
784 static void dump_get_console_mode_request( const struct get_console_mode_request *req )
786 fprintf( stderr, " handle=%d", req->handle );
789 static void dump_get_console_mode_reply( const struct get_console_mode_request *req )
791 fprintf( stderr, " mode=%d", req->mode );
794 static void dump_set_console_mode_request( const struct set_console_mode_request *req )
796 fprintf( stderr, " handle=%d,", req->handle );
797 fprintf( stderr, " mode=%d", req->mode );
800 static void dump_set_console_info_request( const struct set_console_info_request *req )
802 fprintf( stderr, " handle=%d,", req->handle );
803 fprintf( stderr, " mask=%d,", req->mask );
804 fprintf( stderr, " cursor_size=%d,", req->cursor_size );
805 fprintf( stderr, " cursor_visible=%d,", req->cursor_visible );
806 fprintf( stderr, " title=\"%s\"", req->title );
809 static void dump_get_console_info_request( const struct get_console_info_request *req )
811 fprintf( stderr, " handle=%d", req->handle );
814 static void dump_get_console_info_reply( const struct get_console_info_request *req )
816 fprintf( stderr, " cursor_size=%d,", req->cursor_size );
817 fprintf( stderr, " cursor_visible=%d,", req->cursor_visible );
818 fprintf( stderr, " pid=%d,", req->pid );
819 fprintf( stderr, " title=\"%s\"", req->title );
822 static void dump_write_console_input_request( const struct write_console_input_request *req )
824 fprintf( stderr, " handle=%d,", req->handle );
825 fprintf( stderr, " count=%d", req->count );
828 static void dump_write_console_input_reply( const struct write_console_input_request *req )
830 fprintf( stderr, " written=%d", req->written );
833 static void dump_read_console_input_request( const struct read_console_input_request *req )
835 fprintf( stderr, " handle=%d,", req->handle );
836 fprintf( stderr, " count=%d,", req->count );
837 fprintf( stderr, " flush=%d", req->flush );
840 static void dump_read_console_input_reply( const struct read_console_input_request *req )
842 fprintf( stderr, " read=%d", req->read );
845 static void dump_create_change_notification_request( const struct create_change_notification_request *req )
847 fprintf( stderr, " subtree=%d,", req->subtree );
848 fprintf( stderr, " filter=%d", req->filter );
851 static void dump_create_change_notification_reply( const struct create_change_notification_request *req )
853 fprintf( stderr, " handle=%d", req->handle );
856 static void dump_create_mapping_request( const struct create_mapping_request *req )
858 fprintf( stderr, " size_high=%d,", req->size_high );
859 fprintf( stderr, " size_low=%d,", req->size_low );
860 fprintf( stderr, " protect=%d,", req->protect );
861 fprintf( stderr, " inherit=%d,", req->inherit );
862 fprintf( stderr, " file_handle=%d,", req->file_handle );
863 fprintf( stderr, " name=" );
864 dump_unicode_string( req->name );
867 static void dump_create_mapping_reply( const struct create_mapping_request *req )
869 fprintf( stderr, " handle=%d", req->handle );
872 static void dump_open_mapping_request( const struct open_mapping_request *req )
874 fprintf( stderr, " access=%08x,", req->access );
875 fprintf( stderr, " inherit=%d,", req->inherit );
876 fprintf( stderr, " name=" );
877 dump_unicode_string( req->name );
880 static void dump_open_mapping_reply( const struct open_mapping_request *req )
882 fprintf( stderr, " handle=%d", req->handle );
885 static void dump_get_mapping_info_request( const struct get_mapping_info_request *req )
887 fprintf( stderr, " handle=%d", req->handle );
890 static void dump_get_mapping_info_reply( const struct get_mapping_info_request *req )
892 fprintf( stderr, " size_high=%d,", req->size_high );
893 fprintf( stderr, " size_low=%d,", req->size_low );
894 fprintf( stderr, " protect=%d", req->protect );
897 static void dump_create_device_request( const struct create_device_request *req )
899 fprintf( stderr, " access=%08x,", req->access );
900 fprintf( stderr, " inherit=%d,", req->inherit );
901 fprintf( stderr, " id=%d", req->id );
904 static void dump_create_device_reply( const struct create_device_request *req )
906 fprintf( stderr, " handle=%d", req->handle );
909 static void dump_create_snapshot_request( const struct create_snapshot_request *req )
911 fprintf( stderr, " inherit=%d,", req->inherit );
912 fprintf( stderr, " flags=%d", req->flags );
915 static void dump_create_snapshot_reply( const struct create_snapshot_request *req )
917 fprintf( stderr, " handle=%d", req->handle );
920 static void dump_next_process_request( const struct next_process_request *req )
922 fprintf( stderr, " handle=%d,", req->handle );
923 fprintf( stderr, " reset=%d", req->reset );
926 static void dump_next_process_reply( const struct next_process_request *req )
928 fprintf( stderr, " pid=%p,", req->pid );
929 fprintf( stderr, " threads=%d,", req->threads );
930 fprintf( stderr, " priority=%d", req->priority );
933 static void dump_wait_debug_event_request( const struct wait_debug_event_request *req )
935 fprintf( stderr, " timeout=%d", req->timeout );
938 static void dump_wait_debug_event_reply( const struct wait_debug_event_request *req )
940 fprintf( stderr, " pid=%p,", req->pid );
941 fprintf( stderr, " tid=%p,", req->tid );
942 fprintf( stderr, " event=" );
943 dump_debug_event_t( &req->event );
946 static void dump_exception_event_request( const struct exception_event_request *req )
948 fprintf( stderr, " record=" );
949 dump_exc_record( &req->record );
950 fprintf( stderr, "," );
951 fprintf( stderr, " first=%d,", req->first );
952 fprintf( stderr, " context=" );
953 dump_context( &req->context );
956 static void dump_exception_event_reply( const struct exception_event_request *req )
958 fprintf( stderr, " status=%d", req->status );
961 static void dump_output_debug_string_request( const struct output_debug_string_request *req )
963 fprintf( stderr, " string=%p,", req->string );
964 fprintf( stderr, " unicode=%d,", req->unicode );
965 fprintf( stderr, " length=%d", req->length );
968 static void dump_continue_debug_event_request( const struct continue_debug_event_request *req )
970 fprintf( stderr, " pid=%p,", req->pid );
971 fprintf( stderr, " tid=%p,", req->tid );
972 fprintf( stderr, " status=%d", req->status );
975 static void dump_debug_process_request( const struct debug_process_request *req )
977 fprintf( stderr, " pid=%p", req->pid );
980 static void dump_read_process_memory_request( const struct read_process_memory_request *req )
982 fprintf( stderr, " handle=%d,", req->handle );
983 fprintf( stderr, " addr=%p,", req->addr );
984 fprintf( stderr, " len=%d", req->len );
987 static void dump_read_process_memory_reply( const struct read_process_memory_request *req )
989 fprintf( stderr, " data=" );
990 dump_varargs_read_process_memory_reply( req );
993 static void dump_write_process_memory_request( const struct write_process_memory_request *req )
995 fprintf( stderr, " handle=%d,", req->handle );
996 fprintf( stderr, " addr=%p,", req->addr );
997 fprintf( stderr, " len=%d,", req->len );
998 fprintf( stderr, " first_mask=%08x,", req->first_mask );
999 fprintf( stderr, " last_mask=%08x,", req->last_mask );
1000 fprintf( stderr, " data=" );
1001 dump_varargs_write_process_memory_request( req );
1004 static void dump_create_key_request( const struct create_key_request *req )
1006 fprintf( stderr, " parent=%d,", req->parent );
1007 fprintf( stderr, " access=%08x,", req->access );
1008 fprintf( stderr, " options=%08x,", req->options );
1009 fprintf( stderr, " modif=%ld,", req->modif );
1010 fprintf( stderr, " name=" );
1011 dump_path_t( &req->name );
1012 fprintf( stderr, "," );
1013 fprintf( stderr, " class=" );
1014 dump_unicode_string( req->class );
1017 static void dump_create_key_reply( const struct create_key_request *req )
1019 fprintf( stderr, " hkey=%d,", req->hkey );
1020 fprintf( stderr, " created=%d", req->created );
1023 static void dump_open_key_request( const struct open_key_request *req )
1025 fprintf( stderr, " parent=%d,", req->parent );
1026 fprintf( stderr, " access=%08x,", req->access );
1027 fprintf( stderr, " name=" );
1028 dump_path_t( &req->name );
1031 static void dump_open_key_reply( const struct open_key_request *req )
1033 fprintf( stderr, " hkey=%d", req->hkey );
1036 static void dump_delete_key_request( const struct delete_key_request *req )
1038 fprintf( stderr, " hkey=%d,", req->hkey );
1039 fprintf( stderr, " name=" );
1040 dump_path_t( &req->name );
1043 static void dump_close_key_request( const struct close_key_request *req )
1045 fprintf( stderr, " hkey=%d", req->hkey );
1048 static void dump_enum_key_request( const struct enum_key_request *req )
1050 fprintf( stderr, " hkey=%d,", req->hkey );
1051 fprintf( stderr, " index=%d", req->index );
1054 static void dump_enum_key_reply( const struct enum_key_request *req )
1056 fprintf( stderr, " modif=%ld,", req->modif );
1057 fprintf( stderr, " name=" );
1058 dump_path_t( &req->name );
1059 fprintf( stderr, "," );
1060 fprintf( stderr, " class=" );
1061 dump_unicode_string( req->class );
1064 static void dump_query_key_info_request( const struct query_key_info_request *req )
1066 fprintf( stderr, " hkey=%d", req->hkey );
1069 static void dump_query_key_info_reply( const struct query_key_info_request *req )
1071 fprintf( stderr, " subkeys=%d,", req->subkeys );
1072 fprintf( stderr, " max_subkey=%d,", req->max_subkey );
1073 fprintf( stderr, " max_class=%d,", req->max_class );
1074 fprintf( stderr, " values=%d,", req->values );
1075 fprintf( stderr, " max_value=%d,", req->max_value );
1076 fprintf( stderr, " max_data=%d,", req->max_data );
1077 fprintf( stderr, " modif=%ld,", req->modif );
1078 fprintf( stderr, " name=" );
1079 dump_path_t( &req->name );
1080 fprintf( stderr, "," );
1081 fprintf( stderr, " class=" );
1082 dump_unicode_string( req->class );
1085 static void dump_set_key_value_request( const struct set_key_value_request *req )
1087 fprintf( stderr, " hkey=%d,", req->hkey );
1088 fprintf( stderr, " type=%d,", req->type );
1089 fprintf( stderr, " len=%d,", req->len );
1090 fprintf( stderr, " name=" );
1091 dump_path_t( &req->name );
1092 fprintf( stderr, "," );
1093 fprintf( stderr, " data=" );
1094 dump_varargs_set_key_value_request( req );
1097 static void dump_get_key_value_request( const struct get_key_value_request *req )
1099 fprintf( stderr, " hkey=%d,", req->hkey );
1100 fprintf( stderr, " name=" );
1101 dump_unicode_string( req->name );
1104 static void dump_get_key_value_reply( const struct get_key_value_request *req )
1106 fprintf( stderr, " type=%d,", req->type );
1107 fprintf( stderr, " len=%d,", req->len );
1108 fprintf( stderr, " data=" );
1109 dump_varargs_get_key_value_reply( req );
1112 static void dump_enum_key_value_request( const struct enum_key_value_request *req )
1114 fprintf( stderr, " hkey=%d,", req->hkey );
1115 fprintf( stderr, " index=%d", req->index );
1118 static void dump_enum_key_value_reply( const struct enum_key_value_request *req )
1120 fprintf( stderr, " type=%d,", req->type );
1121 fprintf( stderr, " len=%d,", req->len );
1122 fprintf( stderr, " name=" );
1123 dump_path_t( &req->name );
1124 fprintf( stderr, "," );
1125 fprintf( stderr, " data=" );
1126 dump_varargs_enum_key_value_reply( req );
1129 static void dump_delete_key_value_request( const struct delete_key_value_request *req )
1131 fprintf( stderr, " hkey=%d,", req->hkey );
1132 fprintf( stderr, " name=" );
1133 dump_path_t( &req->name );
1136 static void dump_load_registry_request( const struct load_registry_request *req )
1138 fprintf( stderr, " hkey=%d,", req->hkey );
1139 fprintf( stderr, " file=%d,", req->file );
1140 fprintf( stderr, " name=" );
1141 dump_path_t( &req->name );
1144 static void dump_save_registry_request( const struct save_registry_request *req )
1146 fprintf( stderr, " hkey=%d,", req->hkey );
1147 fprintf( stderr, " file=%d", req->file );
1150 static void dump_set_registry_levels_request( const struct set_registry_levels_request *req )
1152 fprintf( stderr, " current=%d,", req->current );
1153 fprintf( stderr, " saving=%d,", req->saving );
1154 fprintf( stderr, " version=%d", req->version );
1157 static void dump_create_timer_request( const struct create_timer_request *req )
1159 fprintf( stderr, " inherit=%d,", req->inherit );
1160 fprintf( stderr, " manual=%d,", req->manual );
1161 fprintf( stderr, " name=" );
1162 dump_unicode_string( req->name );
1165 static void dump_create_timer_reply( const struct create_timer_request *req )
1167 fprintf( stderr, " handle=%d", req->handle );
1170 static void dump_open_timer_request( const struct open_timer_request *req )
1172 fprintf( stderr, " access=%08x,", req->access );
1173 fprintf( stderr, " inherit=%d,", req->inherit );
1174 fprintf( stderr, " name=" );
1175 dump_unicode_string( req->name );
1178 static void dump_open_timer_reply( const struct open_timer_request *req )
1180 fprintf( stderr, " handle=%d", req->handle );
1183 static void dump_set_timer_request( const struct set_timer_request *req )
1185 fprintf( stderr, " handle=%d,", req->handle );
1186 fprintf( stderr, " sec=%d,", req->sec );
1187 fprintf( stderr, " usec=%d,", req->usec );
1188 fprintf( stderr, " period=%d,", req->period );
1189 fprintf( stderr, " callback=%p,", req->callback );
1190 fprintf( stderr, " arg=%p", req->arg );
1193 static void dump_cancel_timer_request( const struct cancel_timer_request *req )
1195 fprintf( stderr, " handle=%d", req->handle );
1198 static void dump_get_thread_context_request( const struct get_thread_context_request *req )
1200 fprintf( stderr, " handle=%d,", req->handle );
1201 fprintf( stderr, " flags=%08x", req->flags );
1204 static void dump_get_thread_context_reply( const struct get_thread_context_request *req )
1206 fprintf( stderr, " context=" );
1207 dump_context( &req->context );
1210 static void dump_set_thread_context_request( const struct set_thread_context_request *req )
1212 fprintf( stderr, " handle=%d,", req->handle );
1213 fprintf( stderr, " flags=%08x,", req->flags );
1214 fprintf( stderr, " context=" );
1215 dump_context( &req->context );
1218 static void dump_get_selector_entry_request( const struct get_selector_entry_request *req )
1220 fprintf( stderr, " handle=%d,", req->handle );
1221 fprintf( stderr, " entry=%d", req->entry );
1224 static void dump_get_selector_entry_reply( const struct get_selector_entry_request *req )
1226 fprintf( stderr, " base=%08x,", req->base );
1227 fprintf( stderr, " limit=%08x,", req->limit );
1228 fprintf( stderr, " flags=%02x", req->flags );
1231 static void dump_add_atom_request( const struct add_atom_request *req )
1233 fprintf( stderr, " name=" );
1234 dump_unicode_string( req->name );
1237 static void dump_add_atom_reply( const struct add_atom_request *req )
1239 fprintf( stderr, " atom=%d", req->atom );
1242 static void dump_delete_atom_request( const struct delete_atom_request *req )
1244 fprintf( stderr, " atom=%d", req->atom );
1247 static void dump_find_atom_request( const struct find_atom_request *req )
1249 fprintf( stderr, " name=" );
1250 dump_unicode_string( req->name );
1253 static void dump_find_atom_reply( const struct find_atom_request *req )
1255 fprintf( stderr, " atom=%d", req->atom );
1258 static void dump_get_atom_name_request( const struct get_atom_name_request *req )
1260 fprintf( stderr, " atom=%d", req->atom );
1263 static void dump_get_atom_name_reply( const struct get_atom_name_request *req )
1265 fprintf( stderr, " count=%d,", req->count );
1266 fprintf( stderr, " name=" );
1267 dump_unicode_string( req->name );
1270 static const dump_func req_dumpers[REQ_NB_REQUESTS] = {
1271 (dump_func)dump_new_process_request,
1272 (dump_func)dump_new_thread_request,
1273 (dump_func)dump_boot_done_request,
1274 (dump_func)dump_init_process_request,
1275 (dump_func)dump_init_process_done_request,
1276 (dump_func)dump_init_thread_request,
1277 (dump_func)dump_get_thread_buffer_request,
1278 (dump_func)dump_terminate_process_request,
1279 (dump_func)dump_terminate_thread_request,
1280 (dump_func)dump_get_process_info_request,
1281 (dump_func)dump_set_process_info_request,
1282 (dump_func)dump_get_thread_info_request,
1283 (dump_func)dump_set_thread_info_request,
1284 (dump_func)dump_suspend_thread_request,
1285 (dump_func)dump_resume_thread_request,
1286 (dump_func)dump_load_dll_request,
1287 (dump_func)dump_unload_dll_request,
1288 (dump_func)dump_queue_apc_request,
1289 (dump_func)dump_get_apcs_request,
1290 (dump_func)dump_close_handle_request,
1291 (dump_func)dump_get_handle_info_request,
1292 (dump_func)dump_set_handle_info_request,
1293 (dump_func)dump_dup_handle_request,
1294 (dump_func)dump_open_process_request,
1295 (dump_func)dump_select_request,
1296 (dump_func)dump_create_event_request,
1297 (dump_func)dump_event_op_request,
1298 (dump_func)dump_open_event_request,
1299 (dump_func)dump_create_mutex_request,
1300 (dump_func)dump_release_mutex_request,
1301 (dump_func)dump_open_mutex_request,
1302 (dump_func)dump_create_semaphore_request,
1303 (dump_func)dump_release_semaphore_request,
1304 (dump_func)dump_open_semaphore_request,
1305 (dump_func)dump_create_file_request,
1306 (dump_func)dump_alloc_file_handle_request,
1307 (dump_func)dump_get_read_fd_request,
1308 (dump_func)dump_get_write_fd_request,
1309 (dump_func)dump_set_file_pointer_request,
1310 (dump_func)dump_truncate_file_request,
1311 (dump_func)dump_set_file_time_request,
1312 (dump_func)dump_flush_file_request,
1313 (dump_func)dump_get_file_info_request,
1314 (dump_func)dump_lock_file_request,
1315 (dump_func)dump_unlock_file_request,
1316 (dump_func)dump_create_pipe_request,
1317 (dump_func)dump_create_socket_request,
1318 (dump_func)dump_accept_socket_request,
1319 (dump_func)dump_set_socket_event_request,
1320 (dump_func)dump_get_socket_event_request,
1321 (dump_func)dump_enable_socket_event_request,
1322 (dump_func)dump_alloc_console_request,
1323 (dump_func)dump_free_console_request,
1324 (dump_func)dump_open_console_request,
1325 (dump_func)dump_set_console_fd_request,
1326 (dump_func)dump_get_console_mode_request,
1327 (dump_func)dump_set_console_mode_request,
1328 (dump_func)dump_set_console_info_request,
1329 (dump_func)dump_get_console_info_request,
1330 (dump_func)dump_write_console_input_request,
1331 (dump_func)dump_read_console_input_request,
1332 (dump_func)dump_create_change_notification_request,
1333 (dump_func)dump_create_mapping_request,
1334 (dump_func)dump_open_mapping_request,
1335 (dump_func)dump_get_mapping_info_request,
1336 (dump_func)dump_create_device_request,
1337 (dump_func)dump_create_snapshot_request,
1338 (dump_func)dump_next_process_request,
1339 (dump_func)dump_wait_debug_event_request,
1340 (dump_func)dump_exception_event_request,
1341 (dump_func)dump_output_debug_string_request,
1342 (dump_func)dump_continue_debug_event_request,
1343 (dump_func)dump_debug_process_request,
1344 (dump_func)dump_read_process_memory_request,
1345 (dump_func)dump_write_process_memory_request,
1346 (dump_func)dump_create_key_request,
1347 (dump_func)dump_open_key_request,
1348 (dump_func)dump_delete_key_request,
1349 (dump_func)dump_close_key_request,
1350 (dump_func)dump_enum_key_request,
1351 (dump_func)dump_query_key_info_request,
1352 (dump_func)dump_set_key_value_request,
1353 (dump_func)dump_get_key_value_request,
1354 (dump_func)dump_enum_key_value_request,
1355 (dump_func)dump_delete_key_value_request,
1356 (dump_func)dump_load_registry_request,
1357 (dump_func)dump_save_registry_request,
1358 (dump_func)dump_set_registry_levels_request,
1359 (dump_func)dump_create_timer_request,
1360 (dump_func)dump_open_timer_request,
1361 (dump_func)dump_set_timer_request,
1362 (dump_func)dump_cancel_timer_request,
1363 (dump_func)dump_get_thread_context_request,
1364 (dump_func)dump_set_thread_context_request,
1365 (dump_func)dump_get_selector_entry_request,
1366 (dump_func)dump_add_atom_request,
1367 (dump_func)dump_delete_atom_request,
1368 (dump_func)dump_find_atom_request,
1369 (dump_func)dump_get_atom_name_request,
1372 static const dump_func reply_dumpers[REQ_NB_REQUESTS] = {
1373 (dump_func)dump_new_process_reply,
1374 (dump_func)dump_new_thread_reply,
1376 (dump_func)dump_init_process_reply,
1377 (dump_func)dump_init_process_done_reply,
1379 (dump_func)dump_get_thread_buffer_reply,
1380 (dump_func)dump_terminate_process_reply,
1381 (dump_func)dump_terminate_thread_reply,
1382 (dump_func)dump_get_process_info_reply,
1384 (dump_func)dump_get_thread_info_reply,
1386 (dump_func)dump_suspend_thread_reply,
1387 (dump_func)dump_resume_thread_reply,
1391 (dump_func)dump_get_apcs_reply,
1393 (dump_func)dump_get_handle_info_reply,
1395 (dump_func)dump_dup_handle_reply,
1396 (dump_func)dump_open_process_reply,
1397 (dump_func)dump_select_reply,
1398 (dump_func)dump_create_event_reply,
1400 (dump_func)dump_open_event_reply,
1401 (dump_func)dump_create_mutex_reply,
1403 (dump_func)dump_open_mutex_reply,
1404 (dump_func)dump_create_semaphore_reply,
1405 (dump_func)dump_release_semaphore_reply,
1406 (dump_func)dump_open_semaphore_reply,
1407 (dump_func)dump_create_file_reply,
1408 (dump_func)dump_alloc_file_handle_reply,
1411 (dump_func)dump_set_file_pointer_reply,
1415 (dump_func)dump_get_file_info_reply,
1418 (dump_func)dump_create_pipe_reply,
1419 (dump_func)dump_create_socket_reply,
1420 (dump_func)dump_accept_socket_reply,
1422 (dump_func)dump_get_socket_event_reply,
1424 (dump_func)dump_alloc_console_reply,
1426 (dump_func)dump_open_console_reply,
1428 (dump_func)dump_get_console_mode_reply,
1431 (dump_func)dump_get_console_info_reply,
1432 (dump_func)dump_write_console_input_reply,
1433 (dump_func)dump_read_console_input_reply,
1434 (dump_func)dump_create_change_notification_reply,
1435 (dump_func)dump_create_mapping_reply,
1436 (dump_func)dump_open_mapping_reply,
1437 (dump_func)dump_get_mapping_info_reply,
1438 (dump_func)dump_create_device_reply,
1439 (dump_func)dump_create_snapshot_reply,
1440 (dump_func)dump_next_process_reply,
1441 (dump_func)dump_wait_debug_event_reply,
1442 (dump_func)dump_exception_event_reply,
1446 (dump_func)dump_read_process_memory_reply,
1448 (dump_func)dump_create_key_reply,
1449 (dump_func)dump_open_key_reply,
1452 (dump_func)dump_enum_key_reply,
1453 (dump_func)dump_query_key_info_reply,
1455 (dump_func)dump_get_key_value_reply,
1456 (dump_func)dump_enum_key_value_reply,
1461 (dump_func)dump_create_timer_reply,
1462 (dump_func)dump_open_timer_reply,
1465 (dump_func)dump_get_thread_context_reply,
1467 (dump_func)dump_get_selector_entry_reply,
1468 (dump_func)dump_add_atom_reply,
1470 (dump_func)dump_find_atom_reply,
1471 (dump_func)dump_get_atom_name_reply,
1474 static const char * const req_names[REQ_NB_REQUESTS] = {
1479 "init_process_done",
1481 "get_thread_buffer",
1482 "terminate_process",
1507 "release_semaphore",
1510 "alloc_file_handle",
1525 "enable_socket_event",
1534 "write_console_input",
1535 "read_console_input",
1536 "create_change_notification",
1545 "output_debug_string",
1546 "continue_debug_event",
1548 "read_process_memory",
1549 "write_process_memory",
1562 "set_registry_levels",
1567 "get_thread_context",
1568 "set_thread_context",
1569 "get_selector_entry",
1576 /* ### make_requests end ### */
1577 /* Everything above this line is generated automatically by tools/make_requests */
1579 void trace_request( enum request req )
1581 current->last_req = req;
1582 if (req < REQ_NB_REQUESTS)
1584 fprintf( stderr, "%08x: %s(", (unsigned int)current, req_names[req] );
1585 req_dumpers[req]( current->buffer );
1588 fprintf( stderr, "%08x: %d(", (unsigned int)current, req );
1589 if (current->pass_fd != -1) fprintf( stderr, " ) fd=%d\n", current->pass_fd );
1590 else fprintf( stderr, " )\n" );
1593 void trace_reply( struct thread *thread )
1595 fprintf( stderr, "%08x: %s() = %x",
1596 (unsigned int)thread, req_names[thread->last_req], thread->error );
1597 if (reply_dumpers[thread->last_req])
1599 fprintf( stderr, " {" );
1600 reply_dumpers[thread->last_req]( thread->buffer );
1601 fprintf( stderr, " }" );
1603 if (thread->pass_fd != -1) fprintf( stderr, " fd=%d\n", thread->pass_fd );
1604 else fprintf( stderr, "\n" );