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_thread_request( const struct terminate_thread_request *req )
302 fprintf( stderr, " handle=%d,", req->handle );
303 fprintf( stderr, " exit_code=%d", req->exit_code );
306 static void dump_get_process_info_request( const struct get_process_info_request *req )
308 fprintf( stderr, " handle=%d", req->handle );
311 static void dump_get_process_info_reply( const struct get_process_info_request *req )
313 fprintf( stderr, " pid=%p,", req->pid );
314 fprintf( stderr, " debugged=%d,", req->debugged );
315 fprintf( stderr, " exit_code=%d,", req->exit_code );
316 fprintf( stderr, " priority=%d,", req->priority );
317 fprintf( stderr, " process_affinity=%d,", req->process_affinity );
318 fprintf( stderr, " system_affinity=%d", req->system_affinity );
321 static void dump_set_process_info_request( const struct set_process_info_request *req )
323 fprintf( stderr, " handle=%d,", req->handle );
324 fprintf( stderr, " mask=%d,", req->mask );
325 fprintf( stderr, " priority=%d,", req->priority );
326 fprintf( stderr, " affinity=%d", req->affinity );
329 static void dump_get_thread_info_request( const struct get_thread_info_request *req )
331 fprintf( stderr, " handle=%d", req->handle );
334 static void dump_get_thread_info_reply( const struct get_thread_info_request *req )
336 fprintf( stderr, " tid=%p,", req->tid );
337 fprintf( stderr, " exit_code=%d,", req->exit_code );
338 fprintf( stderr, " priority=%d", req->priority );
341 static void dump_set_thread_info_request( const struct set_thread_info_request *req )
343 fprintf( stderr, " handle=%d,", req->handle );
344 fprintf( stderr, " mask=%d,", req->mask );
345 fprintf( stderr, " priority=%d,", req->priority );
346 fprintf( stderr, " affinity=%d", req->affinity );
349 static void dump_suspend_thread_request( const struct suspend_thread_request *req )
351 fprintf( stderr, " handle=%d", req->handle );
354 static void dump_suspend_thread_reply( const struct suspend_thread_request *req )
356 fprintf( stderr, " count=%d", req->count );
359 static void dump_resume_thread_request( const struct resume_thread_request *req )
361 fprintf( stderr, " handle=%d", req->handle );
364 static void dump_resume_thread_reply( const struct resume_thread_request *req )
366 fprintf( stderr, " count=%d", req->count );
369 static void dump_load_dll_request( const struct load_dll_request *req )
371 fprintf( stderr, " handle=%d,", req->handle );
372 fprintf( stderr, " base=%p,", req->base );
373 fprintf( stderr, " dbg_offset=%d,", req->dbg_offset );
374 fprintf( stderr, " dbg_size=%d,", req->dbg_size );
375 fprintf( stderr, " name=%p", req->name );
378 static void dump_unload_dll_request( const struct unload_dll_request *req )
380 fprintf( stderr, " base=%p", req->base );
383 static void dump_queue_apc_request( const struct queue_apc_request *req )
385 fprintf( stderr, " handle=%d,", req->handle );
386 fprintf( stderr, " func=%p,", req->func );
387 fprintf( stderr, " param=%p", req->param );
390 static void dump_get_apcs_request( const struct get_apcs_request *req )
394 static void dump_get_apcs_reply( const struct get_apcs_request *req )
396 fprintf( stderr, " count=%d,", req->count );
397 fprintf( stderr, " apcs=" );
398 dump_varargs_get_apcs_reply( req );
401 static void dump_close_handle_request( const struct close_handle_request *req )
403 fprintf( stderr, " handle=%d", req->handle );
406 static void dump_get_handle_info_request( const struct get_handle_info_request *req )
408 fprintf( stderr, " handle=%d", req->handle );
411 static void dump_get_handle_info_reply( const struct get_handle_info_request *req )
413 fprintf( stderr, " flags=%d", req->flags );
416 static void dump_set_handle_info_request( const struct set_handle_info_request *req )
418 fprintf( stderr, " handle=%d,", req->handle );
419 fprintf( stderr, " flags=%d,", req->flags );
420 fprintf( stderr, " mask=%d", req->mask );
423 static void dump_dup_handle_request( const struct dup_handle_request *req )
425 fprintf( stderr, " src_process=%d,", req->src_process );
426 fprintf( stderr, " src_handle=%d,", req->src_handle );
427 fprintf( stderr, " dst_process=%d,", req->dst_process );
428 fprintf( stderr, " access=%08x,", req->access );
429 fprintf( stderr, " inherit=%d,", req->inherit );
430 fprintf( stderr, " options=%d", req->options );
433 static void dump_dup_handle_reply( const struct dup_handle_request *req )
435 fprintf( stderr, " handle=%d", req->handle );
438 static void dump_open_process_request( const struct open_process_request *req )
440 fprintf( stderr, " pid=%p,", req->pid );
441 fprintf( stderr, " access=%08x,", req->access );
442 fprintf( stderr, " inherit=%d", req->inherit );
445 static void dump_open_process_reply( const struct open_process_request *req )
447 fprintf( stderr, " handle=%d", req->handle );
450 static void dump_select_request( const struct select_request *req )
452 fprintf( stderr, " count=%d,", req->count );
453 fprintf( stderr, " flags=%d,", req->flags );
454 fprintf( stderr, " timeout=%d,", req->timeout );
455 fprintf( stderr, " handles=" );
456 dump_varargs_select_request( req );
459 static void dump_select_reply( const struct select_request *req )
461 fprintf( stderr, " signaled=%d", req->signaled );
464 static void dump_create_event_request( const struct create_event_request *req )
466 fprintf( stderr, " manual_reset=%d,", req->manual_reset );
467 fprintf( stderr, " initial_state=%d,", req->initial_state );
468 fprintf( stderr, " inherit=%d,", req->inherit );
469 fprintf( stderr, " name=" );
470 dump_unicode_string( req->name );
473 static void dump_create_event_reply( const struct create_event_request *req )
475 fprintf( stderr, " handle=%d", req->handle );
478 static void dump_event_op_request( const struct event_op_request *req )
480 fprintf( stderr, " handle=%d,", req->handle );
481 fprintf( stderr, " op=%d", req->op );
484 static void dump_open_event_request( const struct open_event_request *req )
486 fprintf( stderr, " access=%08x,", req->access );
487 fprintf( stderr, " inherit=%d,", req->inherit );
488 fprintf( stderr, " name=" );
489 dump_unicode_string( req->name );
492 static void dump_open_event_reply( const struct open_event_request *req )
494 fprintf( stderr, " handle=%d", req->handle );
497 static void dump_create_mutex_request( const struct create_mutex_request *req )
499 fprintf( stderr, " owned=%d,", req->owned );
500 fprintf( stderr, " inherit=%d,", req->inherit );
501 fprintf( stderr, " name=" );
502 dump_unicode_string( req->name );
505 static void dump_create_mutex_reply( const struct create_mutex_request *req )
507 fprintf( stderr, " handle=%d", req->handle );
510 static void dump_release_mutex_request( const struct release_mutex_request *req )
512 fprintf( stderr, " handle=%d", req->handle );
515 static void dump_open_mutex_request( const struct open_mutex_request *req )
517 fprintf( stderr, " access=%08x,", req->access );
518 fprintf( stderr, " inherit=%d,", req->inherit );
519 fprintf( stderr, " name=" );
520 dump_unicode_string( req->name );
523 static void dump_open_mutex_reply( const struct open_mutex_request *req )
525 fprintf( stderr, " handle=%d", req->handle );
528 static void dump_create_semaphore_request( const struct create_semaphore_request *req )
530 fprintf( stderr, " initial=%08x,", req->initial );
531 fprintf( stderr, " max=%08x,", req->max );
532 fprintf( stderr, " inherit=%d,", req->inherit );
533 fprintf( stderr, " name=" );
534 dump_unicode_string( req->name );
537 static void dump_create_semaphore_reply( const struct create_semaphore_request *req )
539 fprintf( stderr, " handle=%d", req->handle );
542 static void dump_release_semaphore_request( const struct release_semaphore_request *req )
544 fprintf( stderr, " handle=%d,", req->handle );
545 fprintf( stderr, " count=%08x", req->count );
548 static void dump_release_semaphore_reply( const struct release_semaphore_request *req )
550 fprintf( stderr, " prev_count=%08x", req->prev_count );
553 static void dump_open_semaphore_request( const struct open_semaphore_request *req )
555 fprintf( stderr, " access=%08x,", req->access );
556 fprintf( stderr, " inherit=%d,", req->inherit );
557 fprintf( stderr, " name=" );
558 dump_unicode_string( req->name );
561 static void dump_open_semaphore_reply( const struct open_semaphore_request *req )
563 fprintf( stderr, " handle=%d", req->handle );
566 static void dump_create_file_request( const struct create_file_request *req )
568 fprintf( stderr, " access=%08x,", req->access );
569 fprintf( stderr, " inherit=%d,", req->inherit );
570 fprintf( stderr, " sharing=%08x,", req->sharing );
571 fprintf( stderr, " create=%d,", req->create );
572 fprintf( stderr, " attrs=%08x,", req->attrs );
573 fprintf( stderr, " name=\"%s\"", req->name );
576 static void dump_create_file_reply( const struct create_file_request *req )
578 fprintf( stderr, " handle=%d", req->handle );
581 static void dump_alloc_file_handle_request( const struct alloc_file_handle_request *req )
583 fprintf( stderr, " access=%08x", req->access );
586 static void dump_alloc_file_handle_reply( const struct alloc_file_handle_request *req )
588 fprintf( stderr, " handle=%d", req->handle );
591 static void dump_get_read_fd_request( const struct get_read_fd_request *req )
593 fprintf( stderr, " handle=%d", req->handle );
596 static void dump_get_write_fd_request( const struct get_write_fd_request *req )
598 fprintf( stderr, " handle=%d", req->handle );
601 static void dump_set_file_pointer_request( const struct set_file_pointer_request *req )
603 fprintf( stderr, " handle=%d,", req->handle );
604 fprintf( stderr, " low=%d,", req->low );
605 fprintf( stderr, " high=%d,", req->high );
606 fprintf( stderr, " whence=%d", req->whence );
609 static void dump_set_file_pointer_reply( const struct set_file_pointer_request *req )
611 fprintf( stderr, " new_low=%d,", req->new_low );
612 fprintf( stderr, " new_high=%d", req->new_high );
615 static void dump_truncate_file_request( const struct truncate_file_request *req )
617 fprintf( stderr, " handle=%d", req->handle );
620 static void dump_set_file_time_request( const struct set_file_time_request *req )
622 fprintf( stderr, " handle=%d,", req->handle );
623 fprintf( stderr, " access_time=%ld,", req->access_time );
624 fprintf( stderr, " write_time=%ld", req->write_time );
627 static void dump_flush_file_request( const struct flush_file_request *req )
629 fprintf( stderr, " handle=%d", req->handle );
632 static void dump_get_file_info_request( const struct get_file_info_request *req )
634 fprintf( stderr, " handle=%d", req->handle );
637 static void dump_get_file_info_reply( const struct get_file_info_request *req )
639 fprintf( stderr, " type=%d,", req->type );
640 fprintf( stderr, " attr=%d,", req->attr );
641 fprintf( stderr, " access_time=%ld,", req->access_time );
642 fprintf( stderr, " write_time=%ld,", req->write_time );
643 fprintf( stderr, " size_high=%d,", req->size_high );
644 fprintf( stderr, " size_low=%d,", req->size_low );
645 fprintf( stderr, " links=%d,", req->links );
646 fprintf( stderr, " index_high=%d,", req->index_high );
647 fprintf( stderr, " index_low=%d,", req->index_low );
648 fprintf( stderr, " serial=%08x", req->serial );
651 static void dump_lock_file_request( const struct lock_file_request *req )
653 fprintf( stderr, " handle=%d,", req->handle );
654 fprintf( stderr, " offset_low=%08x,", req->offset_low );
655 fprintf( stderr, " offset_high=%08x,", req->offset_high );
656 fprintf( stderr, " count_low=%08x,", req->count_low );
657 fprintf( stderr, " count_high=%08x", req->count_high );
660 static void dump_unlock_file_request( const struct unlock_file_request *req )
662 fprintf( stderr, " handle=%d,", req->handle );
663 fprintf( stderr, " offset_low=%08x,", req->offset_low );
664 fprintf( stderr, " offset_high=%08x,", req->offset_high );
665 fprintf( stderr, " count_low=%08x,", req->count_low );
666 fprintf( stderr, " count_high=%08x", req->count_high );
669 static void dump_create_pipe_request( const struct create_pipe_request *req )
671 fprintf( stderr, " inherit=%d", req->inherit );
674 static void dump_create_pipe_reply( const struct create_pipe_request *req )
676 fprintf( stderr, " handle_read=%d,", req->handle_read );
677 fprintf( stderr, " handle_write=%d", req->handle_write );
680 static void dump_create_socket_request( const struct create_socket_request *req )
682 fprintf( stderr, " access=%08x,", req->access );
683 fprintf( stderr, " inherit=%d,", req->inherit );
684 fprintf( stderr, " family=%d,", req->family );
685 fprintf( stderr, " type=%d,", req->type );
686 fprintf( stderr, " protocol=%d", req->protocol );
689 static void dump_create_socket_reply( const struct create_socket_request *req )
691 fprintf( stderr, " handle=%d", req->handle );
694 static void dump_accept_socket_request( const struct accept_socket_request *req )
696 fprintf( stderr, " lhandle=%d,", req->lhandle );
697 fprintf( stderr, " access=%08x,", req->access );
698 fprintf( stderr, " inherit=%d", req->inherit );
701 static void dump_accept_socket_reply( const struct accept_socket_request *req )
703 fprintf( stderr, " handle=%d", req->handle );
706 static void dump_set_socket_event_request( const struct set_socket_event_request *req )
708 fprintf( stderr, " handle=%d,", req->handle );
709 fprintf( stderr, " mask=%08x,", req->mask );
710 fprintf( stderr, " event=%d", req->event );
713 static void dump_get_socket_event_request( const struct get_socket_event_request *req )
715 fprintf( stderr, " handle=%d,", req->handle );
716 fprintf( stderr, " service=%d,", req->service );
717 fprintf( stderr, " s_event=%d", req->s_event );
720 static void dump_get_socket_event_reply( const struct get_socket_event_request *req )
722 fprintf( stderr, " mask=%08x,", req->mask );
723 fprintf( stderr, " pmask=%08x,", req->pmask );
724 fprintf( stderr, " state=%08x,", req->state );
725 fprintf( stderr, " errors=" );
726 dump_varargs_get_socket_event_reply( req );
729 static void dump_enable_socket_event_request( const struct enable_socket_event_request *req )
731 fprintf( stderr, " handle=%d,", req->handle );
732 fprintf( stderr, " mask=%08x,", req->mask );
733 fprintf( stderr, " sstate=%08x,", req->sstate );
734 fprintf( stderr, " cstate=%08x", req->cstate );
737 static void dump_alloc_console_request( const struct alloc_console_request *req )
739 fprintf( stderr, " access=%08x,", req->access );
740 fprintf( stderr, " inherit=%d", req->inherit );
743 static void dump_alloc_console_reply( const struct alloc_console_request *req )
745 fprintf( stderr, " handle_in=%d,", req->handle_in );
746 fprintf( stderr, " handle_out=%d", req->handle_out );
749 static void dump_free_console_request( const struct free_console_request *req )
751 fprintf( stderr, " dummy=%d", req->dummy );
754 static void dump_open_console_request( const struct open_console_request *req )
756 fprintf( stderr, " output=%d,", req->output );
757 fprintf( stderr, " access=%08x,", req->access );
758 fprintf( stderr, " inherit=%d", req->inherit );
761 static void dump_open_console_reply( const struct open_console_request *req )
763 fprintf( stderr, " handle=%d", req->handle );
766 static void dump_set_console_fd_request( const struct set_console_fd_request *req )
768 fprintf( stderr, " handle=%d,", req->handle );
769 fprintf( stderr, " file_handle=%d,", req->file_handle );
770 fprintf( stderr, " pid=%d", req->pid );
773 static void dump_get_console_mode_request( const struct get_console_mode_request *req )
775 fprintf( stderr, " handle=%d", req->handle );
778 static void dump_get_console_mode_reply( const struct get_console_mode_request *req )
780 fprintf( stderr, " mode=%d", req->mode );
783 static void dump_set_console_mode_request( const struct set_console_mode_request *req )
785 fprintf( stderr, " handle=%d,", req->handle );
786 fprintf( stderr, " mode=%d", req->mode );
789 static void dump_set_console_info_request( const struct set_console_info_request *req )
791 fprintf( stderr, " handle=%d,", req->handle );
792 fprintf( stderr, " mask=%d,", req->mask );
793 fprintf( stderr, " cursor_size=%d,", req->cursor_size );
794 fprintf( stderr, " cursor_visible=%d,", req->cursor_visible );
795 fprintf( stderr, " title=\"%s\"", req->title );
798 static void dump_get_console_info_request( const struct get_console_info_request *req )
800 fprintf( stderr, " handle=%d", req->handle );
803 static void dump_get_console_info_reply( const struct get_console_info_request *req )
805 fprintf( stderr, " cursor_size=%d,", req->cursor_size );
806 fprintf( stderr, " cursor_visible=%d,", req->cursor_visible );
807 fprintf( stderr, " pid=%d,", req->pid );
808 fprintf( stderr, " title=\"%s\"", req->title );
811 static void dump_write_console_input_request( const struct write_console_input_request *req )
813 fprintf( stderr, " handle=%d,", req->handle );
814 fprintf( stderr, " count=%d", req->count );
817 static void dump_write_console_input_reply( const struct write_console_input_request *req )
819 fprintf( stderr, " written=%d", req->written );
822 static void dump_read_console_input_request( const struct read_console_input_request *req )
824 fprintf( stderr, " handle=%d,", req->handle );
825 fprintf( stderr, " count=%d,", req->count );
826 fprintf( stderr, " flush=%d", req->flush );
829 static void dump_read_console_input_reply( const struct read_console_input_request *req )
831 fprintf( stderr, " read=%d", req->read );
834 static void dump_create_change_notification_request( const struct create_change_notification_request *req )
836 fprintf( stderr, " subtree=%d,", req->subtree );
837 fprintf( stderr, " filter=%d", req->filter );
840 static void dump_create_change_notification_reply( const struct create_change_notification_request *req )
842 fprintf( stderr, " handle=%d", req->handle );
845 static void dump_create_mapping_request( const struct create_mapping_request *req )
847 fprintf( stderr, " size_high=%d,", req->size_high );
848 fprintf( stderr, " size_low=%d,", req->size_low );
849 fprintf( stderr, " protect=%d,", req->protect );
850 fprintf( stderr, " inherit=%d,", req->inherit );
851 fprintf( stderr, " file_handle=%d,", req->file_handle );
852 fprintf( stderr, " name=" );
853 dump_unicode_string( req->name );
856 static void dump_create_mapping_reply( const struct create_mapping_request *req )
858 fprintf( stderr, " handle=%d", req->handle );
861 static void dump_open_mapping_request( const struct open_mapping_request *req )
863 fprintf( stderr, " access=%08x,", req->access );
864 fprintf( stderr, " inherit=%d,", req->inherit );
865 fprintf( stderr, " name=" );
866 dump_unicode_string( req->name );
869 static void dump_open_mapping_reply( const struct open_mapping_request *req )
871 fprintf( stderr, " handle=%d", req->handle );
874 static void dump_get_mapping_info_request( const struct get_mapping_info_request *req )
876 fprintf( stderr, " handle=%d", req->handle );
879 static void dump_get_mapping_info_reply( const struct get_mapping_info_request *req )
881 fprintf( stderr, " size_high=%d,", req->size_high );
882 fprintf( stderr, " size_low=%d,", req->size_low );
883 fprintf( stderr, " protect=%d", req->protect );
886 static void dump_create_device_request( const struct create_device_request *req )
888 fprintf( stderr, " access=%08x,", req->access );
889 fprintf( stderr, " inherit=%d,", req->inherit );
890 fprintf( stderr, " id=%d", req->id );
893 static void dump_create_device_reply( const struct create_device_request *req )
895 fprintf( stderr, " handle=%d", req->handle );
898 static void dump_create_snapshot_request( const struct create_snapshot_request *req )
900 fprintf( stderr, " inherit=%d,", req->inherit );
901 fprintf( stderr, " flags=%d", req->flags );
904 static void dump_create_snapshot_reply( const struct create_snapshot_request *req )
906 fprintf( stderr, " handle=%d", req->handle );
909 static void dump_next_process_request( const struct next_process_request *req )
911 fprintf( stderr, " handle=%d,", req->handle );
912 fprintf( stderr, " reset=%d", req->reset );
915 static void dump_next_process_reply( const struct next_process_request *req )
917 fprintf( stderr, " pid=%p,", req->pid );
918 fprintf( stderr, " threads=%d,", req->threads );
919 fprintf( stderr, " priority=%d", req->priority );
922 static void dump_wait_debug_event_request( const struct wait_debug_event_request *req )
924 fprintf( stderr, " timeout=%d", req->timeout );
927 static void dump_wait_debug_event_reply( const struct wait_debug_event_request *req )
929 fprintf( stderr, " pid=%p,", req->pid );
930 fprintf( stderr, " tid=%p,", req->tid );
931 fprintf( stderr, " event=" );
932 dump_debug_event_t( &req->event );
935 static void dump_exception_event_request( const struct exception_event_request *req )
937 fprintf( stderr, " record=" );
938 dump_exc_record( &req->record );
939 fprintf( stderr, "," );
940 fprintf( stderr, " first=%d,", req->first );
941 fprintf( stderr, " context=" );
942 dump_context( &req->context );
945 static void dump_exception_event_reply( const struct exception_event_request *req )
947 fprintf( stderr, " status=%d", req->status );
950 static void dump_output_debug_string_request( const struct output_debug_string_request *req )
952 fprintf( stderr, " string=%p,", req->string );
953 fprintf( stderr, " unicode=%d,", req->unicode );
954 fprintf( stderr, " length=%d", req->length );
957 static void dump_continue_debug_event_request( const struct continue_debug_event_request *req )
959 fprintf( stderr, " pid=%p,", req->pid );
960 fprintf( stderr, " tid=%p,", req->tid );
961 fprintf( stderr, " status=%d", req->status );
964 static void dump_debug_process_request( const struct debug_process_request *req )
966 fprintf( stderr, " pid=%p", req->pid );
969 static void dump_read_process_memory_request( const struct read_process_memory_request *req )
971 fprintf( stderr, " handle=%d,", req->handle );
972 fprintf( stderr, " addr=%p,", req->addr );
973 fprintf( stderr, " len=%d", req->len );
976 static void dump_read_process_memory_reply( const struct read_process_memory_request *req )
978 fprintf( stderr, " data=" );
979 dump_varargs_read_process_memory_reply( req );
982 static void dump_write_process_memory_request( const struct write_process_memory_request *req )
984 fprintf( stderr, " handle=%d,", req->handle );
985 fprintf( stderr, " addr=%p,", req->addr );
986 fprintf( stderr, " len=%d,", req->len );
987 fprintf( stderr, " first_mask=%08x,", req->first_mask );
988 fprintf( stderr, " last_mask=%08x,", req->last_mask );
989 fprintf( stderr, " data=" );
990 dump_varargs_write_process_memory_request( req );
993 static void dump_create_key_request( const struct create_key_request *req )
995 fprintf( stderr, " parent=%d,", req->parent );
996 fprintf( stderr, " access=%08x,", req->access );
997 fprintf( stderr, " options=%08x,", req->options );
998 fprintf( stderr, " modif=%ld,", req->modif );
999 fprintf( stderr, " name=" );
1000 dump_path_t( &req->name );
1001 fprintf( stderr, "," );
1002 fprintf( stderr, " class=" );
1003 dump_unicode_string( req->class );
1006 static void dump_create_key_reply( const struct create_key_request *req )
1008 fprintf( stderr, " hkey=%d,", req->hkey );
1009 fprintf( stderr, " created=%d", req->created );
1012 static void dump_open_key_request( const struct open_key_request *req )
1014 fprintf( stderr, " parent=%d,", req->parent );
1015 fprintf( stderr, " access=%08x,", req->access );
1016 fprintf( stderr, " name=" );
1017 dump_path_t( &req->name );
1020 static void dump_open_key_reply( const struct open_key_request *req )
1022 fprintf( stderr, " hkey=%d", req->hkey );
1025 static void dump_delete_key_request( const struct delete_key_request *req )
1027 fprintf( stderr, " hkey=%d,", req->hkey );
1028 fprintf( stderr, " name=" );
1029 dump_path_t( &req->name );
1032 static void dump_close_key_request( const struct close_key_request *req )
1034 fprintf( stderr, " hkey=%d", req->hkey );
1037 static void dump_enum_key_request( const struct enum_key_request *req )
1039 fprintf( stderr, " hkey=%d,", req->hkey );
1040 fprintf( stderr, " index=%d", req->index );
1043 static void dump_enum_key_reply( const struct enum_key_request *req )
1045 fprintf( stderr, " modif=%ld,", req->modif );
1046 fprintf( stderr, " name=" );
1047 dump_path_t( &req->name );
1048 fprintf( stderr, "," );
1049 fprintf( stderr, " class=" );
1050 dump_unicode_string( req->class );
1053 static void dump_query_key_info_request( const struct query_key_info_request *req )
1055 fprintf( stderr, " hkey=%d", req->hkey );
1058 static void dump_query_key_info_reply( const struct query_key_info_request *req )
1060 fprintf( stderr, " subkeys=%d,", req->subkeys );
1061 fprintf( stderr, " max_subkey=%d,", req->max_subkey );
1062 fprintf( stderr, " max_class=%d,", req->max_class );
1063 fprintf( stderr, " values=%d,", req->values );
1064 fprintf( stderr, " max_value=%d,", req->max_value );
1065 fprintf( stderr, " max_data=%d,", req->max_data );
1066 fprintf( stderr, " modif=%ld,", req->modif );
1067 fprintf( stderr, " name=" );
1068 dump_path_t( &req->name );
1069 fprintf( stderr, "," );
1070 fprintf( stderr, " class=" );
1071 dump_unicode_string( req->class );
1074 static void dump_set_key_value_request( const struct set_key_value_request *req )
1076 fprintf( stderr, " hkey=%d,", req->hkey );
1077 fprintf( stderr, " type=%d,", req->type );
1078 fprintf( stderr, " len=%d,", req->len );
1079 fprintf( stderr, " name=" );
1080 dump_path_t( &req->name );
1081 fprintf( stderr, "," );
1082 fprintf( stderr, " data=" );
1083 dump_varargs_set_key_value_request( req );
1086 static void dump_get_key_value_request( const struct get_key_value_request *req )
1088 fprintf( stderr, " hkey=%d,", req->hkey );
1089 fprintf( stderr, " name=" );
1090 dump_unicode_string( req->name );
1093 static void dump_get_key_value_reply( const struct get_key_value_request *req )
1095 fprintf( stderr, " type=%d,", req->type );
1096 fprintf( stderr, " len=%d,", req->len );
1097 fprintf( stderr, " data=" );
1098 dump_varargs_get_key_value_reply( req );
1101 static void dump_enum_key_value_request( const struct enum_key_value_request *req )
1103 fprintf( stderr, " hkey=%d,", req->hkey );
1104 fprintf( stderr, " index=%d", req->index );
1107 static void dump_enum_key_value_reply( const struct enum_key_value_request *req )
1109 fprintf( stderr, " type=%d,", req->type );
1110 fprintf( stderr, " len=%d,", req->len );
1111 fprintf( stderr, " name=" );
1112 dump_path_t( &req->name );
1113 fprintf( stderr, "," );
1114 fprintf( stderr, " data=" );
1115 dump_varargs_enum_key_value_reply( req );
1118 static void dump_delete_key_value_request( const struct delete_key_value_request *req )
1120 fprintf( stderr, " hkey=%d,", req->hkey );
1121 fprintf( stderr, " name=" );
1122 dump_path_t( &req->name );
1125 static void dump_load_registry_request( const struct load_registry_request *req )
1127 fprintf( stderr, " hkey=%d,", req->hkey );
1128 fprintf( stderr, " file=%d,", req->file );
1129 fprintf( stderr, " name=" );
1130 dump_path_t( &req->name );
1133 static void dump_save_registry_request( const struct save_registry_request *req )
1135 fprintf( stderr, " hkey=%d,", req->hkey );
1136 fprintf( stderr, " file=%d", req->file );
1139 static void dump_set_registry_levels_request( const struct set_registry_levels_request *req )
1141 fprintf( stderr, " current=%d,", req->current );
1142 fprintf( stderr, " saving=%d,", req->saving );
1143 fprintf( stderr, " version=%d", req->version );
1146 static void dump_create_timer_request( const struct create_timer_request *req )
1148 fprintf( stderr, " inherit=%d,", req->inherit );
1149 fprintf( stderr, " manual=%d,", req->manual );
1150 fprintf( stderr, " name=" );
1151 dump_unicode_string( req->name );
1154 static void dump_create_timer_reply( const struct create_timer_request *req )
1156 fprintf( stderr, " handle=%d", req->handle );
1159 static void dump_open_timer_request( const struct open_timer_request *req )
1161 fprintf( stderr, " access=%08x,", req->access );
1162 fprintf( stderr, " inherit=%d,", req->inherit );
1163 fprintf( stderr, " name=" );
1164 dump_unicode_string( req->name );
1167 static void dump_open_timer_reply( const struct open_timer_request *req )
1169 fprintf( stderr, " handle=%d", req->handle );
1172 static void dump_set_timer_request( const struct set_timer_request *req )
1174 fprintf( stderr, " handle=%d,", req->handle );
1175 fprintf( stderr, " sec=%d,", req->sec );
1176 fprintf( stderr, " usec=%d,", req->usec );
1177 fprintf( stderr, " period=%d,", req->period );
1178 fprintf( stderr, " callback=%p,", req->callback );
1179 fprintf( stderr, " arg=%p", req->arg );
1182 static void dump_cancel_timer_request( const struct cancel_timer_request *req )
1184 fprintf( stderr, " handle=%d", req->handle );
1187 static void dump_get_thread_context_request( const struct get_thread_context_request *req )
1189 fprintf( stderr, " handle=%d,", req->handle );
1190 fprintf( stderr, " flags=%08x", req->flags );
1193 static void dump_get_thread_context_reply( const struct get_thread_context_request *req )
1195 fprintf( stderr, " context=" );
1196 dump_context( &req->context );
1199 static void dump_set_thread_context_request( const struct set_thread_context_request *req )
1201 fprintf( stderr, " handle=%d,", req->handle );
1202 fprintf( stderr, " flags=%08x,", req->flags );
1203 fprintf( stderr, " context=" );
1204 dump_context( &req->context );
1207 static void dump_get_selector_entry_request( const struct get_selector_entry_request *req )
1209 fprintf( stderr, " handle=%d,", req->handle );
1210 fprintf( stderr, " entry=%d", req->entry );
1213 static void dump_get_selector_entry_reply( const struct get_selector_entry_request *req )
1215 fprintf( stderr, " base=%08x,", req->base );
1216 fprintf( stderr, " limit=%08x,", req->limit );
1217 fprintf( stderr, " flags=%02x", req->flags );
1220 static void dump_add_atom_request( const struct add_atom_request *req )
1222 fprintf( stderr, " name=" );
1223 dump_unicode_string( req->name );
1226 static void dump_add_atom_reply( const struct add_atom_request *req )
1228 fprintf( stderr, " atom=%d", req->atom );
1231 static void dump_delete_atom_request( const struct delete_atom_request *req )
1233 fprintf( stderr, " atom=%d", req->atom );
1236 static void dump_find_atom_request( const struct find_atom_request *req )
1238 fprintf( stderr, " name=" );
1239 dump_unicode_string( req->name );
1242 static void dump_find_atom_reply( const struct find_atom_request *req )
1244 fprintf( stderr, " atom=%d", req->atom );
1247 static void dump_get_atom_name_request( const struct get_atom_name_request *req )
1249 fprintf( stderr, " atom=%d", req->atom );
1252 static void dump_get_atom_name_reply( const struct get_atom_name_request *req )
1254 fprintf( stderr, " count=%d,", req->count );
1255 fprintf( stderr, " name=" );
1256 dump_unicode_string( req->name );
1259 static const dump_func req_dumpers[REQ_NB_REQUESTS] = {
1260 (dump_func)dump_new_process_request,
1261 (dump_func)dump_new_thread_request,
1262 (dump_func)dump_boot_done_request,
1263 (dump_func)dump_init_process_request,
1264 (dump_func)dump_init_process_done_request,
1265 (dump_func)dump_init_thread_request,
1266 (dump_func)dump_get_thread_buffer_request,
1267 (dump_func)dump_terminate_process_request,
1268 (dump_func)dump_terminate_thread_request,
1269 (dump_func)dump_get_process_info_request,
1270 (dump_func)dump_set_process_info_request,
1271 (dump_func)dump_get_thread_info_request,
1272 (dump_func)dump_set_thread_info_request,
1273 (dump_func)dump_suspend_thread_request,
1274 (dump_func)dump_resume_thread_request,
1275 (dump_func)dump_load_dll_request,
1276 (dump_func)dump_unload_dll_request,
1277 (dump_func)dump_queue_apc_request,
1278 (dump_func)dump_get_apcs_request,
1279 (dump_func)dump_close_handle_request,
1280 (dump_func)dump_get_handle_info_request,
1281 (dump_func)dump_set_handle_info_request,
1282 (dump_func)dump_dup_handle_request,
1283 (dump_func)dump_open_process_request,
1284 (dump_func)dump_select_request,
1285 (dump_func)dump_create_event_request,
1286 (dump_func)dump_event_op_request,
1287 (dump_func)dump_open_event_request,
1288 (dump_func)dump_create_mutex_request,
1289 (dump_func)dump_release_mutex_request,
1290 (dump_func)dump_open_mutex_request,
1291 (dump_func)dump_create_semaphore_request,
1292 (dump_func)dump_release_semaphore_request,
1293 (dump_func)dump_open_semaphore_request,
1294 (dump_func)dump_create_file_request,
1295 (dump_func)dump_alloc_file_handle_request,
1296 (dump_func)dump_get_read_fd_request,
1297 (dump_func)dump_get_write_fd_request,
1298 (dump_func)dump_set_file_pointer_request,
1299 (dump_func)dump_truncate_file_request,
1300 (dump_func)dump_set_file_time_request,
1301 (dump_func)dump_flush_file_request,
1302 (dump_func)dump_get_file_info_request,
1303 (dump_func)dump_lock_file_request,
1304 (dump_func)dump_unlock_file_request,
1305 (dump_func)dump_create_pipe_request,
1306 (dump_func)dump_create_socket_request,
1307 (dump_func)dump_accept_socket_request,
1308 (dump_func)dump_set_socket_event_request,
1309 (dump_func)dump_get_socket_event_request,
1310 (dump_func)dump_enable_socket_event_request,
1311 (dump_func)dump_alloc_console_request,
1312 (dump_func)dump_free_console_request,
1313 (dump_func)dump_open_console_request,
1314 (dump_func)dump_set_console_fd_request,
1315 (dump_func)dump_get_console_mode_request,
1316 (dump_func)dump_set_console_mode_request,
1317 (dump_func)dump_set_console_info_request,
1318 (dump_func)dump_get_console_info_request,
1319 (dump_func)dump_write_console_input_request,
1320 (dump_func)dump_read_console_input_request,
1321 (dump_func)dump_create_change_notification_request,
1322 (dump_func)dump_create_mapping_request,
1323 (dump_func)dump_open_mapping_request,
1324 (dump_func)dump_get_mapping_info_request,
1325 (dump_func)dump_create_device_request,
1326 (dump_func)dump_create_snapshot_request,
1327 (dump_func)dump_next_process_request,
1328 (dump_func)dump_wait_debug_event_request,
1329 (dump_func)dump_exception_event_request,
1330 (dump_func)dump_output_debug_string_request,
1331 (dump_func)dump_continue_debug_event_request,
1332 (dump_func)dump_debug_process_request,
1333 (dump_func)dump_read_process_memory_request,
1334 (dump_func)dump_write_process_memory_request,
1335 (dump_func)dump_create_key_request,
1336 (dump_func)dump_open_key_request,
1337 (dump_func)dump_delete_key_request,
1338 (dump_func)dump_close_key_request,
1339 (dump_func)dump_enum_key_request,
1340 (dump_func)dump_query_key_info_request,
1341 (dump_func)dump_set_key_value_request,
1342 (dump_func)dump_get_key_value_request,
1343 (dump_func)dump_enum_key_value_request,
1344 (dump_func)dump_delete_key_value_request,
1345 (dump_func)dump_load_registry_request,
1346 (dump_func)dump_save_registry_request,
1347 (dump_func)dump_set_registry_levels_request,
1348 (dump_func)dump_create_timer_request,
1349 (dump_func)dump_open_timer_request,
1350 (dump_func)dump_set_timer_request,
1351 (dump_func)dump_cancel_timer_request,
1352 (dump_func)dump_get_thread_context_request,
1353 (dump_func)dump_set_thread_context_request,
1354 (dump_func)dump_get_selector_entry_request,
1355 (dump_func)dump_add_atom_request,
1356 (dump_func)dump_delete_atom_request,
1357 (dump_func)dump_find_atom_request,
1358 (dump_func)dump_get_atom_name_request,
1361 static const dump_func reply_dumpers[REQ_NB_REQUESTS] = {
1362 (dump_func)dump_new_process_reply,
1363 (dump_func)dump_new_thread_reply,
1365 (dump_func)dump_init_process_reply,
1366 (dump_func)dump_init_process_done_reply,
1368 (dump_func)dump_get_thread_buffer_reply,
1371 (dump_func)dump_get_process_info_reply,
1373 (dump_func)dump_get_thread_info_reply,
1375 (dump_func)dump_suspend_thread_reply,
1376 (dump_func)dump_resume_thread_reply,
1380 (dump_func)dump_get_apcs_reply,
1382 (dump_func)dump_get_handle_info_reply,
1384 (dump_func)dump_dup_handle_reply,
1385 (dump_func)dump_open_process_reply,
1386 (dump_func)dump_select_reply,
1387 (dump_func)dump_create_event_reply,
1389 (dump_func)dump_open_event_reply,
1390 (dump_func)dump_create_mutex_reply,
1392 (dump_func)dump_open_mutex_reply,
1393 (dump_func)dump_create_semaphore_reply,
1394 (dump_func)dump_release_semaphore_reply,
1395 (dump_func)dump_open_semaphore_reply,
1396 (dump_func)dump_create_file_reply,
1397 (dump_func)dump_alloc_file_handle_reply,
1400 (dump_func)dump_set_file_pointer_reply,
1404 (dump_func)dump_get_file_info_reply,
1407 (dump_func)dump_create_pipe_reply,
1408 (dump_func)dump_create_socket_reply,
1409 (dump_func)dump_accept_socket_reply,
1411 (dump_func)dump_get_socket_event_reply,
1413 (dump_func)dump_alloc_console_reply,
1415 (dump_func)dump_open_console_reply,
1417 (dump_func)dump_get_console_mode_reply,
1420 (dump_func)dump_get_console_info_reply,
1421 (dump_func)dump_write_console_input_reply,
1422 (dump_func)dump_read_console_input_reply,
1423 (dump_func)dump_create_change_notification_reply,
1424 (dump_func)dump_create_mapping_reply,
1425 (dump_func)dump_open_mapping_reply,
1426 (dump_func)dump_get_mapping_info_reply,
1427 (dump_func)dump_create_device_reply,
1428 (dump_func)dump_create_snapshot_reply,
1429 (dump_func)dump_next_process_reply,
1430 (dump_func)dump_wait_debug_event_reply,
1431 (dump_func)dump_exception_event_reply,
1435 (dump_func)dump_read_process_memory_reply,
1437 (dump_func)dump_create_key_reply,
1438 (dump_func)dump_open_key_reply,
1441 (dump_func)dump_enum_key_reply,
1442 (dump_func)dump_query_key_info_reply,
1444 (dump_func)dump_get_key_value_reply,
1445 (dump_func)dump_enum_key_value_reply,
1450 (dump_func)dump_create_timer_reply,
1451 (dump_func)dump_open_timer_reply,
1454 (dump_func)dump_get_thread_context_reply,
1456 (dump_func)dump_get_selector_entry_reply,
1457 (dump_func)dump_add_atom_reply,
1459 (dump_func)dump_find_atom_reply,
1460 (dump_func)dump_get_atom_name_reply,
1463 static const char * const req_names[REQ_NB_REQUESTS] = {
1468 "init_process_done",
1470 "get_thread_buffer",
1471 "terminate_process",
1496 "release_semaphore",
1499 "alloc_file_handle",
1514 "enable_socket_event",
1523 "write_console_input",
1524 "read_console_input",
1525 "create_change_notification",
1534 "output_debug_string",
1535 "continue_debug_event",
1537 "read_process_memory",
1538 "write_process_memory",
1551 "set_registry_levels",
1556 "get_thread_context",
1557 "set_thread_context",
1558 "get_selector_entry",
1565 /* ### make_requests end ### */
1566 /* Everything above this line is generated automatically by tools/make_requests */
1568 void trace_request( enum request req )
1570 current->last_req = req;
1571 if (req < REQ_NB_REQUESTS)
1573 fprintf( stderr, "%08x: %s(", (unsigned int)current, req_names[req] );
1574 req_dumpers[req]( current->buffer );
1577 fprintf( stderr, "%08x: %d(", (unsigned int)current, req );
1578 if (current->pass_fd != -1) fprintf( stderr, " ) fd=%d\n", current->pass_fd );
1579 else fprintf( stderr, " )\n" );
1582 void trace_reply( struct thread *thread )
1584 fprintf( stderr, "%08x: %s() = %x",
1585 (unsigned int)thread, req_names[thread->last_req], thread->error );
1586 if (reply_dumpers[thread->last_req])
1588 fprintf( stderr, " {" );
1589 reply_dumpers[thread->last_req]( thread->buffer );
1590 fprintf( stderr, " }" );
1592 if (thread->pass_fd != -1) fprintf( stderr, " fd=%d\n", thread->pass_fd );
1593 else fprintf( stderr, "\n" );