2 * Server request tracing
4 * Copyright (C) 1999 Alexandre Julliard
19 /* utility functions */
21 static void dump_uints( const int *ptr, int len )
26 fprintf( stderr, "%08x", *ptr++ );
27 if (--len) fputc( ',', stderr );
32 static void dump_bytes( const unsigned char *ptr, int len )
37 fprintf( stderr, "%02x", *ptr++ );
38 if (--len) fputc( ',', stderr );
43 static void dump_string( const void *req, const char *str )
45 int len = get_req_strlen( req, str );
46 fprintf( stderr, "\"%.*s\"", len, str );
49 static void dump_unicode_string( const void *req, const WCHAR *str )
51 size_t len = get_req_strlenW( req, str );
52 fprintf( stderr, "L\"" );
53 dump_strW( str, len, stderr, "\"\"" );
54 fputc( '\"', stderr );
57 static void dump_path_t( const void *req, const path_t *path )
59 dump_unicode_string( req, *path );
62 static void dump_exc_record( const EXCEPTION_RECORD *rec )
65 fprintf( stderr, "{code=%lx,flags=%lx,rec=%p,addr=%p,params={",
66 rec->ExceptionCode, rec->ExceptionFlags, rec->ExceptionRecord,
67 rec->ExceptionAddress );
68 for (i = 0; i < rec->NumberParameters; i++)
70 if (i) fputc( ',', stderr );
71 fprintf( stderr, "%lx", rec->ExceptionInformation[i] );
76 static void dump_varargs_ints( const void *ptr, size_t len )
78 const int *data = ptr;
84 fprintf( stderr, "%d", *data++ );
85 if (--len) fputc( ',', stderr );
90 static void dump_varargs_ptrs( const void *ptr, size_t len )
92 void * const *data = ptr;
98 fprintf( stderr, "%p", *data++ );
99 if (--len) fputc( ',', stderr );
101 fputc( '}', stderr );
104 static void dump_varargs_string( const void *ptr, size_t len )
106 fprintf( stderr, "\"%.*s\"", (int)len, (char *)ptr );
109 static void dump_varargs_unicode_str( const void *ptr, size_t len )
111 fprintf( stderr, "L\"" );
112 dump_strW( ptr, len / sizeof(WCHAR), stderr, "\"\"" );
113 fputc( '\"', stderr );
116 static void dump_varargs_context( const void *ptr, size_t len )
118 const CONTEXT *context = ptr;
120 fprintf( stderr, "{flags=%08lx,eax=%08lx,ebx=%08lx,ecx=%08lx,edx=%08lx,esi=%08lx,edi=%08lx,"
121 "ebp=%08lx,eip=%08lx,esp=%08lx,eflags=%08lx,cs=%04lx,ds=%04lx,es=%04lx,"
122 "fs=%04lx,gs=%04lx,dr0=%08lx,dr1=%08lx,dr2=%08lx,dr3=%08lx,dr6=%08lx,dr7=%08lx,",
123 context->ContextFlags, context->Eax, context->Ebx, context->Ecx, context->Edx,
124 context->Esi, context->Edi, context->Ebp, context->Eip, context->Esp, context->EFlags,
125 context->SegCs, context->SegDs, context->SegEs, context->SegFs, context->SegGs,
126 context->Dr0, context->Dr1, context->Dr2, context->Dr3, context->Dr6, context->Dr7 );
127 fprintf( stderr, "float=" );
128 dump_uints( (int *)&context->FloatSave, sizeof(context->FloatSave) / sizeof(int) );
129 fprintf( stderr, "}" );
131 dump_uints( (int *)context, sizeof(*context) / sizeof(int) );
135 static void dump_varargs_exc_event( const void *ptr, size_t len )
137 fprintf( stderr, "{context=" );
138 dump_varargs_context( ptr, sizeof(CONTEXT) );
139 fprintf( stderr, ",rec=" );
140 dump_exc_record( (EXCEPTION_RECORD *)((CONTEXT *)ptr + 1) );
141 fputc( '}', stderr );
144 static void dump_varargs_debug_event( const void *ptr, size_t len )
146 const debug_event_t *event = ptr;
150 fprintf( stderr, "{}" );
155 case EXCEPTION_DEBUG_EVENT:
156 fprintf( stderr, "{exception," );
157 dump_exc_record( &event->info.exception.record );
158 fprintf( stderr, ",first=%d}", event->info.exception.first );
160 case CREATE_THREAD_DEBUG_EVENT:
161 fprintf( stderr, "{create_thread,thread=%d,teb=%p,start=%p}",
162 event->info.create_thread.handle, event->info.create_thread.teb,
163 event->info.create_thread.start );
165 case CREATE_PROCESS_DEBUG_EVENT:
166 fprintf( stderr, "{create_process,file=%d,process=%d,thread=%d,base=%p,offset=%d,"
167 "size=%d,teb=%p,start=%p,name=%p,unicode=%d}",
168 event->info.create_process.file, event->info.create_process.process,
169 event->info.create_process.thread, event->info.create_process.base,
170 event->info.create_process.dbg_offset, event->info.create_process.dbg_size,
171 event->info.create_process.teb, event->info.create_process.start,
172 event->info.create_process.name, event->info.create_process.unicode );
174 case EXIT_THREAD_DEBUG_EVENT:
175 fprintf( stderr, "{exit_thread,code=%d}", event->info.exit.exit_code );
177 case EXIT_PROCESS_DEBUG_EVENT:
178 fprintf( stderr, "{exit_process,code=%d}", event->info.exit.exit_code );
180 case LOAD_DLL_DEBUG_EVENT:
181 fprintf( stderr, "{load_dll,file=%d,base=%p,offset=%d,size=%d,name=%p,unicode=%d}",
182 event->info.load_dll.handle, event->info.load_dll.base,
183 event->info.load_dll.dbg_offset, event->info.load_dll.dbg_size,
184 event->info.load_dll.name, event->info.load_dll.unicode );
186 case UNLOAD_DLL_DEBUG_EVENT:
187 fprintf( stderr, "{unload_dll,base=%p}", event->info.unload_dll.base );
189 case OUTPUT_DEBUG_STRING_EVENT:
190 fprintf( stderr, "{output_string,data=%p,unicode=%d,len=%d}",
191 event->info.output_string.string, event->info.output_string.unicode,
192 event->info.output_string.length );
195 fprintf( stderr, "{rip,err=%d,type=%d}",
196 event->info.rip_info.error, event->info.rip_info.type );
198 case 0: /* zero is the code returned on timeouts */
199 fprintf( stderr, "{}" );
202 fprintf( stderr, "{code=??? (%d)}", event->code );
207 static void dump_varargs_input_records( const void *ptr, size_t len )
209 const INPUT_RECORD *rec = ptr;
212 fputc( '{', stderr );
215 fprintf( stderr, "{%04x,...}", rec->EventType );
217 if (--len) fputc( ',', stderr );
219 fputc( '}', stderr );
222 /* dumping for functions for requests that have a variable part */
224 static void dump_varargs_read_process_memory_reply( const struct read_process_memory_request *req )
226 int count = min( req->len, get_req_size( req, req->data, sizeof(int) ));
227 dump_bytes( (unsigned char *)req->data, count * sizeof(int) );
230 static void dump_varargs_write_process_memory_request( const struct write_process_memory_request *req )
232 int count = min( req->len, get_req_size( req, req->data, sizeof(int) ));
233 dump_bytes( (unsigned char *)req->data, count * sizeof(int) );
236 static void dump_varargs_set_key_value_request( const struct set_key_value_request *req )
238 int count = min( req->len, get_req_size( req, req->data, 1 ));
239 dump_bytes( req->data, count );
242 static void dump_varargs_get_key_value_reply( const struct get_key_value_request *req )
244 int count = min( req->len - req->offset, get_req_size( req, req->data, 1 ));
245 dump_bytes( req->data, count );
248 static void dump_varargs_enum_key_value_reply( const struct enum_key_value_request *req )
250 int count = min( req->len - req->offset, get_req_size( req, req->data, 1 ));
251 dump_bytes( req->data, count );
254 typedef void (*dump_func)( const void *req );
256 /* Everything below this line is generated automatically by tools/make_requests */
257 /* ### make_requests begin ### */
259 static void dump_new_process_request( const struct new_process_request *req )
261 fprintf( stderr, " inherit_all=%d,", req->inherit_all );
262 fprintf( stderr, " create_flags=%d,", req->create_flags );
263 fprintf( stderr, " start_flags=%d,", req->start_flags );
264 fprintf( stderr, " exe_file=%d,", req->exe_file );
265 fprintf( stderr, " hstdin=%d,", req->hstdin );
266 fprintf( stderr, " hstdout=%d,", req->hstdout );
267 fprintf( stderr, " hstderr=%d,", req->hstderr );
268 fprintf( stderr, " cmd_show=%d,", req->cmd_show );
269 fprintf( stderr, " alloc_fd=%d,", req->alloc_fd );
270 fprintf( stderr, " filename=" );
271 dump_varargs_string( get_req_data(req), get_req_data_size(req) );
274 static void dump_wait_process_request( const struct wait_process_request *req )
276 fprintf( stderr, " pinherit=%d,", req->pinherit );
277 fprintf( stderr, " tinherit=%d,", req->tinherit );
278 fprintf( stderr, " timeout=%d,", req->timeout );
279 fprintf( stderr, " cancel=%d", req->cancel );
282 static void dump_wait_process_reply( const struct wait_process_request *req )
284 fprintf( stderr, " pid=%p,", req->pid );
285 fprintf( stderr, " phandle=%d,", req->phandle );
286 fprintf( stderr, " tid=%p,", req->tid );
287 fprintf( stderr, " thandle=%d,", req->thandle );
288 fprintf( stderr, " event=%d", req->event );
291 static void dump_new_thread_request( const struct new_thread_request *req )
293 fprintf( stderr, " suspend=%d,", req->suspend );
294 fprintf( stderr, " inherit=%d", req->inherit );
297 static void dump_new_thread_reply( const struct new_thread_request *req )
299 fprintf( stderr, " tid=%p,", req->tid );
300 fprintf( stderr, " handle=%d", req->handle );
303 static void dump_boot_done_request( const struct boot_done_request *req )
305 fprintf( stderr, " debug_level=%d", req->debug_level );
308 static void dump_init_process_request( const struct init_process_request *req )
310 fprintf( stderr, " ldt_copy=%p,", req->ldt_copy );
311 fprintf( stderr, " ldt_flags=%p,", req->ldt_flags );
312 fprintf( stderr, " ppid=%d", req->ppid );
315 static void dump_init_process_reply( const struct init_process_request *req )
317 fprintf( stderr, " start_flags=%d,", req->start_flags );
318 fprintf( stderr, " exe_file=%d,", req->exe_file );
319 fprintf( stderr, " hstdin=%d,", req->hstdin );
320 fprintf( stderr, " hstdout=%d,", req->hstdout );
321 fprintf( stderr, " hstderr=%d,", req->hstderr );
322 fprintf( stderr, " cmd_show=%d,", req->cmd_show );
323 fprintf( stderr, " filename=" );
324 dump_varargs_string( get_req_data(req), get_req_data_size(req) );
327 static void dump_init_process_done_request( const struct init_process_done_request *req )
329 fprintf( stderr, " module=%p,", req->module );
330 fprintf( stderr, " entry=%p,", req->entry );
331 fprintf( stderr, " name=%p,", req->name );
332 fprintf( stderr, " gui=%d", req->gui );
335 static void dump_init_process_done_reply( const struct init_process_done_request *req )
337 fprintf( stderr, " debugged=%d", req->debugged );
340 static void dump_init_thread_request( const struct init_thread_request *req )
342 fprintf( stderr, " unix_pid=%d,", req->unix_pid );
343 fprintf( stderr, " teb=%p,", req->teb );
344 fprintf( stderr, " entry=%p", req->entry );
347 static void dump_get_thread_buffer_request( const struct get_thread_buffer_request *req )
351 static void dump_get_thread_buffer_reply( const struct get_thread_buffer_request *req )
353 fprintf( stderr, " pid=%p,", req->pid );
354 fprintf( stderr, " tid=%p,", req->tid );
355 fprintf( stderr, " boot=%d,", req->boot );
356 fprintf( stderr, " version=%d", req->version );
359 static void dump_terminate_process_request( const struct terminate_process_request *req )
361 fprintf( stderr, " handle=%d,", req->handle );
362 fprintf( stderr, " exit_code=%d", req->exit_code );
365 static void dump_terminate_process_reply( const struct terminate_process_request *req )
367 fprintf( stderr, " self=%d", req->self );
370 static void dump_terminate_thread_request( const struct terminate_thread_request *req )
372 fprintf( stderr, " handle=%d,", req->handle );
373 fprintf( stderr, " exit_code=%d", req->exit_code );
376 static void dump_terminate_thread_reply( const struct terminate_thread_request *req )
378 fprintf( stderr, " self=%d,", req->self );
379 fprintf( stderr, " last=%d", req->last );
382 static void dump_get_process_info_request( const struct get_process_info_request *req )
384 fprintf( stderr, " handle=%d", req->handle );
387 static void dump_get_process_info_reply( const struct get_process_info_request *req )
389 fprintf( stderr, " pid=%p,", req->pid );
390 fprintf( stderr, " debugged=%d,", req->debugged );
391 fprintf( stderr, " exit_code=%d,", req->exit_code );
392 fprintf( stderr, " priority=%d,", req->priority );
393 fprintf( stderr, " process_affinity=%d,", req->process_affinity );
394 fprintf( stderr, " system_affinity=%d", req->system_affinity );
397 static void dump_set_process_info_request( const struct set_process_info_request *req )
399 fprintf( stderr, " handle=%d,", req->handle );
400 fprintf( stderr, " mask=%d,", req->mask );
401 fprintf( stderr, " priority=%d,", req->priority );
402 fprintf( stderr, " affinity=%d", req->affinity );
405 static void dump_get_thread_info_request( const struct get_thread_info_request *req )
407 fprintf( stderr, " handle=%d,", req->handle );
408 fprintf( stderr, " tid_in=%p", req->tid_in );
411 static void dump_get_thread_info_reply( const struct get_thread_info_request *req )
413 fprintf( stderr, " tid=%p,", req->tid );
414 fprintf( stderr, " teb=%p,", req->teb );
415 fprintf( stderr, " exit_code=%d,", req->exit_code );
416 fprintf( stderr, " priority=%d", req->priority );
419 static void dump_set_thread_info_request( const struct set_thread_info_request *req )
421 fprintf( stderr, " handle=%d,", req->handle );
422 fprintf( stderr, " mask=%d,", req->mask );
423 fprintf( stderr, " priority=%d,", req->priority );
424 fprintf( stderr, " affinity=%d", req->affinity );
427 static void dump_suspend_thread_request( const struct suspend_thread_request *req )
429 fprintf( stderr, " handle=%d", req->handle );
432 static void dump_suspend_thread_reply( const struct suspend_thread_request *req )
434 fprintf( stderr, " count=%d", req->count );
437 static void dump_resume_thread_request( const struct resume_thread_request *req )
439 fprintf( stderr, " handle=%d", req->handle );
442 static void dump_resume_thread_reply( const struct resume_thread_request *req )
444 fprintf( stderr, " count=%d", req->count );
447 static void dump_load_dll_request( const struct load_dll_request *req )
449 fprintf( stderr, " handle=%d,", req->handle );
450 fprintf( stderr, " base=%p,", req->base );
451 fprintf( stderr, " dbg_offset=%d,", req->dbg_offset );
452 fprintf( stderr, " dbg_size=%d,", req->dbg_size );
453 fprintf( stderr, " name=%p", req->name );
456 static void dump_unload_dll_request( const struct unload_dll_request *req )
458 fprintf( stderr, " base=%p", req->base );
461 static void dump_queue_apc_request( const struct queue_apc_request *req )
463 fprintf( stderr, " handle=%d,", req->handle );
464 fprintf( stderr, " func=%p,", req->func );
465 fprintf( stderr, " param=%p", req->param );
468 static void dump_get_apc_request( const struct get_apc_request *req )
472 static void dump_get_apc_reply( const struct get_apc_request *req )
474 fprintf( stderr, " func=%p,", req->func );
475 fprintf( stderr, " type=%d,", req->type );
476 fprintf( stderr, " args=" );
477 dump_varargs_ptrs( get_req_data(req), get_req_data_size(req) );
480 static void dump_close_handle_request( const struct close_handle_request *req )
482 fprintf( stderr, " handle=%d", req->handle );
485 static void dump_get_handle_info_request( const struct get_handle_info_request *req )
487 fprintf( stderr, " handle=%d", req->handle );
490 static void dump_get_handle_info_reply( const struct get_handle_info_request *req )
492 fprintf( stderr, " flags=%d", req->flags );
495 static void dump_set_handle_info_request( const struct set_handle_info_request *req )
497 fprintf( stderr, " handle=%d,", req->handle );
498 fprintf( stderr, " flags=%d,", req->flags );
499 fprintf( stderr, " mask=%d", req->mask );
502 static void dump_dup_handle_request( const struct dup_handle_request *req )
504 fprintf( stderr, " src_process=%d,", req->src_process );
505 fprintf( stderr, " src_handle=%d,", req->src_handle );
506 fprintf( stderr, " dst_process=%d,", req->dst_process );
507 fprintf( stderr, " access=%08x,", req->access );
508 fprintf( stderr, " inherit=%d,", req->inherit );
509 fprintf( stderr, " options=%d", req->options );
512 static void dump_dup_handle_reply( const struct dup_handle_request *req )
514 fprintf( stderr, " handle=%d", req->handle );
517 static void dump_open_process_request( const struct open_process_request *req )
519 fprintf( stderr, " pid=%p,", req->pid );
520 fprintf( stderr, " access=%08x,", req->access );
521 fprintf( stderr, " inherit=%d", req->inherit );
524 static void dump_open_process_reply( const struct open_process_request *req )
526 fprintf( stderr, " handle=%d", req->handle );
529 static void dump_select_request( const struct select_request *req )
531 fprintf( stderr, " flags=%d,", req->flags );
532 fprintf( stderr, " timeout=%d,", req->timeout );
533 fprintf( stderr, " handles=" );
534 dump_varargs_ints( get_req_data(req), get_req_data_size(req) );
537 static void dump_select_reply( const struct select_request *req )
539 fprintf( stderr, " signaled=%d", req->signaled );
542 static void dump_create_event_request( const struct create_event_request *req )
544 fprintf( stderr, " manual_reset=%d,", req->manual_reset );
545 fprintf( stderr, " initial_state=%d,", req->initial_state );
546 fprintf( stderr, " inherit=%d,", req->inherit );
547 fprintf( stderr, " name=" );
548 dump_varargs_unicode_str( get_req_data(req), get_req_data_size(req) );
551 static void dump_create_event_reply( const struct create_event_request *req )
553 fprintf( stderr, " handle=%d", req->handle );
556 static void dump_event_op_request( const struct event_op_request *req )
558 fprintf( stderr, " handle=%d,", req->handle );
559 fprintf( stderr, " op=%d", req->op );
562 static void dump_open_event_request( const struct open_event_request *req )
564 fprintf( stderr, " access=%08x,", req->access );
565 fprintf( stderr, " inherit=%d,", req->inherit );
566 fprintf( stderr, " name=" );
567 dump_varargs_unicode_str( get_req_data(req), get_req_data_size(req) );
570 static void dump_open_event_reply( const struct open_event_request *req )
572 fprintf( stderr, " handle=%d", req->handle );
575 static void dump_create_mutex_request( const struct create_mutex_request *req )
577 fprintf( stderr, " owned=%d,", req->owned );
578 fprintf( stderr, " inherit=%d,", req->inherit );
579 fprintf( stderr, " name=" );
580 dump_varargs_unicode_str( get_req_data(req), get_req_data_size(req) );
583 static void dump_create_mutex_reply( const struct create_mutex_request *req )
585 fprintf( stderr, " handle=%d", req->handle );
588 static void dump_release_mutex_request( const struct release_mutex_request *req )
590 fprintf( stderr, " handle=%d", req->handle );
593 static void dump_open_mutex_request( const struct open_mutex_request *req )
595 fprintf( stderr, " access=%08x,", req->access );
596 fprintf( stderr, " inherit=%d,", req->inherit );
597 fprintf( stderr, " name=" );
598 dump_varargs_unicode_str( get_req_data(req), get_req_data_size(req) );
601 static void dump_open_mutex_reply( const struct open_mutex_request *req )
603 fprintf( stderr, " handle=%d", req->handle );
606 static void dump_create_semaphore_request( const struct create_semaphore_request *req )
608 fprintf( stderr, " initial=%08x,", req->initial );
609 fprintf( stderr, " max=%08x,", req->max );
610 fprintf( stderr, " inherit=%d,", req->inherit );
611 fprintf( stderr, " name=" );
612 dump_varargs_unicode_str( get_req_data(req), get_req_data_size(req) );
615 static void dump_create_semaphore_reply( const struct create_semaphore_request *req )
617 fprintf( stderr, " handle=%d", req->handle );
620 static void dump_release_semaphore_request( const struct release_semaphore_request *req )
622 fprintf( stderr, " handle=%d,", req->handle );
623 fprintf( stderr, " count=%08x", req->count );
626 static void dump_release_semaphore_reply( const struct release_semaphore_request *req )
628 fprintf( stderr, " prev_count=%08x", req->prev_count );
631 static void dump_open_semaphore_request( const struct open_semaphore_request *req )
633 fprintf( stderr, " access=%08x,", req->access );
634 fprintf( stderr, " inherit=%d,", req->inherit );
635 fprintf( stderr, " name=" );
636 dump_varargs_unicode_str( get_req_data(req), get_req_data_size(req) );
639 static void dump_open_semaphore_reply( const struct open_semaphore_request *req )
641 fprintf( stderr, " handle=%d", req->handle );
644 static void dump_create_file_request( const struct create_file_request *req )
646 fprintf( stderr, " access=%08x,", req->access );
647 fprintf( stderr, " inherit=%d,", req->inherit );
648 fprintf( stderr, " sharing=%08x,", req->sharing );
649 fprintf( stderr, " create=%d,", req->create );
650 fprintf( stderr, " attrs=%08x,", req->attrs );
651 fprintf( stderr, " filename=" );
652 dump_varargs_string( get_req_data(req), get_req_data_size(req) );
655 static void dump_create_file_reply( const struct create_file_request *req )
657 fprintf( stderr, " handle=%d", req->handle );
660 static void dump_alloc_file_handle_request( const struct alloc_file_handle_request *req )
662 fprintf( stderr, " access=%08x", req->access );
665 static void dump_alloc_file_handle_reply( const struct alloc_file_handle_request *req )
667 fprintf( stderr, " handle=%d", req->handle );
670 static void dump_get_read_fd_request( const struct get_read_fd_request *req )
672 fprintf( stderr, " handle=%d", req->handle );
675 static void dump_get_write_fd_request( const struct get_write_fd_request *req )
677 fprintf( stderr, " handle=%d", req->handle );
680 static void dump_set_file_pointer_request( const struct set_file_pointer_request *req )
682 fprintf( stderr, " handle=%d,", req->handle );
683 fprintf( stderr, " low=%d,", req->low );
684 fprintf( stderr, " high=%d,", req->high );
685 fprintf( stderr, " whence=%d", req->whence );
688 static void dump_set_file_pointer_reply( const struct set_file_pointer_request *req )
690 fprintf( stderr, " new_low=%d,", req->new_low );
691 fprintf( stderr, " new_high=%d", req->new_high );
694 static void dump_truncate_file_request( const struct truncate_file_request *req )
696 fprintf( stderr, " handle=%d", req->handle );
699 static void dump_set_file_time_request( const struct set_file_time_request *req )
701 fprintf( stderr, " handle=%d,", req->handle );
702 fprintf( stderr, " access_time=%ld,", req->access_time );
703 fprintf( stderr, " write_time=%ld", req->write_time );
706 static void dump_flush_file_request( const struct flush_file_request *req )
708 fprintf( stderr, " handle=%d", req->handle );
711 static void dump_get_file_info_request( const struct get_file_info_request *req )
713 fprintf( stderr, " handle=%d", req->handle );
716 static void dump_get_file_info_reply( const struct get_file_info_request *req )
718 fprintf( stderr, " type=%d,", req->type );
719 fprintf( stderr, " attr=%d,", req->attr );
720 fprintf( stderr, " access_time=%ld,", req->access_time );
721 fprintf( stderr, " write_time=%ld,", req->write_time );
722 fprintf( stderr, " size_high=%d,", req->size_high );
723 fprintf( stderr, " size_low=%d,", req->size_low );
724 fprintf( stderr, " links=%d,", req->links );
725 fprintf( stderr, " index_high=%d,", req->index_high );
726 fprintf( stderr, " index_low=%d,", req->index_low );
727 fprintf( stderr, " serial=%08x", req->serial );
730 static void dump_lock_file_request( const struct lock_file_request *req )
732 fprintf( stderr, " handle=%d,", req->handle );
733 fprintf( stderr, " offset_low=%08x,", req->offset_low );
734 fprintf( stderr, " offset_high=%08x,", req->offset_high );
735 fprintf( stderr, " count_low=%08x,", req->count_low );
736 fprintf( stderr, " count_high=%08x", req->count_high );
739 static void dump_unlock_file_request( const struct unlock_file_request *req )
741 fprintf( stderr, " handle=%d,", req->handle );
742 fprintf( stderr, " offset_low=%08x,", req->offset_low );
743 fprintf( stderr, " offset_high=%08x,", req->offset_high );
744 fprintf( stderr, " count_low=%08x,", req->count_low );
745 fprintf( stderr, " count_high=%08x", req->count_high );
748 static void dump_create_pipe_request( const struct create_pipe_request *req )
750 fprintf( stderr, " inherit=%d", req->inherit );
753 static void dump_create_pipe_reply( const struct create_pipe_request *req )
755 fprintf( stderr, " handle_read=%d,", req->handle_read );
756 fprintf( stderr, " handle_write=%d", req->handle_write );
759 static void dump_create_socket_request( const struct create_socket_request *req )
761 fprintf( stderr, " access=%08x,", req->access );
762 fprintf( stderr, " inherit=%d,", req->inherit );
763 fprintf( stderr, " family=%d,", req->family );
764 fprintf( stderr, " type=%d,", req->type );
765 fprintf( stderr, " protocol=%d", req->protocol );
768 static void dump_create_socket_reply( const struct create_socket_request *req )
770 fprintf( stderr, " handle=%d", req->handle );
773 static void dump_accept_socket_request( const struct accept_socket_request *req )
775 fprintf( stderr, " lhandle=%d,", req->lhandle );
776 fprintf( stderr, " access=%08x,", req->access );
777 fprintf( stderr, " inherit=%d", req->inherit );
780 static void dump_accept_socket_reply( const struct accept_socket_request *req )
782 fprintf( stderr, " handle=%d", req->handle );
785 static void dump_set_socket_event_request( const struct set_socket_event_request *req )
787 fprintf( stderr, " handle=%d,", req->handle );
788 fprintf( stderr, " mask=%08x,", req->mask );
789 fprintf( stderr, " event=%d", req->event );
792 static void dump_get_socket_event_request( const struct get_socket_event_request *req )
794 fprintf( stderr, " handle=%d,", req->handle );
795 fprintf( stderr, " service=%d,", req->service );
796 fprintf( stderr, " s_event=%d,", req->s_event );
797 fprintf( stderr, " c_event=%d", req->c_event );
800 static void dump_get_socket_event_reply( const struct get_socket_event_request *req )
802 fprintf( stderr, " mask=%08x,", req->mask );
803 fprintf( stderr, " pmask=%08x,", req->pmask );
804 fprintf( stderr, " state=%08x,", req->state );
805 fprintf( stderr, " errors=" );
806 dump_varargs_ints( get_req_data(req), get_req_data_size(req) );
809 static void dump_enable_socket_event_request( const struct enable_socket_event_request *req )
811 fprintf( stderr, " handle=%d,", req->handle );
812 fprintf( stderr, " mask=%08x,", req->mask );
813 fprintf( stderr, " sstate=%08x,", req->sstate );
814 fprintf( stderr, " cstate=%08x", req->cstate );
817 static void dump_alloc_console_request( const struct alloc_console_request *req )
819 fprintf( stderr, " access=%08x,", req->access );
820 fprintf( stderr, " inherit=%d", req->inherit );
823 static void dump_alloc_console_reply( const struct alloc_console_request *req )
825 fprintf( stderr, " handle_in=%d,", req->handle_in );
826 fprintf( stderr, " handle_out=%d", req->handle_out );
829 static void dump_free_console_request( const struct free_console_request *req )
833 static void dump_open_console_request( const struct open_console_request *req )
835 fprintf( stderr, " output=%d,", req->output );
836 fprintf( stderr, " access=%08x,", req->access );
837 fprintf( stderr, " inherit=%d", req->inherit );
840 static void dump_open_console_reply( const struct open_console_request *req )
842 fprintf( stderr, " handle=%d", req->handle );
845 static void dump_set_console_fd_request( const struct set_console_fd_request *req )
847 fprintf( stderr, " handle=%d,", req->handle );
848 fprintf( stderr, " file_handle=%d,", req->file_handle );
849 fprintf( stderr, " pid=%d", req->pid );
852 static void dump_get_console_mode_request( const struct get_console_mode_request *req )
854 fprintf( stderr, " handle=%d", req->handle );
857 static void dump_get_console_mode_reply( const struct get_console_mode_request *req )
859 fprintf( stderr, " mode=%d", req->mode );
862 static void dump_set_console_mode_request( const struct set_console_mode_request *req )
864 fprintf( stderr, " handle=%d,", req->handle );
865 fprintf( stderr, " mode=%d", req->mode );
868 static void dump_set_console_info_request( const struct set_console_info_request *req )
870 fprintf( stderr, " handle=%d,", req->handle );
871 fprintf( stderr, " mask=%d,", req->mask );
872 fprintf( stderr, " cursor_size=%d,", req->cursor_size );
873 fprintf( stderr, " cursor_visible=%d,", req->cursor_visible );
874 fprintf( stderr, " title=" );
875 dump_varargs_string( get_req_data(req), get_req_data_size(req) );
878 static void dump_get_console_info_request( const struct get_console_info_request *req )
880 fprintf( stderr, " handle=%d", req->handle );
883 static void dump_get_console_info_reply( const struct get_console_info_request *req )
885 fprintf( stderr, " cursor_size=%d,", req->cursor_size );
886 fprintf( stderr, " cursor_visible=%d,", req->cursor_visible );
887 fprintf( stderr, " pid=%d,", req->pid );
888 fprintf( stderr, " title=" );
889 dump_varargs_string( get_req_data(req), get_req_data_size(req) );
892 static void dump_write_console_input_request( const struct write_console_input_request *req )
894 fprintf( stderr, " handle=%d,", req->handle );
895 fprintf( stderr, " rec=" );
896 dump_varargs_input_records( get_req_data(req), get_req_data_size(req) );
899 static void dump_write_console_input_reply( const struct write_console_input_request *req )
901 fprintf( stderr, " written=%d", req->written );
904 static void dump_read_console_input_request( const struct read_console_input_request *req )
906 fprintf( stderr, " handle=%d,", req->handle );
907 fprintf( stderr, " flush=%d", req->flush );
910 static void dump_read_console_input_reply( const struct read_console_input_request *req )
912 fprintf( stderr, " read=%d,", req->read );
913 fprintf( stderr, " rec=" );
914 dump_varargs_input_records( get_req_data(req), get_req_data_size(req) );
917 static void dump_create_change_notification_request( const struct create_change_notification_request *req )
919 fprintf( stderr, " subtree=%d,", req->subtree );
920 fprintf( stderr, " filter=%d", req->filter );
923 static void dump_create_change_notification_reply( const struct create_change_notification_request *req )
925 fprintf( stderr, " handle=%d", req->handle );
928 static void dump_create_mapping_request( const struct create_mapping_request *req )
930 fprintf( stderr, " size_high=%d,", req->size_high );
931 fprintf( stderr, " size_low=%d,", req->size_low );
932 fprintf( stderr, " protect=%d,", req->protect );
933 fprintf( stderr, " inherit=%d,", req->inherit );
934 fprintf( stderr, " file_handle=%d,", req->file_handle );
935 fprintf( stderr, " name=" );
936 dump_varargs_unicode_str( get_req_data(req), get_req_data_size(req) );
939 static void dump_create_mapping_reply( const struct create_mapping_request *req )
941 fprintf( stderr, " handle=%d", req->handle );
944 static void dump_open_mapping_request( const struct open_mapping_request *req )
946 fprintf( stderr, " access=%08x,", req->access );
947 fprintf( stderr, " inherit=%d,", req->inherit );
948 fprintf( stderr, " name=" );
949 dump_varargs_unicode_str( get_req_data(req), get_req_data_size(req) );
952 static void dump_open_mapping_reply( const struct open_mapping_request *req )
954 fprintf( stderr, " handle=%d", req->handle );
957 static void dump_get_mapping_info_request( const struct get_mapping_info_request *req )
959 fprintf( stderr, " handle=%d", req->handle );
962 static void dump_get_mapping_info_reply( const struct get_mapping_info_request *req )
964 fprintf( stderr, " size_high=%d,", req->size_high );
965 fprintf( stderr, " size_low=%d,", req->size_low );
966 fprintf( stderr, " protect=%d,", req->protect );
967 fprintf( stderr, " header_size=%d,", req->header_size );
968 fprintf( stderr, " base=%p,", req->base );
969 fprintf( stderr, " shared_file=%d,", req->shared_file );
970 fprintf( stderr, " shared_size=%d", req->shared_size );
973 static void dump_create_device_request( const struct create_device_request *req )
975 fprintf( stderr, " access=%08x,", req->access );
976 fprintf( stderr, " inherit=%d,", req->inherit );
977 fprintf( stderr, " id=%d", req->id );
980 static void dump_create_device_reply( const struct create_device_request *req )
982 fprintf( stderr, " handle=%d", req->handle );
985 static void dump_create_snapshot_request( const struct create_snapshot_request *req )
987 fprintf( stderr, " inherit=%d,", req->inherit );
988 fprintf( stderr, " flags=%d,", req->flags );
989 fprintf( stderr, " pid=%p", req->pid );
992 static void dump_create_snapshot_reply( const struct create_snapshot_request *req )
994 fprintf( stderr, " handle=%d", req->handle );
997 static void dump_next_process_request( const struct next_process_request *req )
999 fprintf( stderr, " handle=%d,", req->handle );
1000 fprintf( stderr, " reset=%d", req->reset );
1003 static void dump_next_process_reply( const struct next_process_request *req )
1005 fprintf( stderr, " count=%d,", req->count );
1006 fprintf( stderr, " pid=%p,", req->pid );
1007 fprintf( stderr, " threads=%d,", req->threads );
1008 fprintf( stderr, " priority=%d", req->priority );
1011 static void dump_next_thread_request( const struct next_thread_request *req )
1013 fprintf( stderr, " handle=%d,", req->handle );
1014 fprintf( stderr, " reset=%d", req->reset );
1017 static void dump_next_thread_reply( const struct next_thread_request *req )
1019 fprintf( stderr, " count=%d,", req->count );
1020 fprintf( stderr, " pid=%p,", req->pid );
1021 fprintf( stderr, " tid=%p,", req->tid );
1022 fprintf( stderr, " base_pri=%d,", req->base_pri );
1023 fprintf( stderr, " delta_pri=%d", req->delta_pri );
1026 static void dump_next_module_request( const struct next_module_request *req )
1028 fprintf( stderr, " handle=%d,", req->handle );
1029 fprintf( stderr, " reset=%d", req->reset );
1032 static void dump_next_module_reply( const struct next_module_request *req )
1034 fprintf( stderr, " pid=%p,", req->pid );
1035 fprintf( stderr, " base=%p", req->base );
1038 static void dump_wait_debug_event_request( const struct wait_debug_event_request *req )
1040 fprintf( stderr, " timeout=%d", req->timeout );
1043 static void dump_wait_debug_event_reply( const struct wait_debug_event_request *req )
1045 fprintf( stderr, " pid=%p,", req->pid );
1046 fprintf( stderr, " tid=%p,", req->tid );
1047 fprintf( stderr, " event=" );
1048 dump_varargs_debug_event( get_req_data(req), get_req_data_size(req) );
1051 static void dump_exception_event_request( const struct exception_event_request *req )
1053 fprintf( stderr, " first=%d,", req->first );
1054 fprintf( stderr, " record=" );
1055 dump_varargs_exc_event( get_req_data(req), get_req_data_size(req) );
1058 static void dump_exception_event_reply( const struct exception_event_request *req )
1060 fprintf( stderr, " status=%d,", req->status );
1061 fprintf( stderr, " context=" );
1062 dump_varargs_context( get_req_data(req), get_req_data_size(req) );
1065 static void dump_output_debug_string_request( const struct output_debug_string_request *req )
1067 fprintf( stderr, " string=%p,", req->string );
1068 fprintf( stderr, " unicode=%d,", req->unicode );
1069 fprintf( stderr, " length=%d", req->length );
1072 static void dump_continue_debug_event_request( const struct continue_debug_event_request *req )
1074 fprintf( stderr, " pid=%p,", req->pid );
1075 fprintf( stderr, " tid=%p,", req->tid );
1076 fprintf( stderr, " status=%d", req->status );
1079 static void dump_debug_process_request( const struct debug_process_request *req )
1081 fprintf( stderr, " pid=%p", req->pid );
1084 static void dump_read_process_memory_request( const struct read_process_memory_request *req )
1086 fprintf( stderr, " handle=%d,", req->handle );
1087 fprintf( stderr, " addr=%p,", req->addr );
1088 fprintf( stderr, " len=%d", req->len );
1091 static void dump_read_process_memory_reply( const struct read_process_memory_request *req )
1093 fprintf( stderr, " data=" );
1094 dump_varargs_read_process_memory_reply( req );
1097 static void dump_write_process_memory_request( const struct write_process_memory_request *req )
1099 fprintf( stderr, " handle=%d,", req->handle );
1100 fprintf( stderr, " addr=%p,", req->addr );
1101 fprintf( stderr, " len=%d,", req->len );
1102 fprintf( stderr, " first_mask=%08x,", req->first_mask );
1103 fprintf( stderr, " last_mask=%08x,", req->last_mask );
1104 fprintf( stderr, " data=" );
1105 dump_varargs_write_process_memory_request( req );
1108 static void dump_create_key_request( const struct create_key_request *req )
1110 fprintf( stderr, " parent=%d,", req->parent );
1111 fprintf( stderr, " access=%08x,", req->access );
1112 fprintf( stderr, " options=%08x,", req->options );
1113 fprintf( stderr, " modif=%ld,", req->modif );
1114 fprintf( stderr, " name=" );
1115 dump_path_t( req, &req->name );
1116 fprintf( stderr, "," );
1117 fprintf( stderr, " class=" );
1118 dump_unicode_string( req, req->class );
1121 static void dump_create_key_reply( const struct create_key_request *req )
1123 fprintf( stderr, " hkey=%d,", req->hkey );
1124 fprintf( stderr, " created=%d", req->created );
1127 static void dump_open_key_request( const struct open_key_request *req )
1129 fprintf( stderr, " parent=%d,", req->parent );
1130 fprintf( stderr, " access=%08x,", req->access );
1131 fprintf( stderr, " name=" );
1132 dump_path_t( req, &req->name );
1135 static void dump_open_key_reply( const struct open_key_request *req )
1137 fprintf( stderr, " hkey=%d", req->hkey );
1140 static void dump_delete_key_request( const struct delete_key_request *req )
1142 fprintf( stderr, " hkey=%d,", req->hkey );
1143 fprintf( stderr, " name=" );
1144 dump_path_t( req, &req->name );
1147 static void dump_close_key_request( const struct close_key_request *req )
1149 fprintf( stderr, " hkey=%d", req->hkey );
1152 static void dump_enum_key_request( const struct enum_key_request *req )
1154 fprintf( stderr, " hkey=%d,", req->hkey );
1155 fprintf( stderr, " index=%d", req->index );
1158 static void dump_enum_key_reply( const struct enum_key_request *req )
1160 fprintf( stderr, " modif=%ld,", req->modif );
1161 fprintf( stderr, " name=" );
1162 dump_path_t( req, &req->name );
1163 fprintf( stderr, "," );
1164 fprintf( stderr, " class=" );
1165 dump_unicode_string( req, req->class );
1168 static void dump_query_key_info_request( const struct query_key_info_request *req )
1170 fprintf( stderr, " hkey=%d", req->hkey );
1173 static void dump_query_key_info_reply( const struct query_key_info_request *req )
1175 fprintf( stderr, " subkeys=%d,", req->subkeys );
1176 fprintf( stderr, " max_subkey=%d,", req->max_subkey );
1177 fprintf( stderr, " max_class=%d,", req->max_class );
1178 fprintf( stderr, " values=%d,", req->values );
1179 fprintf( stderr, " max_value=%d,", req->max_value );
1180 fprintf( stderr, " max_data=%d,", req->max_data );
1181 fprintf( stderr, " modif=%ld,", req->modif );
1182 fprintf( stderr, " name=" );
1183 dump_path_t( req, &req->name );
1184 fprintf( stderr, "," );
1185 fprintf( stderr, " class=" );
1186 dump_unicode_string( req, req->class );
1189 static void dump_set_key_value_request( const struct set_key_value_request *req )
1191 fprintf( stderr, " hkey=%d,", req->hkey );
1192 fprintf( stderr, " type=%d,", req->type );
1193 fprintf( stderr, " total=%08x,", req->total );
1194 fprintf( stderr, " offset=%08x,", req->offset );
1195 fprintf( stderr, " len=%08x,", req->len );
1196 fprintf( stderr, " name=" );
1197 dump_path_t( req, &req->name );
1198 fprintf( stderr, "," );
1199 fprintf( stderr, " data=" );
1200 dump_varargs_set_key_value_request( req );
1203 static void dump_get_key_value_request( const struct get_key_value_request *req )
1205 fprintf( stderr, " hkey=%d,", req->hkey );
1206 fprintf( stderr, " offset=%08x,", req->offset );
1207 fprintf( stderr, " name=" );
1208 dump_unicode_string( req, req->name );
1211 static void dump_get_key_value_reply( const struct get_key_value_request *req )
1213 fprintf( stderr, " type=%d,", req->type );
1214 fprintf( stderr, " len=%d,", req->len );
1215 fprintf( stderr, " data=" );
1216 dump_varargs_get_key_value_reply( req );
1219 static void dump_enum_key_value_request( const struct enum_key_value_request *req )
1221 fprintf( stderr, " hkey=%d,", req->hkey );
1222 fprintf( stderr, " index=%d,", req->index );
1223 fprintf( stderr, " offset=%08x", req->offset );
1226 static void dump_enum_key_value_reply( const struct enum_key_value_request *req )
1228 fprintf( stderr, " type=%d,", req->type );
1229 fprintf( stderr, " len=%d,", req->len );
1230 fprintf( stderr, " name=" );
1231 dump_path_t( req, &req->name );
1232 fprintf( stderr, "," );
1233 fprintf( stderr, " data=" );
1234 dump_varargs_enum_key_value_reply( req );
1237 static void dump_delete_key_value_request( const struct delete_key_value_request *req )
1239 fprintf( stderr, " hkey=%d,", req->hkey );
1240 fprintf( stderr, " name=" );
1241 dump_path_t( req, &req->name );
1244 static void dump_load_registry_request( const struct load_registry_request *req )
1246 fprintf( stderr, " hkey=%d,", req->hkey );
1247 fprintf( stderr, " file=%d,", req->file );
1248 fprintf( stderr, " name=" );
1249 dump_path_t( req, &req->name );
1252 static void dump_save_registry_request( const struct save_registry_request *req )
1254 fprintf( stderr, " hkey=%d,", req->hkey );
1255 fprintf( stderr, " file=%d", req->file );
1258 static void dump_save_registry_atexit_request( const struct save_registry_atexit_request *req )
1260 fprintf( stderr, " hkey=%d,", req->hkey );
1261 fprintf( stderr, " file=" );
1262 dump_string( req, req->file );
1265 static void dump_set_registry_levels_request( const struct set_registry_levels_request *req )
1267 fprintf( stderr, " current=%d,", req->current );
1268 fprintf( stderr, " saving=%d,", req->saving );
1269 fprintf( stderr, " period=%d", req->period );
1272 static void dump_create_timer_request( const struct create_timer_request *req )
1274 fprintf( stderr, " inherit=%d,", req->inherit );
1275 fprintf( stderr, " manual=%d,", req->manual );
1276 fprintf( stderr, " name=" );
1277 dump_varargs_unicode_str( get_req_data(req), get_req_data_size(req) );
1280 static void dump_create_timer_reply( const struct create_timer_request *req )
1282 fprintf( stderr, " handle=%d", req->handle );
1285 static void dump_open_timer_request( const struct open_timer_request *req )
1287 fprintf( stderr, " access=%08x,", req->access );
1288 fprintf( stderr, " inherit=%d,", req->inherit );
1289 fprintf( stderr, " name=" );
1290 dump_varargs_unicode_str( get_req_data(req), get_req_data_size(req) );
1293 static void dump_open_timer_reply( const struct open_timer_request *req )
1295 fprintf( stderr, " handle=%d", req->handle );
1298 static void dump_set_timer_request( const struct set_timer_request *req )
1300 fprintf( stderr, " handle=%d,", req->handle );
1301 fprintf( stderr, " sec=%d,", req->sec );
1302 fprintf( stderr, " usec=%d,", req->usec );
1303 fprintf( stderr, " period=%d,", req->period );
1304 fprintf( stderr, " callback=%p,", req->callback );
1305 fprintf( stderr, " arg=%p", req->arg );
1308 static void dump_cancel_timer_request( const struct cancel_timer_request *req )
1310 fprintf( stderr, " handle=%d", req->handle );
1313 static void dump_get_thread_context_request( const struct get_thread_context_request *req )
1315 fprintf( stderr, " handle=%d,", req->handle );
1316 fprintf( stderr, " flags=%08x", req->flags );
1319 static void dump_get_thread_context_reply( const struct get_thread_context_request *req )
1321 fprintf( stderr, " context=" );
1322 dump_varargs_context( get_req_data(req), get_req_data_size(req) );
1325 static void dump_set_thread_context_request( const struct set_thread_context_request *req )
1327 fprintf( stderr, " handle=%d,", req->handle );
1328 fprintf( stderr, " flags=%08x,", req->flags );
1329 fprintf( stderr, " context=" );
1330 dump_varargs_context( get_req_data(req), get_req_data_size(req) );
1333 static void dump_get_selector_entry_request( const struct get_selector_entry_request *req )
1335 fprintf( stderr, " handle=%d,", req->handle );
1336 fprintf( stderr, " entry=%d", req->entry );
1339 static void dump_get_selector_entry_reply( const struct get_selector_entry_request *req )
1341 fprintf( stderr, " base=%08x,", req->base );
1342 fprintf( stderr, " limit=%08x,", req->limit );
1343 fprintf( stderr, " flags=%02x", req->flags );
1346 static void dump_add_atom_request( const struct add_atom_request *req )
1348 fprintf( stderr, " local=%d,", req->local );
1349 fprintf( stderr, " name=" );
1350 dump_varargs_unicode_str( get_req_data(req), get_req_data_size(req) );
1353 static void dump_add_atom_reply( const struct add_atom_request *req )
1355 fprintf( stderr, " atom=%d", req->atom );
1358 static void dump_delete_atom_request( const struct delete_atom_request *req )
1360 fprintf( stderr, " atom=%d,", req->atom );
1361 fprintf( stderr, " local=%d", req->local );
1364 static void dump_find_atom_request( const struct find_atom_request *req )
1366 fprintf( stderr, " local=%d,", req->local );
1367 fprintf( stderr, " name=" );
1368 dump_varargs_unicode_str( get_req_data(req), get_req_data_size(req) );
1371 static void dump_find_atom_reply( const struct find_atom_request *req )
1373 fprintf( stderr, " atom=%d", req->atom );
1376 static void dump_get_atom_name_request( const struct get_atom_name_request *req )
1378 fprintf( stderr, " atom=%d,", req->atom );
1379 fprintf( stderr, " local=%d", req->local );
1382 static void dump_get_atom_name_reply( const struct get_atom_name_request *req )
1384 fprintf( stderr, " count=%d,", req->count );
1385 fprintf( stderr, " name=" );
1386 dump_varargs_unicode_str( get_req_data(req), get_req_data_size(req) );
1389 static void dump_init_atom_table_request( const struct init_atom_table_request *req )
1391 fprintf( stderr, " entries=%d", req->entries );
1394 static void dump_get_msg_queue_request( const struct get_msg_queue_request *req )
1398 static void dump_get_msg_queue_reply( const struct get_msg_queue_request *req )
1400 fprintf( stderr, " handle=%d", req->handle );
1403 static void dump_wake_queue_request( const struct wake_queue_request *req )
1405 fprintf( stderr, " handle=%d,", req->handle );
1406 fprintf( stderr, " bits=%08x", req->bits );
1409 static void dump_wait_input_idle_request( const struct wait_input_idle_request *req )
1411 fprintf( stderr, " handle=%d,", req->handle );
1412 fprintf( stderr, " timeout=%d", req->timeout );
1415 static void dump_wait_input_idle_reply( const struct wait_input_idle_request *req )
1417 fprintf( stderr, " event=%d", req->event );
1420 static void dump_create_serial_request( const struct create_serial_request *req )
1422 fprintf( stderr, " access=%08x,", req->access );
1423 fprintf( stderr, " inherit=%d,", req->inherit );
1424 fprintf( stderr, " sharing=%08x,", req->sharing );
1425 fprintf( stderr, " name=" );
1426 dump_string( req, req->name );
1429 static void dump_create_serial_reply( const struct create_serial_request *req )
1431 fprintf( stderr, " handle=%d", req->handle );
1434 static const dump_func req_dumpers[REQ_NB_REQUESTS] = {
1435 (dump_func)dump_new_process_request,
1436 (dump_func)dump_wait_process_request,
1437 (dump_func)dump_new_thread_request,
1438 (dump_func)dump_boot_done_request,
1439 (dump_func)dump_init_process_request,
1440 (dump_func)dump_init_process_done_request,
1441 (dump_func)dump_init_thread_request,
1442 (dump_func)dump_get_thread_buffer_request,
1443 (dump_func)dump_terminate_process_request,
1444 (dump_func)dump_terminate_thread_request,
1445 (dump_func)dump_get_process_info_request,
1446 (dump_func)dump_set_process_info_request,
1447 (dump_func)dump_get_thread_info_request,
1448 (dump_func)dump_set_thread_info_request,
1449 (dump_func)dump_suspend_thread_request,
1450 (dump_func)dump_resume_thread_request,
1451 (dump_func)dump_load_dll_request,
1452 (dump_func)dump_unload_dll_request,
1453 (dump_func)dump_queue_apc_request,
1454 (dump_func)dump_get_apc_request,
1455 (dump_func)dump_close_handle_request,
1456 (dump_func)dump_get_handle_info_request,
1457 (dump_func)dump_set_handle_info_request,
1458 (dump_func)dump_dup_handle_request,
1459 (dump_func)dump_open_process_request,
1460 (dump_func)dump_select_request,
1461 (dump_func)dump_create_event_request,
1462 (dump_func)dump_event_op_request,
1463 (dump_func)dump_open_event_request,
1464 (dump_func)dump_create_mutex_request,
1465 (dump_func)dump_release_mutex_request,
1466 (dump_func)dump_open_mutex_request,
1467 (dump_func)dump_create_semaphore_request,
1468 (dump_func)dump_release_semaphore_request,
1469 (dump_func)dump_open_semaphore_request,
1470 (dump_func)dump_create_file_request,
1471 (dump_func)dump_alloc_file_handle_request,
1472 (dump_func)dump_get_read_fd_request,
1473 (dump_func)dump_get_write_fd_request,
1474 (dump_func)dump_set_file_pointer_request,
1475 (dump_func)dump_truncate_file_request,
1476 (dump_func)dump_set_file_time_request,
1477 (dump_func)dump_flush_file_request,
1478 (dump_func)dump_get_file_info_request,
1479 (dump_func)dump_lock_file_request,
1480 (dump_func)dump_unlock_file_request,
1481 (dump_func)dump_create_pipe_request,
1482 (dump_func)dump_create_socket_request,
1483 (dump_func)dump_accept_socket_request,
1484 (dump_func)dump_set_socket_event_request,
1485 (dump_func)dump_get_socket_event_request,
1486 (dump_func)dump_enable_socket_event_request,
1487 (dump_func)dump_alloc_console_request,
1488 (dump_func)dump_free_console_request,
1489 (dump_func)dump_open_console_request,
1490 (dump_func)dump_set_console_fd_request,
1491 (dump_func)dump_get_console_mode_request,
1492 (dump_func)dump_set_console_mode_request,
1493 (dump_func)dump_set_console_info_request,
1494 (dump_func)dump_get_console_info_request,
1495 (dump_func)dump_write_console_input_request,
1496 (dump_func)dump_read_console_input_request,
1497 (dump_func)dump_create_change_notification_request,
1498 (dump_func)dump_create_mapping_request,
1499 (dump_func)dump_open_mapping_request,
1500 (dump_func)dump_get_mapping_info_request,
1501 (dump_func)dump_create_device_request,
1502 (dump_func)dump_create_snapshot_request,
1503 (dump_func)dump_next_process_request,
1504 (dump_func)dump_next_thread_request,
1505 (dump_func)dump_next_module_request,
1506 (dump_func)dump_wait_debug_event_request,
1507 (dump_func)dump_exception_event_request,
1508 (dump_func)dump_output_debug_string_request,
1509 (dump_func)dump_continue_debug_event_request,
1510 (dump_func)dump_debug_process_request,
1511 (dump_func)dump_read_process_memory_request,
1512 (dump_func)dump_write_process_memory_request,
1513 (dump_func)dump_create_key_request,
1514 (dump_func)dump_open_key_request,
1515 (dump_func)dump_delete_key_request,
1516 (dump_func)dump_close_key_request,
1517 (dump_func)dump_enum_key_request,
1518 (dump_func)dump_query_key_info_request,
1519 (dump_func)dump_set_key_value_request,
1520 (dump_func)dump_get_key_value_request,
1521 (dump_func)dump_enum_key_value_request,
1522 (dump_func)dump_delete_key_value_request,
1523 (dump_func)dump_load_registry_request,
1524 (dump_func)dump_save_registry_request,
1525 (dump_func)dump_save_registry_atexit_request,
1526 (dump_func)dump_set_registry_levels_request,
1527 (dump_func)dump_create_timer_request,
1528 (dump_func)dump_open_timer_request,
1529 (dump_func)dump_set_timer_request,
1530 (dump_func)dump_cancel_timer_request,
1531 (dump_func)dump_get_thread_context_request,
1532 (dump_func)dump_set_thread_context_request,
1533 (dump_func)dump_get_selector_entry_request,
1534 (dump_func)dump_add_atom_request,
1535 (dump_func)dump_delete_atom_request,
1536 (dump_func)dump_find_atom_request,
1537 (dump_func)dump_get_atom_name_request,
1538 (dump_func)dump_init_atom_table_request,
1539 (dump_func)dump_get_msg_queue_request,
1540 (dump_func)dump_wake_queue_request,
1541 (dump_func)dump_wait_input_idle_request,
1542 (dump_func)dump_create_serial_request,
1545 static const dump_func reply_dumpers[REQ_NB_REQUESTS] = {
1547 (dump_func)dump_wait_process_reply,
1548 (dump_func)dump_new_thread_reply,
1550 (dump_func)dump_init_process_reply,
1551 (dump_func)dump_init_process_done_reply,
1553 (dump_func)dump_get_thread_buffer_reply,
1554 (dump_func)dump_terminate_process_reply,
1555 (dump_func)dump_terminate_thread_reply,
1556 (dump_func)dump_get_process_info_reply,
1558 (dump_func)dump_get_thread_info_reply,
1560 (dump_func)dump_suspend_thread_reply,
1561 (dump_func)dump_resume_thread_reply,
1565 (dump_func)dump_get_apc_reply,
1567 (dump_func)dump_get_handle_info_reply,
1569 (dump_func)dump_dup_handle_reply,
1570 (dump_func)dump_open_process_reply,
1571 (dump_func)dump_select_reply,
1572 (dump_func)dump_create_event_reply,
1574 (dump_func)dump_open_event_reply,
1575 (dump_func)dump_create_mutex_reply,
1577 (dump_func)dump_open_mutex_reply,
1578 (dump_func)dump_create_semaphore_reply,
1579 (dump_func)dump_release_semaphore_reply,
1580 (dump_func)dump_open_semaphore_reply,
1581 (dump_func)dump_create_file_reply,
1582 (dump_func)dump_alloc_file_handle_reply,
1585 (dump_func)dump_set_file_pointer_reply,
1589 (dump_func)dump_get_file_info_reply,
1592 (dump_func)dump_create_pipe_reply,
1593 (dump_func)dump_create_socket_reply,
1594 (dump_func)dump_accept_socket_reply,
1596 (dump_func)dump_get_socket_event_reply,
1598 (dump_func)dump_alloc_console_reply,
1600 (dump_func)dump_open_console_reply,
1602 (dump_func)dump_get_console_mode_reply,
1605 (dump_func)dump_get_console_info_reply,
1606 (dump_func)dump_write_console_input_reply,
1607 (dump_func)dump_read_console_input_reply,
1608 (dump_func)dump_create_change_notification_reply,
1609 (dump_func)dump_create_mapping_reply,
1610 (dump_func)dump_open_mapping_reply,
1611 (dump_func)dump_get_mapping_info_reply,
1612 (dump_func)dump_create_device_reply,
1613 (dump_func)dump_create_snapshot_reply,
1614 (dump_func)dump_next_process_reply,
1615 (dump_func)dump_next_thread_reply,
1616 (dump_func)dump_next_module_reply,
1617 (dump_func)dump_wait_debug_event_reply,
1618 (dump_func)dump_exception_event_reply,
1622 (dump_func)dump_read_process_memory_reply,
1624 (dump_func)dump_create_key_reply,
1625 (dump_func)dump_open_key_reply,
1628 (dump_func)dump_enum_key_reply,
1629 (dump_func)dump_query_key_info_reply,
1631 (dump_func)dump_get_key_value_reply,
1632 (dump_func)dump_enum_key_value_reply,
1638 (dump_func)dump_create_timer_reply,
1639 (dump_func)dump_open_timer_reply,
1642 (dump_func)dump_get_thread_context_reply,
1644 (dump_func)dump_get_selector_entry_reply,
1645 (dump_func)dump_add_atom_reply,
1647 (dump_func)dump_find_atom_reply,
1648 (dump_func)dump_get_atom_name_reply,
1650 (dump_func)dump_get_msg_queue_reply,
1652 (dump_func)dump_wait_input_idle_reply,
1653 (dump_func)dump_create_serial_reply,
1656 static const char * const req_names[REQ_NB_REQUESTS] = {
1662 "init_process_done",
1664 "get_thread_buffer",
1665 "terminate_process",
1690 "release_semaphore",
1693 "alloc_file_handle",
1708 "enable_socket_event",
1717 "write_console_input",
1718 "read_console_input",
1719 "create_change_notification",
1730 "output_debug_string",
1731 "continue_debug_event",
1733 "read_process_memory",
1734 "write_process_memory",
1747 "save_registry_atexit",
1748 "set_registry_levels",
1753 "get_thread_context",
1754 "set_thread_context",
1755 "get_selector_entry",
1767 /* ### make_requests end ### */
1768 /* Everything above this line is generated automatically by tools/make_requests */
1770 void trace_request( enum request req )
1772 current->last_req = req;
1773 if (req < REQ_NB_REQUESTS)
1775 fprintf( stderr, "%08x: %s(", (unsigned int)current, req_names[req] );
1776 req_dumpers[req]( current->buffer );
1779 fprintf( stderr, "%08x: %d(", (unsigned int)current, req );
1780 if (current->pass_fd != -1) fprintf( stderr, " ) fd=%d\n", current->pass_fd );
1781 else fprintf( stderr, " )\n" );
1784 void trace_reply( struct thread *thread )
1786 fprintf( stderr, "%08x: %s() = %x",
1787 (unsigned int)thread, req_names[thread->last_req], thread->error );
1788 if (reply_dumpers[thread->last_req])
1790 fprintf( stderr, " {" );
1791 reply_dumpers[thread->last_req]( thread->buffer );
1792 fprintf( stderr, " }" );
1794 if (thread->pass_fd != -1) fprintf( stderr, " fd=%d\n", thread->pass_fd );
1795 else fprintf( stderr, "\n" );