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_debug_event_t( const debug_event_t
*event
)
87 case EXCEPTION_DEBUG_EVENT
:
88 fprintf( stderr
, "{exception,code=%x,flags=%x,rec=%p,addr=%p,params={",
89 event
->info
.exception
.code
, event
->info
.exception
.flags
,
90 event
->info
.exception
.record
, event
->info
.exception
.addr
);
91 for (i
= 0; i
< event
->info
.exception
.nb_params
; i
++)
93 if (i
) fputc( ',', stderr
);
94 fprintf( stderr
, "%x", event
->info
.exception
.params
[i
] );
96 fprintf( stderr
, "},first_chance=%d,context=", event
->info
.exception
.first_chance
);
97 dump_context( &event
->info
.exception
.context
);
100 case CREATE_THREAD_DEBUG_EVENT
:
101 fprintf( stderr
, "{create_thread,thread=%d,teb=%p,start=%p}",
102 event
->info
.create_thread
.handle
, event
->info
.create_thread
.teb
,
103 event
->info
.create_thread
.start
);
105 case CREATE_PROCESS_DEBUG_EVENT
:
106 fprintf( stderr
, "{create_process,file=%d,process=%d,thread=%d,base=%p,offset=%d,"
107 "size=%d,teb=%p,start=%p,name=%p,unicode=%d}",
108 event
->info
.create_process
.file
, event
->info
.create_process
.process
,
109 event
->info
.create_process
.thread
, event
->info
.create_process
.base
,
110 event
->info
.create_process
.dbg_offset
, event
->info
.create_process
.dbg_size
,
111 event
->info
.create_process
.teb
, event
->info
.create_process
.start
,
112 event
->info
.create_process
.name
, event
->info
.create_process
.unicode
);
114 case EXIT_THREAD_DEBUG_EVENT
:
115 fprintf( stderr
, "{exit_thread,code=%d}", event
->info
.exit
.exit_code
);
117 case EXIT_PROCESS_DEBUG_EVENT
:
118 fprintf( stderr
, "{exit_process,code=%d}", event
->info
.exit
.exit_code
);
120 case LOAD_DLL_DEBUG_EVENT
:
121 fprintf( stderr
, "{load_dll,file=%d,base=%p,offset=%d,size=%d,name=%p,unicode=%d}",
122 event
->info
.load_dll
.handle
, event
->info
.load_dll
.base
,
123 event
->info
.load_dll
.dbg_offset
, event
->info
.load_dll
.dbg_size
,
124 event
->info
.load_dll
.name
, event
->info
.load_dll
.unicode
);
126 case UNLOAD_DLL_DEBUG_EVENT
:
127 fprintf( stderr
, "{unload_dll,base=%p}", event
->info
.unload_dll
.base
);
129 case OUTPUT_DEBUG_STRING_EVENT
:
130 fprintf( stderr
, "{output_string,data=%p,unicode=%d,len=%d}",
131 event
->info
.output_string
.string
, event
->info
.output_string
.unicode
,
132 event
->info
.output_string
.length
);
135 fprintf( stderr
, "{rip,err=%d,type=%d}",
136 event
->info
.rip_info
.error
, event
->info
.rip_info
.type
);
138 case 0: /* zero is the code returned on timeouts */
139 fprintf( stderr
, "{}" );
142 fprintf( stderr
, "{code=??? (%d)}", event
->code
);
148 /* dumping for functions for requests that have a variable part */
150 static void dump_varargs_select_request( const struct select_request
*req
)
152 dump_ints( req
->handles
, req
->count
);
155 static void dump_varargs_get_apcs_reply( const struct get_apcs_request
*req
)
158 for (i
= 0; i
< 2 * req
->count
; i
++)
159 fprintf( stderr
, "%c%p", i
? ',' : '{', req
->apcs
[i
] );
160 fprintf( stderr
, "}" );
163 static void dump_varargs_get_socket_event_reply( const struct get_socket_event_request
*req
)
165 dump_ints( req
->errors
, FD_MAX_EVENTS
);
168 static void dump_varargs_read_process_memory_reply( const struct read_process_memory_request
*req
)
170 int count
= MIN( req
->len
, get_req_size( req
->data
, sizeof(int) ) );
171 dump_bytes( (unsigned char *)req
->data
, count
* sizeof(int) );
174 static void dump_varargs_write_process_memory_request( const struct write_process_memory_request
*req
)
176 int count
= MIN( req
->len
, get_req_size( req
->data
, sizeof(int) ) );
177 dump_bytes( (unsigned char *)req
->data
, count
* sizeof(int) );
180 static void dump_varargs_set_key_value_request( const struct set_key_value_request
*req
)
182 dump_bytes( req
->data
, req
->len
);
185 static void dump_varargs_get_key_value_reply( const struct get_key_value_request
*req
)
187 dump_bytes( req
->data
, req
->len
);
190 static void dump_varargs_enum_key_value_reply( const struct enum_key_value_request
*req
)
192 dump_bytes( req
->data
, req
->len
);
195 typedef void (*dump_func
)( const void *req
);
197 /* Everything below this line is generated automatically by tools/make_requests */
198 /* ### make_requests begin ### */
200 static void dump_new_process_request( const struct new_process_request
*req
)
202 fprintf( stderr
, " inherit=%d,", req
->inherit
);
203 fprintf( stderr
, " inherit_all=%d,", req
->inherit_all
);
204 fprintf( stderr
, " create_flags=%d,", req
->create_flags
);
205 fprintf( stderr
, " start_flags=%d,", req
->start_flags
);
206 fprintf( stderr
, " hstdin=%d,", req
->hstdin
);
207 fprintf( stderr
, " hstdout=%d,", req
->hstdout
);
208 fprintf( stderr
, " hstderr=%d,", req
->hstderr
);
209 fprintf( stderr
, " event=%d,", req
->event
);
210 fprintf( stderr
, " cmd_show=%d,", req
->cmd_show
);
211 fprintf( stderr
, " env_ptr=%p,", req
->env_ptr
);
212 fprintf( stderr
, " cmdline=\"%s\"", req
->cmdline
);
215 static void dump_new_process_reply( const struct new_process_request
*req
)
217 fprintf( stderr
, " pid=%p,", req
->pid
);
218 fprintf( stderr
, " handle=%d", req
->handle
);
221 static void dump_new_thread_request( const struct new_thread_request
*req
)
223 fprintf( stderr
, " pid=%p,", req
->pid
);
224 fprintf( stderr
, " suspend=%d,", req
->suspend
);
225 fprintf( stderr
, " inherit=%d", req
->inherit
);
228 static void dump_new_thread_reply( const struct new_thread_request
*req
)
230 fprintf( stderr
, " tid=%p,", req
->tid
);
231 fprintf( stderr
, " handle=%d", req
->handle
);
234 static void dump_set_debug_request( const struct set_debug_request
*req
)
236 fprintf( stderr
, " level=%d", req
->level
);
239 static void dump_init_process_request( const struct init_process_request
*req
)
243 static void dump_init_process_reply( const struct init_process_request
*req
)
245 fprintf( stderr
, " start_flags=%d,", req
->start_flags
);
246 fprintf( stderr
, " hstdin=%d,", req
->hstdin
);
247 fprintf( stderr
, " hstdout=%d,", req
->hstdout
);
248 fprintf( stderr
, " hstderr=%d,", req
->hstderr
);
249 fprintf( stderr
, " cmd_show=%d,", req
->cmd_show
);
250 fprintf( stderr
, " env_ptr=%p,", req
->env_ptr
);
251 fprintf( stderr
, " cmdline=\"%s\"", req
->cmdline
);
254 static void dump_init_process_done_request( const struct init_process_done_request
*req
)
256 fprintf( stderr
, " dummy=%d", req
->dummy
);
259 static void dump_init_thread_request( const struct init_thread_request
*req
)
261 fprintf( stderr
, " unix_pid=%d,", req
->unix_pid
);
262 fprintf( stderr
, " teb=%p", req
->teb
);
265 static void dump_init_thread_reply( const struct init_thread_request
*req
)
267 fprintf( stderr
, " pid=%p,", req
->pid
);
268 fprintf( stderr
, " tid=%p", req
->tid
);
271 static void dump_get_thread_buffer_request( const struct get_thread_buffer_request
*req
)
273 fprintf( stderr
, " dummy=%d", req
->dummy
);
276 static void dump_terminate_process_request( const struct terminate_process_request
*req
)
278 fprintf( stderr
, " handle=%d,", req
->handle
);
279 fprintf( stderr
, " exit_code=%d", req
->exit_code
);
282 static void dump_terminate_thread_request( const struct terminate_thread_request
*req
)
284 fprintf( stderr
, " handle=%d,", req
->handle
);
285 fprintf( stderr
, " exit_code=%d", req
->exit_code
);
288 static void dump_get_process_info_request( const struct get_process_info_request
*req
)
290 fprintf( stderr
, " handle=%d", req
->handle
);
293 static void dump_get_process_info_reply( const struct get_process_info_request
*req
)
295 fprintf( stderr
, " pid=%p,", req
->pid
);
296 fprintf( stderr
, " exit_code=%d,", req
->exit_code
);
297 fprintf( stderr
, " priority=%d,", req
->priority
);
298 fprintf( stderr
, " process_affinity=%d,", req
->process_affinity
);
299 fprintf( stderr
, " system_affinity=%d", req
->system_affinity
);
302 static void dump_set_process_info_request( const struct set_process_info_request
*req
)
304 fprintf( stderr
, " handle=%d,", req
->handle
);
305 fprintf( stderr
, " mask=%d,", req
->mask
);
306 fprintf( stderr
, " priority=%d,", req
->priority
);
307 fprintf( stderr
, " affinity=%d", req
->affinity
);
310 static void dump_get_thread_info_request( const struct get_thread_info_request
*req
)
312 fprintf( stderr
, " handle=%d", req
->handle
);
315 static void dump_get_thread_info_reply( const struct get_thread_info_request
*req
)
317 fprintf( stderr
, " tid=%p,", req
->tid
);
318 fprintf( stderr
, " exit_code=%d,", req
->exit_code
);
319 fprintf( stderr
, " priority=%d", req
->priority
);
322 static void dump_set_thread_info_request( const struct set_thread_info_request
*req
)
324 fprintf( stderr
, " handle=%d,", req
->handle
);
325 fprintf( stderr
, " mask=%d,", req
->mask
);
326 fprintf( stderr
, " priority=%d,", req
->priority
);
327 fprintf( stderr
, " affinity=%d", req
->affinity
);
330 static void dump_suspend_thread_request( const struct suspend_thread_request
*req
)
332 fprintf( stderr
, " handle=%d", req
->handle
);
335 static void dump_suspend_thread_reply( const struct suspend_thread_request
*req
)
337 fprintf( stderr
, " count=%d", req
->count
);
340 static void dump_resume_thread_request( const struct resume_thread_request
*req
)
342 fprintf( stderr
, " handle=%d", req
->handle
);
345 static void dump_resume_thread_reply( const struct resume_thread_request
*req
)
347 fprintf( stderr
, " count=%d", req
->count
);
350 static void dump_debugger_request( const struct debugger_request
*req
)
352 fprintf( stderr
, " op=%d", req
->op
);
355 static void dump_queue_apc_request( const struct queue_apc_request
*req
)
357 fprintf( stderr
, " handle=%d,", req
->handle
);
358 fprintf( stderr
, " func=%p,", req
->func
);
359 fprintf( stderr
, " param=%p", req
->param
);
362 static void dump_get_apcs_request( const struct get_apcs_request
*req
)
366 static void dump_get_apcs_reply( const struct get_apcs_request
*req
)
368 fprintf( stderr
, " count=%d,", req
->count
);
369 fprintf( stderr
, " apcs=" );
370 dump_varargs_get_apcs_reply( req
);
373 static void dump_close_handle_request( const struct close_handle_request
*req
)
375 fprintf( stderr
, " handle=%d", req
->handle
);
378 static void dump_get_handle_info_request( const struct get_handle_info_request
*req
)
380 fprintf( stderr
, " handle=%d", req
->handle
);
383 static void dump_get_handle_info_reply( const struct get_handle_info_request
*req
)
385 fprintf( stderr
, " flags=%d", req
->flags
);
388 static void dump_set_handle_info_request( const struct set_handle_info_request
*req
)
390 fprintf( stderr
, " handle=%d,", req
->handle
);
391 fprintf( stderr
, " flags=%d,", req
->flags
);
392 fprintf( stderr
, " mask=%d", req
->mask
);
395 static void dump_dup_handle_request( const struct dup_handle_request
*req
)
397 fprintf( stderr
, " src_process=%d,", req
->src_process
);
398 fprintf( stderr
, " src_handle=%d,", req
->src_handle
);
399 fprintf( stderr
, " dst_process=%d,", req
->dst_process
);
400 fprintf( stderr
, " access=%08x,", req
->access
);
401 fprintf( stderr
, " inherit=%d,", req
->inherit
);
402 fprintf( stderr
, " options=%d", req
->options
);
405 static void dump_dup_handle_reply( const struct dup_handle_request
*req
)
407 fprintf( stderr
, " handle=%d", req
->handle
);
410 static void dump_open_process_request( const struct open_process_request
*req
)
412 fprintf( stderr
, " pid=%p,", req
->pid
);
413 fprintf( stderr
, " access=%08x,", req
->access
);
414 fprintf( stderr
, " inherit=%d", req
->inherit
);
417 static void dump_open_process_reply( const struct open_process_request
*req
)
419 fprintf( stderr
, " handle=%d", req
->handle
);
422 static void dump_select_request( const struct select_request
*req
)
424 fprintf( stderr
, " count=%d,", req
->count
);
425 fprintf( stderr
, " flags=%d,", req
->flags
);
426 fprintf( stderr
, " timeout=%d,", req
->timeout
);
427 fprintf( stderr
, " handles=" );
428 dump_varargs_select_request( req
);
431 static void dump_select_reply( const struct select_request
*req
)
433 fprintf( stderr
, " signaled=%d", req
->signaled
);
436 static void dump_create_event_request( const struct create_event_request
*req
)
438 fprintf( stderr
, " manual_reset=%d,", req
->manual_reset
);
439 fprintf( stderr
, " initial_state=%d,", req
->initial_state
);
440 fprintf( stderr
, " inherit=%d,", req
->inherit
);
441 fprintf( stderr
, " name=" );
442 dump_unicode_string( req
->name
);
445 static void dump_create_event_reply( const struct create_event_request
*req
)
447 fprintf( stderr
, " handle=%d", req
->handle
);
450 static void dump_event_op_request( const struct event_op_request
*req
)
452 fprintf( stderr
, " handle=%d,", req
->handle
);
453 fprintf( stderr
, " op=%d", req
->op
);
456 static void dump_open_event_request( const struct open_event_request
*req
)
458 fprintf( stderr
, " access=%08x,", req
->access
);
459 fprintf( stderr
, " inherit=%d,", req
->inherit
);
460 fprintf( stderr
, " name=" );
461 dump_unicode_string( req
->name
);
464 static void dump_open_event_reply( const struct open_event_request
*req
)
466 fprintf( stderr
, " handle=%d", req
->handle
);
469 static void dump_create_mutex_request( const struct create_mutex_request
*req
)
471 fprintf( stderr
, " owned=%d,", req
->owned
);
472 fprintf( stderr
, " inherit=%d,", req
->inherit
);
473 fprintf( stderr
, " name=" );
474 dump_unicode_string( req
->name
);
477 static void dump_create_mutex_reply( const struct create_mutex_request
*req
)
479 fprintf( stderr
, " handle=%d", req
->handle
);
482 static void dump_release_mutex_request( const struct release_mutex_request
*req
)
484 fprintf( stderr
, " handle=%d", req
->handle
);
487 static void dump_open_mutex_request( const struct open_mutex_request
*req
)
489 fprintf( stderr
, " access=%08x,", req
->access
);
490 fprintf( stderr
, " inherit=%d,", req
->inherit
);
491 fprintf( stderr
, " name=" );
492 dump_unicode_string( req
->name
);
495 static void dump_open_mutex_reply( const struct open_mutex_request
*req
)
497 fprintf( stderr
, " handle=%d", req
->handle
);
500 static void dump_create_semaphore_request( const struct create_semaphore_request
*req
)
502 fprintf( stderr
, " initial=%08x,", req
->initial
);
503 fprintf( stderr
, " max=%08x,", req
->max
);
504 fprintf( stderr
, " inherit=%d,", req
->inherit
);
505 fprintf( stderr
, " name=" );
506 dump_unicode_string( req
->name
);
509 static void dump_create_semaphore_reply( const struct create_semaphore_request
*req
)
511 fprintf( stderr
, " handle=%d", req
->handle
);
514 static void dump_release_semaphore_request( const struct release_semaphore_request
*req
)
516 fprintf( stderr
, " handle=%d,", req
->handle
);
517 fprintf( stderr
, " count=%08x", req
->count
);
520 static void dump_release_semaphore_reply( const struct release_semaphore_request
*req
)
522 fprintf( stderr
, " prev_count=%08x", req
->prev_count
);
525 static void dump_open_semaphore_request( const struct open_semaphore_request
*req
)
527 fprintf( stderr
, " access=%08x,", req
->access
);
528 fprintf( stderr
, " inherit=%d,", req
->inherit
);
529 fprintf( stderr
, " name=" );
530 dump_unicode_string( req
->name
);
533 static void dump_open_semaphore_reply( const struct open_semaphore_request
*req
)
535 fprintf( stderr
, " handle=%d", req
->handle
);
538 static void dump_create_file_request( const struct create_file_request
*req
)
540 fprintf( stderr
, " access=%08x,", req
->access
);
541 fprintf( stderr
, " inherit=%d,", req
->inherit
);
542 fprintf( stderr
, " sharing=%08x,", req
->sharing
);
543 fprintf( stderr
, " create=%d,", req
->create
);
544 fprintf( stderr
, " attrs=%08x,", req
->attrs
);
545 fprintf( stderr
, " name=\"%s\"", req
->name
);
548 static void dump_create_file_reply( const struct create_file_request
*req
)
550 fprintf( stderr
, " handle=%d", req
->handle
);
553 static void dump_alloc_file_handle_request( const struct alloc_file_handle_request
*req
)
555 fprintf( stderr
, " access=%08x", req
->access
);
558 static void dump_alloc_file_handle_reply( const struct alloc_file_handle_request
*req
)
560 fprintf( stderr
, " handle=%d", req
->handle
);
563 static void dump_get_read_fd_request( const struct get_read_fd_request
*req
)
565 fprintf( stderr
, " handle=%d", req
->handle
);
568 static void dump_get_write_fd_request( const struct get_write_fd_request
*req
)
570 fprintf( stderr
, " handle=%d", req
->handle
);
573 static void dump_set_file_pointer_request( const struct set_file_pointer_request
*req
)
575 fprintf( stderr
, " handle=%d,", req
->handle
);
576 fprintf( stderr
, " low=%d,", req
->low
);
577 fprintf( stderr
, " high=%d,", req
->high
);
578 fprintf( stderr
, " whence=%d", req
->whence
);
581 static void dump_set_file_pointer_reply( const struct set_file_pointer_request
*req
)
583 fprintf( stderr
, " new_low=%d,", req
->new_low
);
584 fprintf( stderr
, " new_high=%d", req
->new_high
);
587 static void dump_truncate_file_request( const struct truncate_file_request
*req
)
589 fprintf( stderr
, " handle=%d", req
->handle
);
592 static void dump_set_file_time_request( const struct set_file_time_request
*req
)
594 fprintf( stderr
, " handle=%d,", req
->handle
);
595 fprintf( stderr
, " access_time=%ld,", req
->access_time
);
596 fprintf( stderr
, " write_time=%ld", req
->write_time
);
599 static void dump_flush_file_request( const struct flush_file_request
*req
)
601 fprintf( stderr
, " handle=%d", req
->handle
);
604 static void dump_get_file_info_request( const struct get_file_info_request
*req
)
606 fprintf( stderr
, " handle=%d", req
->handle
);
609 static void dump_get_file_info_reply( const struct get_file_info_request
*req
)
611 fprintf( stderr
, " type=%d,", req
->type
);
612 fprintf( stderr
, " attr=%d,", req
->attr
);
613 fprintf( stderr
, " access_time=%ld,", req
->access_time
);
614 fprintf( stderr
, " write_time=%ld,", req
->write_time
);
615 fprintf( stderr
, " size_high=%d,", req
->size_high
);
616 fprintf( stderr
, " size_low=%d,", req
->size_low
);
617 fprintf( stderr
, " links=%d,", req
->links
);
618 fprintf( stderr
, " index_high=%d,", req
->index_high
);
619 fprintf( stderr
, " index_low=%d,", req
->index_low
);
620 fprintf( stderr
, " serial=%08x", req
->serial
);
623 static void dump_lock_file_request( const struct lock_file_request
*req
)
625 fprintf( stderr
, " handle=%d,", req
->handle
);
626 fprintf( stderr
, " offset_low=%08x,", req
->offset_low
);
627 fprintf( stderr
, " offset_high=%08x,", req
->offset_high
);
628 fprintf( stderr
, " count_low=%08x,", req
->count_low
);
629 fprintf( stderr
, " count_high=%08x", req
->count_high
);
632 static void dump_unlock_file_request( const struct unlock_file_request
*req
)
634 fprintf( stderr
, " handle=%d,", req
->handle
);
635 fprintf( stderr
, " offset_low=%08x,", req
->offset_low
);
636 fprintf( stderr
, " offset_high=%08x,", req
->offset_high
);
637 fprintf( stderr
, " count_low=%08x,", req
->count_low
);
638 fprintf( stderr
, " count_high=%08x", req
->count_high
);
641 static void dump_create_pipe_request( const struct create_pipe_request
*req
)
643 fprintf( stderr
, " inherit=%d", req
->inherit
);
646 static void dump_create_pipe_reply( const struct create_pipe_request
*req
)
648 fprintf( stderr
, " handle_read=%d,", req
->handle_read
);
649 fprintf( stderr
, " handle_write=%d", req
->handle_write
);
652 static void dump_create_socket_request( const struct create_socket_request
*req
)
654 fprintf( stderr
, " access=%08x,", req
->access
);
655 fprintf( stderr
, " inherit=%d,", req
->inherit
);
656 fprintf( stderr
, " family=%d,", req
->family
);
657 fprintf( stderr
, " type=%d,", req
->type
);
658 fprintf( stderr
, " protocol=%d", req
->protocol
);
661 static void dump_create_socket_reply( const struct create_socket_request
*req
)
663 fprintf( stderr
, " handle=%d", req
->handle
);
666 static void dump_accept_socket_request( const struct accept_socket_request
*req
)
668 fprintf( stderr
, " lhandle=%d,", req
->lhandle
);
669 fprintf( stderr
, " access=%08x,", req
->access
);
670 fprintf( stderr
, " inherit=%d", req
->inherit
);
673 static void dump_accept_socket_reply( const struct accept_socket_request
*req
)
675 fprintf( stderr
, " handle=%d", req
->handle
);
678 static void dump_set_socket_event_request( const struct set_socket_event_request
*req
)
680 fprintf( stderr
, " handle=%d,", req
->handle
);
681 fprintf( stderr
, " mask=%08x,", req
->mask
);
682 fprintf( stderr
, " event=%d", req
->event
);
685 static void dump_get_socket_event_request( const struct get_socket_event_request
*req
)
687 fprintf( stderr
, " handle=%d,", req
->handle
);
688 fprintf( stderr
, " service=%d,", req
->service
);
689 fprintf( stderr
, " s_event=%d", req
->s_event
);
692 static void dump_get_socket_event_reply( const struct get_socket_event_request
*req
)
694 fprintf( stderr
, " mask=%08x,", req
->mask
);
695 fprintf( stderr
, " pmask=%08x,", req
->pmask
);
696 fprintf( stderr
, " state=%08x,", req
->state
);
697 fprintf( stderr
, " errors=" );
698 dump_varargs_get_socket_event_reply( req
);
701 static void dump_enable_socket_event_request( const struct enable_socket_event_request
*req
)
703 fprintf( stderr
, " handle=%d,", req
->handle
);
704 fprintf( stderr
, " mask=%08x,", req
->mask
);
705 fprintf( stderr
, " sstate=%08x,", req
->sstate
);
706 fprintf( stderr
, " cstate=%08x", req
->cstate
);
709 static void dump_alloc_console_request( const struct alloc_console_request
*req
)
711 fprintf( stderr
, " access=%08x,", req
->access
);
712 fprintf( stderr
, " inherit=%d", req
->inherit
);
715 static void dump_alloc_console_reply( const struct alloc_console_request
*req
)
717 fprintf( stderr
, " handle_in=%d,", req
->handle_in
);
718 fprintf( stderr
, " handle_out=%d", req
->handle_out
);
721 static void dump_free_console_request( const struct free_console_request
*req
)
723 fprintf( stderr
, " dummy=%d", req
->dummy
);
726 static void dump_open_console_request( const struct open_console_request
*req
)
728 fprintf( stderr
, " output=%d,", req
->output
);
729 fprintf( stderr
, " access=%08x,", req
->access
);
730 fprintf( stderr
, " inherit=%d", req
->inherit
);
733 static void dump_open_console_reply( const struct open_console_request
*req
)
735 fprintf( stderr
, " handle=%d", req
->handle
);
738 static void dump_set_console_fd_request( const struct set_console_fd_request
*req
)
740 fprintf( stderr
, " handle=%d,", req
->handle
);
741 fprintf( stderr
, " file_handle=%d,", req
->file_handle
);
742 fprintf( stderr
, " pid=%d", req
->pid
);
745 static void dump_get_console_mode_request( const struct get_console_mode_request
*req
)
747 fprintf( stderr
, " handle=%d", req
->handle
);
750 static void dump_get_console_mode_reply( const struct get_console_mode_request
*req
)
752 fprintf( stderr
, " mode=%d", req
->mode
);
755 static void dump_set_console_mode_request( const struct set_console_mode_request
*req
)
757 fprintf( stderr
, " handle=%d,", req
->handle
);
758 fprintf( stderr
, " mode=%d", req
->mode
);
761 static void dump_set_console_info_request( const struct set_console_info_request
*req
)
763 fprintf( stderr
, " handle=%d,", req
->handle
);
764 fprintf( stderr
, " mask=%d,", req
->mask
);
765 fprintf( stderr
, " cursor_size=%d,", req
->cursor_size
);
766 fprintf( stderr
, " cursor_visible=%d,", req
->cursor_visible
);
767 fprintf( stderr
, " title=\"%s\"", req
->title
);
770 static void dump_get_console_info_request( const struct get_console_info_request
*req
)
772 fprintf( stderr
, " handle=%d", req
->handle
);
775 static void dump_get_console_info_reply( const struct get_console_info_request
*req
)
777 fprintf( stderr
, " cursor_size=%d,", req
->cursor_size
);
778 fprintf( stderr
, " cursor_visible=%d,", req
->cursor_visible
);
779 fprintf( stderr
, " pid=%d,", req
->pid
);
780 fprintf( stderr
, " title=\"%s\"", req
->title
);
783 static void dump_write_console_input_request( const struct write_console_input_request
*req
)
785 fprintf( stderr
, " handle=%d,", req
->handle
);
786 fprintf( stderr
, " count=%d", req
->count
);
789 static void dump_write_console_input_reply( const struct write_console_input_request
*req
)
791 fprintf( stderr
, " written=%d", req
->written
);
794 static void dump_read_console_input_request( const struct read_console_input_request
*req
)
796 fprintf( stderr
, " handle=%d,", req
->handle
);
797 fprintf( stderr
, " count=%d,", req
->count
);
798 fprintf( stderr
, " flush=%d", req
->flush
);
801 static void dump_read_console_input_reply( const struct read_console_input_request
*req
)
803 fprintf( stderr
, " read=%d", req
->read
);
806 static void dump_create_change_notification_request( const struct create_change_notification_request
*req
)
808 fprintf( stderr
, " subtree=%d,", req
->subtree
);
809 fprintf( stderr
, " filter=%d", req
->filter
);
812 static void dump_create_change_notification_reply( const struct create_change_notification_request
*req
)
814 fprintf( stderr
, " handle=%d", req
->handle
);
817 static void dump_create_mapping_request( const struct create_mapping_request
*req
)
819 fprintf( stderr
, " size_high=%d,", req
->size_high
);
820 fprintf( stderr
, " size_low=%d,", req
->size_low
);
821 fprintf( stderr
, " protect=%d,", req
->protect
);
822 fprintf( stderr
, " inherit=%d,", req
->inherit
);
823 fprintf( stderr
, " file_handle=%d,", req
->file_handle
);
824 fprintf( stderr
, " name=" );
825 dump_unicode_string( req
->name
);
828 static void dump_create_mapping_reply( const struct create_mapping_request
*req
)
830 fprintf( stderr
, " handle=%d", req
->handle
);
833 static void dump_open_mapping_request( const struct open_mapping_request
*req
)
835 fprintf( stderr
, " access=%08x,", req
->access
);
836 fprintf( stderr
, " inherit=%d,", req
->inherit
);
837 fprintf( stderr
, " name=" );
838 dump_unicode_string( req
->name
);
841 static void dump_open_mapping_reply( const struct open_mapping_request
*req
)
843 fprintf( stderr
, " handle=%d", req
->handle
);
846 static void dump_get_mapping_info_request( const struct get_mapping_info_request
*req
)
848 fprintf( stderr
, " handle=%d", req
->handle
);
851 static void dump_get_mapping_info_reply( const struct get_mapping_info_request
*req
)
853 fprintf( stderr
, " size_high=%d,", req
->size_high
);
854 fprintf( stderr
, " size_low=%d,", req
->size_low
);
855 fprintf( stderr
, " protect=%d", req
->protect
);
858 static void dump_create_device_request( const struct create_device_request
*req
)
860 fprintf( stderr
, " access=%08x,", req
->access
);
861 fprintf( stderr
, " inherit=%d,", req
->inherit
);
862 fprintf( stderr
, " id=%d", req
->id
);
865 static void dump_create_device_reply( const struct create_device_request
*req
)
867 fprintf( stderr
, " handle=%d", req
->handle
);
870 static void dump_create_snapshot_request( const struct create_snapshot_request
*req
)
872 fprintf( stderr
, " inherit=%d,", req
->inherit
);
873 fprintf( stderr
, " flags=%d", req
->flags
);
876 static void dump_create_snapshot_reply( const struct create_snapshot_request
*req
)
878 fprintf( stderr
, " handle=%d", req
->handle
);
881 static void dump_next_process_request( const struct next_process_request
*req
)
883 fprintf( stderr
, " handle=%d,", req
->handle
);
884 fprintf( stderr
, " reset=%d", req
->reset
);
887 static void dump_next_process_reply( const struct next_process_request
*req
)
889 fprintf( stderr
, " pid=%p,", req
->pid
);
890 fprintf( stderr
, " threads=%d,", req
->threads
);
891 fprintf( stderr
, " priority=%d", req
->priority
);
894 static void dump_wait_debug_event_request( const struct wait_debug_event_request
*req
)
896 fprintf( stderr
, " timeout=%d", req
->timeout
);
899 static void dump_wait_debug_event_reply( const struct wait_debug_event_request
*req
)
901 fprintf( stderr
, " pid=%p,", req
->pid
);
902 fprintf( stderr
, " tid=%p,", req
->tid
);
903 fprintf( stderr
, " event=" );
904 dump_debug_event_t( &req
->event
);
907 static void dump_send_debug_event_request( const struct send_debug_event_request
*req
)
909 fprintf( stderr
, " event=" );
910 dump_debug_event_t( &req
->event
);
913 static void dump_send_debug_event_reply( const struct send_debug_event_request
*req
)
915 fprintf( stderr
, " status=%d", req
->status
);
918 static void dump_continue_debug_event_request( const struct continue_debug_event_request
*req
)
920 fprintf( stderr
, " pid=%p,", req
->pid
);
921 fprintf( stderr
, " tid=%p,", req
->tid
);
922 fprintf( stderr
, " status=%d", req
->status
);
925 static void dump_debug_process_request( const struct debug_process_request
*req
)
927 fprintf( stderr
, " pid=%p", req
->pid
);
930 static void dump_read_process_memory_request( const struct read_process_memory_request
*req
)
932 fprintf( stderr
, " handle=%d,", req
->handle
);
933 fprintf( stderr
, " addr=%p,", req
->addr
);
934 fprintf( stderr
, " len=%d", req
->len
);
937 static void dump_read_process_memory_reply( const struct read_process_memory_request
*req
)
939 fprintf( stderr
, " data=" );
940 dump_varargs_read_process_memory_reply( req
);
943 static void dump_write_process_memory_request( const struct write_process_memory_request
*req
)
945 fprintf( stderr
, " handle=%d,", req
->handle
);
946 fprintf( stderr
, " addr=%p,", req
->addr
);
947 fprintf( stderr
, " len=%d,", req
->len
);
948 fprintf( stderr
, " first_mask=%08x,", req
->first_mask
);
949 fprintf( stderr
, " last_mask=%08x,", req
->last_mask
);
950 fprintf( stderr
, " data=" );
951 dump_varargs_write_process_memory_request( req
);
954 static void dump_create_key_request( const struct create_key_request
*req
)
956 fprintf( stderr
, " parent=%d,", req
->parent
);
957 fprintf( stderr
, " access=%08x,", req
->access
);
958 fprintf( stderr
, " options=%08x,", req
->options
);
959 fprintf( stderr
, " modif=%ld,", req
->modif
);
960 fprintf( stderr
, " name=" );
961 dump_path_t( &req
->name
);
962 fprintf( stderr
, "," );
963 fprintf( stderr
, " class=" );
964 dump_unicode_string( req
->class );
967 static void dump_create_key_reply( const struct create_key_request
*req
)
969 fprintf( stderr
, " hkey=%d,", req
->hkey
);
970 fprintf( stderr
, " created=%d", req
->created
);
973 static void dump_open_key_request( const struct open_key_request
*req
)
975 fprintf( stderr
, " parent=%d,", req
->parent
);
976 fprintf( stderr
, " access=%08x,", req
->access
);
977 fprintf( stderr
, " name=" );
978 dump_path_t( &req
->name
);
981 static void dump_open_key_reply( const struct open_key_request
*req
)
983 fprintf( stderr
, " hkey=%d", req
->hkey
);
986 static void dump_delete_key_request( const struct delete_key_request
*req
)
988 fprintf( stderr
, " hkey=%d,", req
->hkey
);
989 fprintf( stderr
, " name=" );
990 dump_path_t( &req
->name
);
993 static void dump_close_key_request( const struct close_key_request
*req
)
995 fprintf( stderr
, " hkey=%d", req
->hkey
);
998 static void dump_enum_key_request( const struct enum_key_request
*req
)
1000 fprintf( stderr
, " hkey=%d,", req
->hkey
);
1001 fprintf( stderr
, " index=%d", req
->index
);
1004 static void dump_enum_key_reply( const struct enum_key_request
*req
)
1006 fprintf( stderr
, " modif=%ld,", req
->modif
);
1007 fprintf( stderr
, " name=" );
1008 dump_path_t( &req
->name
);
1009 fprintf( stderr
, "," );
1010 fprintf( stderr
, " class=" );
1011 dump_unicode_string( req
->class );
1014 static void dump_query_key_info_request( const struct query_key_info_request
*req
)
1016 fprintf( stderr
, " hkey=%d", req
->hkey
);
1019 static void dump_query_key_info_reply( const struct query_key_info_request
*req
)
1021 fprintf( stderr
, " subkeys=%d,", req
->subkeys
);
1022 fprintf( stderr
, " max_subkey=%d,", req
->max_subkey
);
1023 fprintf( stderr
, " max_class=%d,", req
->max_class
);
1024 fprintf( stderr
, " values=%d,", req
->values
);
1025 fprintf( stderr
, " max_value=%d,", req
->max_value
);
1026 fprintf( stderr
, " max_data=%d,", req
->max_data
);
1027 fprintf( stderr
, " modif=%ld,", req
->modif
);
1028 fprintf( stderr
, " name=" );
1029 dump_path_t( &req
->name
);
1030 fprintf( stderr
, "," );
1031 fprintf( stderr
, " class=" );
1032 dump_unicode_string( req
->class );
1035 static void dump_set_key_value_request( const struct set_key_value_request
*req
)
1037 fprintf( stderr
, " hkey=%d,", req
->hkey
);
1038 fprintf( stderr
, " type=%d,", req
->type
);
1039 fprintf( stderr
, " len=%d,", req
->len
);
1040 fprintf( stderr
, " name=" );
1041 dump_path_t( &req
->name
);
1042 fprintf( stderr
, "," );
1043 fprintf( stderr
, " data=" );
1044 dump_varargs_set_key_value_request( req
);
1047 static void dump_get_key_value_request( const struct get_key_value_request
*req
)
1049 fprintf( stderr
, " hkey=%d,", req
->hkey
);
1050 fprintf( stderr
, " name=" );
1051 dump_unicode_string( req
->name
);
1054 static void dump_get_key_value_reply( const struct get_key_value_request
*req
)
1056 fprintf( stderr
, " type=%d,", req
->type
);
1057 fprintf( stderr
, " len=%d,", req
->len
);
1058 fprintf( stderr
, " data=" );
1059 dump_varargs_get_key_value_reply( req
);
1062 static void dump_enum_key_value_request( const struct enum_key_value_request
*req
)
1064 fprintf( stderr
, " hkey=%d,", req
->hkey
);
1065 fprintf( stderr
, " index=%d", req
->index
);
1068 static void dump_enum_key_value_reply( const struct enum_key_value_request
*req
)
1070 fprintf( stderr
, " type=%d,", req
->type
);
1071 fprintf( stderr
, " len=%d,", req
->len
);
1072 fprintf( stderr
, " name=" );
1073 dump_path_t( &req
->name
);
1074 fprintf( stderr
, "," );
1075 fprintf( stderr
, " data=" );
1076 dump_varargs_enum_key_value_reply( req
);
1079 static void dump_delete_key_value_request( const struct delete_key_value_request
*req
)
1081 fprintf( stderr
, " hkey=%d,", req
->hkey
);
1082 fprintf( stderr
, " name=" );
1083 dump_path_t( &req
->name
);
1086 static void dump_load_registry_request( const struct load_registry_request
*req
)
1088 fprintf( stderr
, " hkey=%d,", req
->hkey
);
1089 fprintf( stderr
, " file=%d,", req
->file
);
1090 fprintf( stderr
, " name=" );
1091 dump_path_t( &req
->name
);
1094 static void dump_save_registry_request( const struct save_registry_request
*req
)
1096 fprintf( stderr
, " hkey=%d,", req
->hkey
);
1097 fprintf( stderr
, " file=%d", req
->file
);
1100 static void dump_set_registry_levels_request( const struct set_registry_levels_request
*req
)
1102 fprintf( stderr
, " current=%d,", req
->current
);
1103 fprintf( stderr
, " saving=%d,", req
->saving
);
1104 fprintf( stderr
, " version=%d", req
->version
);
1107 static void dump_create_timer_request( const struct create_timer_request
*req
)
1109 fprintf( stderr
, " inherit=%d,", req
->inherit
);
1110 fprintf( stderr
, " manual=%d,", req
->manual
);
1111 fprintf( stderr
, " name=" );
1112 dump_unicode_string( req
->name
);
1115 static void dump_create_timer_reply( const struct create_timer_request
*req
)
1117 fprintf( stderr
, " handle=%d", req
->handle
);
1120 static void dump_open_timer_request( const struct open_timer_request
*req
)
1122 fprintf( stderr
, " access=%08x,", req
->access
);
1123 fprintf( stderr
, " inherit=%d,", req
->inherit
);
1124 fprintf( stderr
, " name=" );
1125 dump_unicode_string( req
->name
);
1128 static void dump_open_timer_reply( const struct open_timer_request
*req
)
1130 fprintf( stderr
, " handle=%d", req
->handle
);
1133 static void dump_set_timer_request( const struct set_timer_request
*req
)
1135 fprintf( stderr
, " handle=%d,", req
->handle
);
1136 fprintf( stderr
, " sec=%d,", req
->sec
);
1137 fprintf( stderr
, " usec=%d,", req
->usec
);
1138 fprintf( stderr
, " period=%d,", req
->period
);
1139 fprintf( stderr
, " callback=%p,", req
->callback
);
1140 fprintf( stderr
, " arg=%p", req
->arg
);
1143 static void dump_cancel_timer_request( const struct cancel_timer_request
*req
)
1145 fprintf( stderr
, " handle=%d", req
->handle
);
1148 static void dump_get_thread_context_request( const struct get_thread_context_request
*req
)
1150 fprintf( stderr
, " handle=%d,", req
->handle
);
1151 fprintf( stderr
, " flags=%08x", req
->flags
);
1154 static void dump_get_thread_context_reply( const struct get_thread_context_request
*req
)
1156 fprintf( stderr
, " context=" );
1157 dump_context( &req
->context
);
1160 static void dump_set_thread_context_request( const struct set_thread_context_request
*req
)
1162 fprintf( stderr
, " handle=%d,", req
->handle
);
1163 fprintf( stderr
, " flags=%08x,", req
->flags
);
1164 fprintf( stderr
, " context=" );
1165 dump_context( &req
->context
);
1168 static const dump_func req_dumpers
[REQ_NB_REQUESTS
] = {
1169 (dump_func
)dump_new_process_request
,
1170 (dump_func
)dump_new_thread_request
,
1171 (dump_func
)dump_set_debug_request
,
1172 (dump_func
)dump_init_process_request
,
1173 (dump_func
)dump_init_process_done_request
,
1174 (dump_func
)dump_init_thread_request
,
1175 (dump_func
)dump_get_thread_buffer_request
,
1176 (dump_func
)dump_terminate_process_request
,
1177 (dump_func
)dump_terminate_thread_request
,
1178 (dump_func
)dump_get_process_info_request
,
1179 (dump_func
)dump_set_process_info_request
,
1180 (dump_func
)dump_get_thread_info_request
,
1181 (dump_func
)dump_set_thread_info_request
,
1182 (dump_func
)dump_suspend_thread_request
,
1183 (dump_func
)dump_resume_thread_request
,
1184 (dump_func
)dump_debugger_request
,
1185 (dump_func
)dump_queue_apc_request
,
1186 (dump_func
)dump_get_apcs_request
,
1187 (dump_func
)dump_close_handle_request
,
1188 (dump_func
)dump_get_handle_info_request
,
1189 (dump_func
)dump_set_handle_info_request
,
1190 (dump_func
)dump_dup_handle_request
,
1191 (dump_func
)dump_open_process_request
,
1192 (dump_func
)dump_select_request
,
1193 (dump_func
)dump_create_event_request
,
1194 (dump_func
)dump_event_op_request
,
1195 (dump_func
)dump_open_event_request
,
1196 (dump_func
)dump_create_mutex_request
,
1197 (dump_func
)dump_release_mutex_request
,
1198 (dump_func
)dump_open_mutex_request
,
1199 (dump_func
)dump_create_semaphore_request
,
1200 (dump_func
)dump_release_semaphore_request
,
1201 (dump_func
)dump_open_semaphore_request
,
1202 (dump_func
)dump_create_file_request
,
1203 (dump_func
)dump_alloc_file_handle_request
,
1204 (dump_func
)dump_get_read_fd_request
,
1205 (dump_func
)dump_get_write_fd_request
,
1206 (dump_func
)dump_set_file_pointer_request
,
1207 (dump_func
)dump_truncate_file_request
,
1208 (dump_func
)dump_set_file_time_request
,
1209 (dump_func
)dump_flush_file_request
,
1210 (dump_func
)dump_get_file_info_request
,
1211 (dump_func
)dump_lock_file_request
,
1212 (dump_func
)dump_unlock_file_request
,
1213 (dump_func
)dump_create_pipe_request
,
1214 (dump_func
)dump_create_socket_request
,
1215 (dump_func
)dump_accept_socket_request
,
1216 (dump_func
)dump_set_socket_event_request
,
1217 (dump_func
)dump_get_socket_event_request
,
1218 (dump_func
)dump_enable_socket_event_request
,
1219 (dump_func
)dump_alloc_console_request
,
1220 (dump_func
)dump_free_console_request
,
1221 (dump_func
)dump_open_console_request
,
1222 (dump_func
)dump_set_console_fd_request
,
1223 (dump_func
)dump_get_console_mode_request
,
1224 (dump_func
)dump_set_console_mode_request
,
1225 (dump_func
)dump_set_console_info_request
,
1226 (dump_func
)dump_get_console_info_request
,
1227 (dump_func
)dump_write_console_input_request
,
1228 (dump_func
)dump_read_console_input_request
,
1229 (dump_func
)dump_create_change_notification_request
,
1230 (dump_func
)dump_create_mapping_request
,
1231 (dump_func
)dump_open_mapping_request
,
1232 (dump_func
)dump_get_mapping_info_request
,
1233 (dump_func
)dump_create_device_request
,
1234 (dump_func
)dump_create_snapshot_request
,
1235 (dump_func
)dump_next_process_request
,
1236 (dump_func
)dump_wait_debug_event_request
,
1237 (dump_func
)dump_send_debug_event_request
,
1238 (dump_func
)dump_continue_debug_event_request
,
1239 (dump_func
)dump_debug_process_request
,
1240 (dump_func
)dump_read_process_memory_request
,
1241 (dump_func
)dump_write_process_memory_request
,
1242 (dump_func
)dump_create_key_request
,
1243 (dump_func
)dump_open_key_request
,
1244 (dump_func
)dump_delete_key_request
,
1245 (dump_func
)dump_close_key_request
,
1246 (dump_func
)dump_enum_key_request
,
1247 (dump_func
)dump_query_key_info_request
,
1248 (dump_func
)dump_set_key_value_request
,
1249 (dump_func
)dump_get_key_value_request
,
1250 (dump_func
)dump_enum_key_value_request
,
1251 (dump_func
)dump_delete_key_value_request
,
1252 (dump_func
)dump_load_registry_request
,
1253 (dump_func
)dump_save_registry_request
,
1254 (dump_func
)dump_set_registry_levels_request
,
1255 (dump_func
)dump_create_timer_request
,
1256 (dump_func
)dump_open_timer_request
,
1257 (dump_func
)dump_set_timer_request
,
1258 (dump_func
)dump_cancel_timer_request
,
1259 (dump_func
)dump_get_thread_context_request
,
1260 (dump_func
)dump_set_thread_context_request
,
1263 static const dump_func reply_dumpers
[REQ_NB_REQUESTS
] = {
1264 (dump_func
)dump_new_process_reply
,
1265 (dump_func
)dump_new_thread_reply
,
1267 (dump_func
)dump_init_process_reply
,
1269 (dump_func
)dump_init_thread_reply
,
1273 (dump_func
)dump_get_process_info_reply
,
1275 (dump_func
)dump_get_thread_info_reply
,
1277 (dump_func
)dump_suspend_thread_reply
,
1278 (dump_func
)dump_resume_thread_reply
,
1281 (dump_func
)dump_get_apcs_reply
,
1283 (dump_func
)dump_get_handle_info_reply
,
1285 (dump_func
)dump_dup_handle_reply
,
1286 (dump_func
)dump_open_process_reply
,
1287 (dump_func
)dump_select_reply
,
1288 (dump_func
)dump_create_event_reply
,
1290 (dump_func
)dump_open_event_reply
,
1291 (dump_func
)dump_create_mutex_reply
,
1293 (dump_func
)dump_open_mutex_reply
,
1294 (dump_func
)dump_create_semaphore_reply
,
1295 (dump_func
)dump_release_semaphore_reply
,
1296 (dump_func
)dump_open_semaphore_reply
,
1297 (dump_func
)dump_create_file_reply
,
1298 (dump_func
)dump_alloc_file_handle_reply
,
1301 (dump_func
)dump_set_file_pointer_reply
,
1305 (dump_func
)dump_get_file_info_reply
,
1308 (dump_func
)dump_create_pipe_reply
,
1309 (dump_func
)dump_create_socket_reply
,
1310 (dump_func
)dump_accept_socket_reply
,
1312 (dump_func
)dump_get_socket_event_reply
,
1314 (dump_func
)dump_alloc_console_reply
,
1316 (dump_func
)dump_open_console_reply
,
1318 (dump_func
)dump_get_console_mode_reply
,
1321 (dump_func
)dump_get_console_info_reply
,
1322 (dump_func
)dump_write_console_input_reply
,
1323 (dump_func
)dump_read_console_input_reply
,
1324 (dump_func
)dump_create_change_notification_reply
,
1325 (dump_func
)dump_create_mapping_reply
,
1326 (dump_func
)dump_open_mapping_reply
,
1327 (dump_func
)dump_get_mapping_info_reply
,
1328 (dump_func
)dump_create_device_reply
,
1329 (dump_func
)dump_create_snapshot_reply
,
1330 (dump_func
)dump_next_process_reply
,
1331 (dump_func
)dump_wait_debug_event_reply
,
1332 (dump_func
)dump_send_debug_event_reply
,
1335 (dump_func
)dump_read_process_memory_reply
,
1337 (dump_func
)dump_create_key_reply
,
1338 (dump_func
)dump_open_key_reply
,
1341 (dump_func
)dump_enum_key_reply
,
1342 (dump_func
)dump_query_key_info_reply
,
1344 (dump_func
)dump_get_key_value_reply
,
1345 (dump_func
)dump_enum_key_value_reply
,
1350 (dump_func
)dump_create_timer_reply
,
1351 (dump_func
)dump_open_timer_reply
,
1354 (dump_func
)dump_get_thread_context_reply
,
1358 static const char * const req_names
[REQ_NB_REQUESTS
] = {
1363 "init_process_done",
1365 "get_thread_buffer",
1366 "terminate_process",
1390 "release_semaphore",
1393 "alloc_file_handle",
1408 "enable_socket_event",
1417 "write_console_input",
1418 "read_console_input",
1419 "create_change_notification",
1428 "continue_debug_event",
1430 "read_process_memory",
1431 "write_process_memory",
1444 "set_registry_levels",
1449 "get_thread_context",
1450 "set_thread_context",
1453 /* ### make_requests end ### */
1454 /* Everything above this line is generated automatically by tools/make_requests */
1456 void trace_request( enum request req
, int fd
)
1458 current
->last_req
= req
;
1459 if (req
< REQ_NB_REQUESTS
)
1461 fprintf( stderr
, "%08x: %s(", (unsigned int)current
, req_names
[req
] );
1462 req_dumpers
[req
]( current
->buffer
);
1465 fprintf( stderr
, "%08x: %d(", (unsigned int)current
, req
);
1466 if (fd
!= -1) fprintf( stderr
, " ) fd=%d\n", fd
);
1467 else fprintf( stderr
, " )\n" );
1470 void trace_kill( struct thread
*thread
)
1472 fprintf( stderr
,"%08x: *killed* exit_code=%d\n",
1473 (unsigned int)thread
, thread
->exit_code
);
1476 void trace_reply( struct thread
*thread
)
1478 fprintf( stderr
, "%08x: %s() = %d",
1479 (unsigned int)thread
, req_names
[thread
->last_req
], thread
->error
);
1480 if (reply_dumpers
[thread
->last_req
])
1482 fprintf( stderr
, " {" );
1483 reply_dumpers
[thread
->last_req
]( thread
->buffer
);
1484 fprintf( stderr
, " }" );
1486 if (thread
->pass_fd
!= -1) fprintf( stderr
, " fd=%d\n", thread
->pass_fd
);
1487 else fprintf( stderr
, "\n" );