2 * Server request tracing
4 * Copyright (C) 1999 Alexandre Julliard
14 /* dumping for functions for requests that have a variable part */
16 static void dump_varargs_select( struct select_request *req )
19 for (i = 0; i < req->count; i++)
20 fprintf( stderr, "%c%d", i ? ',' : '{', req->handles[i] );
21 fprintf( stderr, "}" );
24 static void dump_varargs_get_apcs( struct get_apcs_request *req )
27 for (i = 0; i < 2 * req->count; i++)
28 fprintf( stderr, "%c%p", i ? ',' : '{', req->apcs[i] );
29 fprintf( stderr, "}" );
32 static void dump_varargs_get_socket_event( struct get_socket_event_request *req )
35 for (i = 0; i < FD_MAX_EVENTS; i++)
36 fprintf( stderr, "%c%d", i ? ',' : '{', req->errors[i] );
37 fprintf( stderr, "}" );
41 typedef void (*dump_func)( const void *req );
43 /* Everything below this line is generated automatically by tools/make_requests */
44 /* ### make_requests begin ### */
46 static void dump_new_process_request( struct new_process_request *req )
48 fprintf( stderr, " inherit=%d,", req->inherit );
49 fprintf( stderr, " inherit_all=%d,", req->inherit_all );
50 fprintf( stderr, " create_flags=%d,", req->create_flags );
51 fprintf( stderr, " start_flags=%d,", req->start_flags );
52 fprintf( stderr, " hstdin=%d,", req->hstdin );
53 fprintf( stderr, " hstdout=%d,", req->hstdout );
54 fprintf( stderr, " hstderr=%d,", req->hstderr );
55 fprintf( stderr, " cmd_show=%d,", req->cmd_show );
56 fprintf( stderr, " env_ptr=%p,", req->env_ptr );
57 fprintf( stderr, " cmdline=\"%s\"", req->cmdline );
60 static void dump_new_process_reply( struct new_process_request *req )
62 fprintf( stderr, " pid=%p,", req->pid );
63 fprintf( stderr, " handle=%d", req->handle );
66 static void dump_new_thread_request( struct new_thread_request *req )
68 fprintf( stderr, " pid=%p,", req->pid );
69 fprintf( stderr, " suspend=%d,", req->suspend );
70 fprintf( stderr, " inherit=%d", req->inherit );
73 static void dump_new_thread_reply( struct new_thread_request *req )
75 fprintf( stderr, " tid=%p,", req->tid );
76 fprintf( stderr, " handle=%d", req->handle );
79 static void dump_set_debug_request( struct set_debug_request *req )
81 fprintf( stderr, " level=%d", req->level );
84 static void dump_init_process_request( struct init_process_request *req )
88 static void dump_init_process_reply( struct init_process_request *req )
90 fprintf( stderr, " start_flags=%d,", req->start_flags );
91 fprintf( stderr, " hstdin=%d,", req->hstdin );
92 fprintf( stderr, " hstdout=%d,", req->hstdout );
93 fprintf( stderr, " hstderr=%d,", req->hstderr );
94 fprintf( stderr, " cmd_show=%d,", req->cmd_show );
95 fprintf( stderr, " env_ptr=%p,", req->env_ptr );
96 fprintf( stderr, " cmdline=\"%s\"", req->cmdline );
99 static void dump_init_thread_request( struct init_thread_request *req )
101 fprintf( stderr, " unix_pid=%d,", req->unix_pid );
102 fprintf( stderr, " teb=%p", req->teb );
105 static void dump_init_thread_reply( struct init_thread_request *req )
107 fprintf( stderr, " pid=%p,", req->pid );
108 fprintf( stderr, " tid=%p", req->tid );
111 static void dump_get_thread_buffer_request( struct get_thread_buffer_request *req )
113 fprintf( stderr, " dummy=%d", req->dummy );
116 static void dump_terminate_process_request( struct terminate_process_request *req )
118 fprintf( stderr, " handle=%d,", req->handle );
119 fprintf( stderr, " exit_code=%d", req->exit_code );
122 static void dump_terminate_thread_request( struct terminate_thread_request *req )
124 fprintf( stderr, " handle=%d,", req->handle );
125 fprintf( stderr, " exit_code=%d", req->exit_code );
128 static void dump_get_process_info_request( struct get_process_info_request *req )
130 fprintf( stderr, " handle=%d", req->handle );
133 static void dump_get_process_info_reply( struct get_process_info_request *req )
135 fprintf( stderr, " pid=%p,", req->pid );
136 fprintf( stderr, " exit_code=%d,", req->exit_code );
137 fprintf( stderr, " priority=%d,", req->priority );
138 fprintf( stderr, " process_affinity=%d,", req->process_affinity );
139 fprintf( stderr, " system_affinity=%d", req->system_affinity );
142 static void dump_set_process_info_request( struct set_process_info_request *req )
144 fprintf( stderr, " handle=%d,", req->handle );
145 fprintf( stderr, " mask=%d,", req->mask );
146 fprintf( stderr, " priority=%d,", req->priority );
147 fprintf( stderr, " affinity=%d", req->affinity );
150 static void dump_get_thread_info_request( struct get_thread_info_request *req )
152 fprintf( stderr, " handle=%d", req->handle );
155 static void dump_get_thread_info_reply( struct get_thread_info_request *req )
157 fprintf( stderr, " tid=%p,", req->tid );
158 fprintf( stderr, " exit_code=%d,", req->exit_code );
159 fprintf( stderr, " priority=%d", req->priority );
162 static void dump_set_thread_info_request( struct set_thread_info_request *req )
164 fprintf( stderr, " handle=%d,", req->handle );
165 fprintf( stderr, " mask=%d,", req->mask );
166 fprintf( stderr, " priority=%d,", req->priority );
167 fprintf( stderr, " affinity=%d", req->affinity );
170 static void dump_suspend_thread_request( struct suspend_thread_request *req )
172 fprintf( stderr, " handle=%d", req->handle );
175 static void dump_suspend_thread_reply( struct suspend_thread_request *req )
177 fprintf( stderr, " count=%d", req->count );
180 static void dump_resume_thread_request( struct resume_thread_request *req )
182 fprintf( stderr, " handle=%d", req->handle );
185 static void dump_resume_thread_reply( struct resume_thread_request *req )
187 fprintf( stderr, " count=%d", req->count );
190 static void dump_debugger_request( struct debugger_request *req )
192 fprintf( stderr, " op=%d", req->op );
195 static void dump_queue_apc_request( struct queue_apc_request *req )
197 fprintf( stderr, " handle=%d,", req->handle );
198 fprintf( stderr, " func=%p,", req->func );
199 fprintf( stderr, " param=%p", req->param );
202 static void dump_get_apcs_request( struct get_apcs_request *req )
206 static void dump_get_apcs_reply( struct get_apcs_request *req )
208 fprintf( stderr, " count=%d,", req->count );
209 fprintf( stderr, " apcs=" );
210 dump_varargs_get_apcs( req );
213 static void dump_close_handle_request( struct close_handle_request *req )
215 fprintf( stderr, " handle=%d", req->handle );
218 static void dump_get_handle_info_request( struct get_handle_info_request *req )
220 fprintf( stderr, " handle=%d", req->handle );
223 static void dump_get_handle_info_reply( struct get_handle_info_request *req )
225 fprintf( stderr, " flags=%d", req->flags );
228 static void dump_set_handle_info_request( struct set_handle_info_request *req )
230 fprintf( stderr, " handle=%d,", req->handle );
231 fprintf( stderr, " flags=%d,", req->flags );
232 fprintf( stderr, " mask=%d", req->mask );
235 static void dump_dup_handle_request( struct dup_handle_request *req )
237 fprintf( stderr, " src_process=%d,", req->src_process );
238 fprintf( stderr, " src_handle=%d,", req->src_handle );
239 fprintf( stderr, " dst_process=%d,", req->dst_process );
240 fprintf( stderr, " access=%08x,", req->access );
241 fprintf( stderr, " inherit=%d,", req->inherit );
242 fprintf( stderr, " options=%d", req->options );
245 static void dump_dup_handle_reply( struct dup_handle_request *req )
247 fprintf( stderr, " handle=%d", req->handle );
250 static void dump_open_process_request( struct open_process_request *req )
252 fprintf( stderr, " pid=%p,", req->pid );
253 fprintf( stderr, " access=%08x,", req->access );
254 fprintf( stderr, " inherit=%d", req->inherit );
257 static void dump_open_process_reply( struct open_process_request *req )
259 fprintf( stderr, " handle=%d", req->handle );
262 static void dump_select_request( struct select_request *req )
264 fprintf( stderr, " count=%d,", req->count );
265 fprintf( stderr, " flags=%d,", req->flags );
266 fprintf( stderr, " timeout=%d,", req->timeout );
267 fprintf( stderr, " handles=" );
268 dump_varargs_select( req );
271 static void dump_select_reply( struct select_request *req )
273 fprintf( stderr, " signaled=%d", req->signaled );
276 static void dump_create_event_request( struct create_event_request *req )
278 fprintf( stderr, " manual_reset=%d,", req->manual_reset );
279 fprintf( stderr, " initial_state=%d,", req->initial_state );
280 fprintf( stderr, " inherit=%d,", req->inherit );
281 fprintf( stderr, " name=\"%s\"", req->name );
284 static void dump_create_event_reply( struct create_event_request *req )
286 fprintf( stderr, " handle=%d", req->handle );
289 static void dump_event_op_request( struct event_op_request *req )
291 fprintf( stderr, " handle=%d,", req->handle );
292 fprintf( stderr, " op=%d", req->op );
295 static void dump_open_event_request( struct open_event_request *req )
297 fprintf( stderr, " access=%08x,", req->access );
298 fprintf( stderr, " inherit=%d,", req->inherit );
299 fprintf( stderr, " name=\"%s\"", req->name );
302 static void dump_open_event_reply( struct open_event_request *req )
304 fprintf( stderr, " handle=%d", req->handle );
307 static void dump_create_mutex_request( struct create_mutex_request *req )
309 fprintf( stderr, " owned=%d,", req->owned );
310 fprintf( stderr, " inherit=%d,", req->inherit );
311 fprintf( stderr, " name=\"%s\"", req->name );
314 static void dump_create_mutex_reply( struct create_mutex_request *req )
316 fprintf( stderr, " handle=%d", req->handle );
319 static void dump_release_mutex_request( struct release_mutex_request *req )
321 fprintf( stderr, " handle=%d", req->handle );
324 static void dump_open_mutex_request( struct open_mutex_request *req )
326 fprintf( stderr, " access=%08x,", req->access );
327 fprintf( stderr, " inherit=%d,", req->inherit );
328 fprintf( stderr, " name=\"%s\"", req->name );
331 static void dump_open_mutex_reply( struct open_mutex_request *req )
333 fprintf( stderr, " handle=%d", req->handle );
336 static void dump_create_semaphore_request( struct create_semaphore_request *req )
338 fprintf( stderr, " initial=%08x,", req->initial );
339 fprintf( stderr, " max=%08x,", req->max );
340 fprintf( stderr, " inherit=%d,", req->inherit );
341 fprintf( stderr, " name=\"%s\"", req->name );
344 static void dump_create_semaphore_reply( struct create_semaphore_request *req )
346 fprintf( stderr, " handle=%d", req->handle );
349 static void dump_release_semaphore_request( struct release_semaphore_request *req )
351 fprintf( stderr, " handle=%d,", req->handle );
352 fprintf( stderr, " count=%08x", req->count );
355 static void dump_release_semaphore_reply( struct release_semaphore_request *req )
357 fprintf( stderr, " prev_count=%08x", req->prev_count );
360 static void dump_open_semaphore_request( struct open_semaphore_request *req )
362 fprintf( stderr, " access=%08x,", req->access );
363 fprintf( stderr, " inherit=%d,", req->inherit );
364 fprintf( stderr, " name=\"%s\"", req->name );
367 static void dump_open_semaphore_reply( struct open_semaphore_request *req )
369 fprintf( stderr, " handle=%d", req->handle );
372 static void dump_create_file_request( struct create_file_request *req )
374 fprintf( stderr, " access=%08x,", req->access );
375 fprintf( stderr, " inherit=%d,", req->inherit );
376 fprintf( stderr, " sharing=%08x,", req->sharing );
377 fprintf( stderr, " create=%d,", req->create );
378 fprintf( stderr, " attrs=%08x,", req->attrs );
379 fprintf( stderr, " name=\"%s\"", req->name );
382 static void dump_create_file_reply( struct create_file_request *req )
384 fprintf( stderr, " handle=%d", req->handle );
387 static void dump_alloc_file_handle_request( struct alloc_file_handle_request *req )
389 fprintf( stderr, " access=%08x", req->access );
392 static void dump_alloc_file_handle_reply( struct alloc_file_handle_request *req )
394 fprintf( stderr, " handle=%d", req->handle );
397 static void dump_get_read_fd_request( struct get_read_fd_request *req )
399 fprintf( stderr, " handle=%d", req->handle );
402 static void dump_get_write_fd_request( struct get_write_fd_request *req )
404 fprintf( stderr, " handle=%d", req->handle );
407 static void dump_set_file_pointer_request( struct set_file_pointer_request *req )
409 fprintf( stderr, " handle=%d,", req->handle );
410 fprintf( stderr, " low=%d,", req->low );
411 fprintf( stderr, " high=%d,", req->high );
412 fprintf( stderr, " whence=%d", req->whence );
415 static void dump_set_file_pointer_reply( struct set_file_pointer_request *req )
417 fprintf( stderr, " new_low=%d,", req->new_low );
418 fprintf( stderr, " new_high=%d", req->new_high );
421 static void dump_truncate_file_request( struct truncate_file_request *req )
423 fprintf( stderr, " handle=%d", req->handle );
426 static void dump_set_file_time_request( struct set_file_time_request *req )
428 fprintf( stderr, " handle=%d,", req->handle );
429 fprintf( stderr, " access_time=%ld,", req->access_time );
430 fprintf( stderr, " write_time=%ld", req->write_time );
433 static void dump_flush_file_request( struct flush_file_request *req )
435 fprintf( stderr, " handle=%d", req->handle );
438 static void dump_get_file_info_request( struct get_file_info_request *req )
440 fprintf( stderr, " handle=%d", req->handle );
443 static void dump_get_file_info_reply( struct get_file_info_request *req )
445 fprintf( stderr, " type=%d,", req->type );
446 fprintf( stderr, " attr=%d,", req->attr );
447 fprintf( stderr, " access_time=%ld,", req->access_time );
448 fprintf( stderr, " write_time=%ld,", req->write_time );
449 fprintf( stderr, " size_high=%d,", req->size_high );
450 fprintf( stderr, " size_low=%d,", req->size_low );
451 fprintf( stderr, " links=%d,", req->links );
452 fprintf( stderr, " index_high=%d,", req->index_high );
453 fprintf( stderr, " index_low=%d,", req->index_low );
454 fprintf( stderr, " serial=%08x", req->serial );
457 static void dump_lock_file_request( struct lock_file_request *req )
459 fprintf( stderr, " handle=%d,", req->handle );
460 fprintf( stderr, " offset_low=%08x,", req->offset_low );
461 fprintf( stderr, " offset_high=%08x,", req->offset_high );
462 fprintf( stderr, " count_low=%08x,", req->count_low );
463 fprintf( stderr, " count_high=%08x", req->count_high );
466 static void dump_unlock_file_request( struct unlock_file_request *req )
468 fprintf( stderr, " handle=%d,", req->handle );
469 fprintf( stderr, " offset_low=%08x,", req->offset_low );
470 fprintf( stderr, " offset_high=%08x,", req->offset_high );
471 fprintf( stderr, " count_low=%08x,", req->count_low );
472 fprintf( stderr, " count_high=%08x", req->count_high );
475 static void dump_create_pipe_request( struct create_pipe_request *req )
477 fprintf( stderr, " inherit=%d", req->inherit );
480 static void dump_create_pipe_reply( struct create_pipe_request *req )
482 fprintf( stderr, " handle_read=%d,", req->handle_read );
483 fprintf( stderr, " handle_write=%d", req->handle_write );
486 static void dump_create_socket_request( struct create_socket_request *req )
488 fprintf( stderr, " access=%08x,", req->access );
489 fprintf( stderr, " inherit=%d,", req->inherit );
490 fprintf( stderr, " family=%d,", req->family );
491 fprintf( stderr, " type=%d,", req->type );
492 fprintf( stderr, " protocol=%d", req->protocol );
495 static void dump_create_socket_reply( struct create_socket_request *req )
497 fprintf( stderr, " handle=%d", req->handle );
500 static void dump_accept_socket_request( struct accept_socket_request *req )
502 fprintf( stderr, " lhandle=%d,", req->lhandle );
503 fprintf( stderr, " access=%08x,", req->access );
504 fprintf( stderr, " inherit=%d", req->inherit );
507 static void dump_accept_socket_reply( struct accept_socket_request *req )
509 fprintf( stderr, " handle=%d", req->handle );
512 static void dump_set_socket_event_request( struct set_socket_event_request *req )
514 fprintf( stderr, " handle=%d,", req->handle );
515 fprintf( stderr, " mask=%08x,", req->mask );
516 fprintf( stderr, " event=%d", req->event );
519 static void dump_get_socket_event_request( struct get_socket_event_request *req )
521 fprintf( stderr, " handle=%d,", req->handle );
522 fprintf( stderr, " service=%d,", req->service );
523 fprintf( stderr, " s_event=%d", req->s_event );
526 static void dump_get_socket_event_reply( struct get_socket_event_request *req )
528 fprintf( stderr, " mask=%08x,", req->mask );
529 fprintf( stderr, " pmask=%08x,", req->pmask );
530 fprintf( stderr, " state=%08x,", req->state );
531 fprintf( stderr, " errors=" );
532 dump_varargs_get_socket_event( req );
535 static void dump_enable_socket_event_request( struct enable_socket_event_request *req )
537 fprintf( stderr, " handle=%d,", req->handle );
538 fprintf( stderr, " mask=%08x,", req->mask );
539 fprintf( stderr, " sstate=%08x,", req->sstate );
540 fprintf( stderr, " cstate=%08x", req->cstate );
543 static void dump_alloc_console_request( struct alloc_console_request *req )
545 fprintf( stderr, " access=%08x,", req->access );
546 fprintf( stderr, " inherit=%d", req->inherit );
549 static void dump_alloc_console_reply( struct alloc_console_request *req )
551 fprintf( stderr, " handle_in=%d,", req->handle_in );
552 fprintf( stderr, " handle_out=%d", req->handle_out );
555 static void dump_free_console_request( struct free_console_request *req )
557 fprintf( stderr, " dummy=%d", req->dummy );
560 static void dump_open_console_request( struct open_console_request *req )
562 fprintf( stderr, " output=%d,", req->output );
563 fprintf( stderr, " access=%08x,", req->access );
564 fprintf( stderr, " inherit=%d", req->inherit );
567 static void dump_open_console_reply( struct open_console_request *req )
569 fprintf( stderr, " handle=%d", req->handle );
572 static void dump_set_console_fd_request( struct set_console_fd_request *req )
574 fprintf( stderr, " handle=%d,", req->handle );
575 fprintf( stderr, " file_handle=%d,", req->file_handle );
576 fprintf( stderr, " pid=%d", req->pid );
579 static void dump_get_console_mode_request( struct get_console_mode_request *req )
581 fprintf( stderr, " handle=%d", req->handle );
584 static void dump_get_console_mode_reply( struct get_console_mode_request *req )
586 fprintf( stderr, " mode=%d", req->mode );
589 static void dump_set_console_mode_request( struct set_console_mode_request *req )
591 fprintf( stderr, " handle=%d,", req->handle );
592 fprintf( stderr, " mode=%d", req->mode );
595 static void dump_set_console_info_request( struct set_console_info_request *req )
597 fprintf( stderr, " handle=%d,", req->handle );
598 fprintf( stderr, " mask=%d,", req->mask );
599 fprintf( stderr, " cursor_size=%d,", req->cursor_size );
600 fprintf( stderr, " cursor_visible=%d,", req->cursor_visible );
601 fprintf( stderr, " title=\"%s\"", req->title );
604 static void dump_get_console_info_request( struct get_console_info_request *req )
606 fprintf( stderr, " handle=%d", req->handle );
609 static void dump_get_console_info_reply( struct get_console_info_request *req )
611 fprintf( stderr, " cursor_size=%d,", req->cursor_size );
612 fprintf( stderr, " cursor_visible=%d,", req->cursor_visible );
613 fprintf( stderr, " pid=%d,", req->pid );
614 fprintf( stderr, " title=\"%s\"", req->title );
617 static void dump_write_console_input_request( struct write_console_input_request *req )
619 fprintf( stderr, " handle=%d,", req->handle );
620 fprintf( stderr, " count=%d", req->count );
623 static void dump_write_console_input_reply( struct write_console_input_request *req )
625 fprintf( stderr, " written=%d", req->written );
628 static void dump_read_console_input_request( struct read_console_input_request *req )
630 fprintf( stderr, " handle=%d,", req->handle );
631 fprintf( stderr, " count=%d,", req->count );
632 fprintf( stderr, " flush=%d", req->flush );
635 static void dump_read_console_input_reply( struct read_console_input_request *req )
637 fprintf( stderr, " read=%d", req->read );
640 static void dump_create_change_notification_request( struct create_change_notification_request *req )
642 fprintf( stderr, " subtree=%d,", req->subtree );
643 fprintf( stderr, " filter=%d", req->filter );
646 static void dump_create_change_notification_reply( struct create_change_notification_request *req )
648 fprintf( stderr, " handle=%d", req->handle );
651 static void dump_create_mapping_request( struct create_mapping_request *req )
653 fprintf( stderr, " size_high=%d,", req->size_high );
654 fprintf( stderr, " size_low=%d,", req->size_low );
655 fprintf( stderr, " protect=%d,", req->protect );
656 fprintf( stderr, " inherit=%d,", req->inherit );
657 fprintf( stderr, " file_handle=%d,", req->file_handle );
658 fprintf( stderr, " name=\"%s\"", req->name );
661 static void dump_create_mapping_reply( struct create_mapping_request *req )
663 fprintf( stderr, " handle=%d", req->handle );
666 static void dump_open_mapping_request( struct open_mapping_request *req )
668 fprintf( stderr, " access=%08x,", req->access );
669 fprintf( stderr, " inherit=%d,", req->inherit );
670 fprintf( stderr, " name=\"%s\"", req->name );
673 static void dump_open_mapping_reply( struct open_mapping_request *req )
675 fprintf( stderr, " handle=%d", req->handle );
678 static void dump_get_mapping_info_request( struct get_mapping_info_request *req )
680 fprintf( stderr, " handle=%d", req->handle );
683 static void dump_get_mapping_info_reply( struct get_mapping_info_request *req )
685 fprintf( stderr, " size_high=%d,", req->size_high );
686 fprintf( stderr, " size_low=%d,", req->size_low );
687 fprintf( stderr, " protect=%d", req->protect );
690 static void dump_create_device_request( struct create_device_request *req )
692 fprintf( stderr, " access=%08x,", req->access );
693 fprintf( stderr, " inherit=%d,", req->inherit );
694 fprintf( stderr, " id=%d", req->id );
697 static void dump_create_device_reply( struct create_device_request *req )
699 fprintf( stderr, " handle=%d", req->handle );
702 static void dump_create_snapshot_request( struct create_snapshot_request *req )
704 fprintf( stderr, " inherit=%d,", req->inherit );
705 fprintf( stderr, " flags=%d", req->flags );
708 static void dump_create_snapshot_reply( struct create_snapshot_request *req )
710 fprintf( stderr, " handle=%d", req->handle );
713 static void dump_next_process_request( struct next_process_request *req )
715 fprintf( stderr, " handle=%d,", req->handle );
716 fprintf( stderr, " reset=%d", req->reset );
719 static void dump_next_process_reply( struct next_process_request *req )
721 fprintf( stderr, " pid=%p,", req->pid );
722 fprintf( stderr, " threads=%d,", req->threads );
723 fprintf( stderr, " priority=%d", req->priority );
726 static void dump_wait_debug_event_request( struct wait_debug_event_request *req )
728 fprintf( stderr, " timeout=%d", req->timeout );
731 static void dump_wait_debug_event_reply( struct wait_debug_event_request *req )
733 fprintf( stderr, " code=%d,", req->code );
734 fprintf( stderr, " pid=%p,", req->pid );
735 fprintf( stderr, " tid=%p", req->tid );
738 static void dump_send_debug_event_request( struct send_debug_event_request *req )
740 fprintf( stderr, " code=%d", req->code );
743 static void dump_send_debug_event_reply( struct send_debug_event_request *req )
745 fprintf( stderr, " status=%d", req->status );
748 static void dump_continue_debug_event_request( struct continue_debug_event_request *req )
750 fprintf( stderr, " pid=%p,", req->pid );
751 fprintf( stderr, " tid=%p,", req->tid );
752 fprintf( stderr, " status=%d", req->status );
755 static void dump_debug_process_request( struct debug_process_request *req )
757 fprintf( stderr, " pid=%p", req->pid );
760 static const dump_func req_dumpers[REQ_NB_REQUESTS] = {
761 (dump_func)dump_new_process_request,
762 (dump_func)dump_new_thread_request,
763 (dump_func)dump_set_debug_request,
764 (dump_func)dump_init_process_request,
765 (dump_func)dump_init_thread_request,
766 (dump_func)dump_get_thread_buffer_request,
767 (dump_func)dump_terminate_process_request,
768 (dump_func)dump_terminate_thread_request,
769 (dump_func)dump_get_process_info_request,
770 (dump_func)dump_set_process_info_request,
771 (dump_func)dump_get_thread_info_request,
772 (dump_func)dump_set_thread_info_request,
773 (dump_func)dump_suspend_thread_request,
774 (dump_func)dump_resume_thread_request,
775 (dump_func)dump_debugger_request,
776 (dump_func)dump_queue_apc_request,
777 (dump_func)dump_get_apcs_request,
778 (dump_func)dump_close_handle_request,
779 (dump_func)dump_get_handle_info_request,
780 (dump_func)dump_set_handle_info_request,
781 (dump_func)dump_dup_handle_request,
782 (dump_func)dump_open_process_request,
783 (dump_func)dump_select_request,
784 (dump_func)dump_create_event_request,
785 (dump_func)dump_event_op_request,
786 (dump_func)dump_open_event_request,
787 (dump_func)dump_create_mutex_request,
788 (dump_func)dump_release_mutex_request,
789 (dump_func)dump_open_mutex_request,
790 (dump_func)dump_create_semaphore_request,
791 (dump_func)dump_release_semaphore_request,
792 (dump_func)dump_open_semaphore_request,
793 (dump_func)dump_create_file_request,
794 (dump_func)dump_alloc_file_handle_request,
795 (dump_func)dump_get_read_fd_request,
796 (dump_func)dump_get_write_fd_request,
797 (dump_func)dump_set_file_pointer_request,
798 (dump_func)dump_truncate_file_request,
799 (dump_func)dump_set_file_time_request,
800 (dump_func)dump_flush_file_request,
801 (dump_func)dump_get_file_info_request,
802 (dump_func)dump_lock_file_request,
803 (dump_func)dump_unlock_file_request,
804 (dump_func)dump_create_pipe_request,
805 (dump_func)dump_create_socket_request,
806 (dump_func)dump_accept_socket_request,
807 (dump_func)dump_set_socket_event_request,
808 (dump_func)dump_get_socket_event_request,
809 (dump_func)dump_enable_socket_event_request,
810 (dump_func)dump_alloc_console_request,
811 (dump_func)dump_free_console_request,
812 (dump_func)dump_open_console_request,
813 (dump_func)dump_set_console_fd_request,
814 (dump_func)dump_get_console_mode_request,
815 (dump_func)dump_set_console_mode_request,
816 (dump_func)dump_set_console_info_request,
817 (dump_func)dump_get_console_info_request,
818 (dump_func)dump_write_console_input_request,
819 (dump_func)dump_read_console_input_request,
820 (dump_func)dump_create_change_notification_request,
821 (dump_func)dump_create_mapping_request,
822 (dump_func)dump_open_mapping_request,
823 (dump_func)dump_get_mapping_info_request,
824 (dump_func)dump_create_device_request,
825 (dump_func)dump_create_snapshot_request,
826 (dump_func)dump_next_process_request,
827 (dump_func)dump_wait_debug_event_request,
828 (dump_func)dump_send_debug_event_request,
829 (dump_func)dump_continue_debug_event_request,
830 (dump_func)dump_debug_process_request,
833 static const dump_func reply_dumpers[REQ_NB_REQUESTS] = {
834 (dump_func)dump_new_process_reply,
835 (dump_func)dump_new_thread_reply,
837 (dump_func)dump_init_process_reply,
838 (dump_func)dump_init_thread_reply,
842 (dump_func)dump_get_process_info_reply,
844 (dump_func)dump_get_thread_info_reply,
846 (dump_func)dump_suspend_thread_reply,
847 (dump_func)dump_resume_thread_reply,
850 (dump_func)dump_get_apcs_reply,
852 (dump_func)dump_get_handle_info_reply,
854 (dump_func)dump_dup_handle_reply,
855 (dump_func)dump_open_process_reply,
856 (dump_func)dump_select_reply,
857 (dump_func)dump_create_event_reply,
859 (dump_func)dump_open_event_reply,
860 (dump_func)dump_create_mutex_reply,
862 (dump_func)dump_open_mutex_reply,
863 (dump_func)dump_create_semaphore_reply,
864 (dump_func)dump_release_semaphore_reply,
865 (dump_func)dump_open_semaphore_reply,
866 (dump_func)dump_create_file_reply,
867 (dump_func)dump_alloc_file_handle_reply,
870 (dump_func)dump_set_file_pointer_reply,
874 (dump_func)dump_get_file_info_reply,
877 (dump_func)dump_create_pipe_reply,
878 (dump_func)dump_create_socket_reply,
879 (dump_func)dump_accept_socket_reply,
881 (dump_func)dump_get_socket_event_reply,
883 (dump_func)dump_alloc_console_reply,
885 (dump_func)dump_open_console_reply,
887 (dump_func)dump_get_console_mode_reply,
890 (dump_func)dump_get_console_info_reply,
891 (dump_func)dump_write_console_input_reply,
892 (dump_func)dump_read_console_input_reply,
893 (dump_func)dump_create_change_notification_reply,
894 (dump_func)dump_create_mapping_reply,
895 (dump_func)dump_open_mapping_reply,
896 (dump_func)dump_get_mapping_info_reply,
897 (dump_func)dump_create_device_reply,
898 (dump_func)dump_create_snapshot_reply,
899 (dump_func)dump_next_process_reply,
900 (dump_func)dump_wait_debug_event_reply,
901 (dump_func)dump_send_debug_event_reply,
906 static const char * const req_names[REQ_NB_REQUESTS] = {
955 "enable_socket_event",
964 "write_console_input",
965 "read_console_input",
966 "create_change_notification",
975 "continue_debug_event",
979 /* ### make_requests end ### */
980 /* Everything above this line is generated automatically by tools/make_requests */
982 void trace_request( enum request req, int fd )
984 current->last_req = req;
985 if (req < REQ_NB_REQUESTS)
987 fprintf( stderr, "%08x: %s(", (unsigned int)current, req_names[req] );
988 req_dumpers[req]( current->buffer );
991 fprintf( stderr, "%08x: %d(", (unsigned int)current, req );
992 if (fd != -1) fprintf( stderr, " ) fd=%d\n", fd );
993 else fprintf( stderr, " )\n" );
996 void trace_timeout(void)
998 fprintf( stderr, "%08x: *timeout*\n", (unsigned int)current );
1001 void trace_kill( int exit_code )
1003 fprintf( stderr,"%08x: *killed* exit_code=%d\n",
1004 (unsigned int)current, exit_code );
1007 void trace_reply( struct thread *thread, unsigned int res, int pass_fd )
1009 fprintf( stderr, "%08x: %s() = %d",
1010 (unsigned int)thread, req_names[thread->last_req], res );
1011 if (reply_dumpers[thread->last_req])
1013 fprintf( stderr, " {" );
1014 reply_dumpers[thread->last_req]( thread->buffer );
1015 fprintf( stderr, " }" );
1017 if (pass_fd != -1) fprintf( stderr, " fd=%d\n", pass_fd );
1018 else fprintf( stderr, "\n" );