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_string( const void *req
, const char *str
)
54 int len
= get_req_strlen( req
, str
);
55 fprintf( stderr
, "\"%.*s\"", len
, str
);
58 static void dump_unicode_string( const void *req
, const WCHAR
*str
)
60 size_t len
= get_req_strlenW( req
, str
);
61 fprintf( stderr
, "L\"" );
62 dump_strW( str
, len
, stderr
, "\"\"" );
63 fputc( '\"', stderr
);
66 static void dump_path_t( const void *req
, const path_t
*path
)
68 dump_unicode_string( req
, *path
);
71 static void dump_context( const void *req
, const CONTEXT
*context
)
74 fprintf( stderr
, "{flags=%08lx,eax=%08lx,ebx=%08lx,ecx=%08lx,edx=%08lx,esi=%08lx,edi=%08lx,"
75 "ebp=%08lx,eip=%08lx,esp=%08lx,eflags=%08lx,cs=%04lx,ds=%04lx,es=%04lx,"
76 "fs=%04lx,gs=%04lx,dr0=%08lx,dr1=%08lx,dr2=%08lx,dr3=%08lx,dr6=%08lx,dr7=%08lx,",
77 context
->ContextFlags
, context
->Eax
, context
->Ebx
, context
->Ecx
, context
->Edx
,
78 context
->Esi
, context
->Edi
, context
->Ebp
, context
->Eip
, context
->Esp
, context
->EFlags
,
79 context
->SegCs
, context
->SegDs
, context
->SegEs
, context
->SegFs
, context
->SegGs
,
80 context
->Dr0
, context
->Dr1
, context
->Dr2
, context
->Dr3
, context
->Dr6
, context
->Dr7
);
81 fprintf( stderr
, "float=" );
82 dump_uints( (int *)&context
->FloatSave
, sizeof(context
->FloatSave
) / sizeof(int) );
83 fprintf( stderr
, "}" );
85 dump_uints( (int *)context
, sizeof(*context
) / sizeof(int) );
89 static void dump_exc_record( const void *req
, const EXCEPTION_RECORD
*rec
)
92 fprintf( stderr
, "{code=%lx,flags=%lx,rec=%p,addr=%p,params={",
93 rec
->ExceptionCode
, rec
->ExceptionFlags
, rec
->ExceptionRecord
,
94 rec
->ExceptionAddress
);
95 for (i
= 0; i
< rec
->NumberParameters
; i
++)
97 if (i
) fputc( ',', stderr
);
98 fprintf( stderr
, "%lx", rec
->ExceptionInformation
[i
] );
100 fputc( '}', stderr
);
103 static void dump_debug_event_t( const void *req
, const debug_event_t
*event
)
107 case EXCEPTION_DEBUG_EVENT
:
108 fprintf( stderr
, "{exception," );
109 dump_exc_record( req
, &event
->info
.exception
.record
);
110 fprintf( stderr
, ",first=%d}", event
->info
.exception
.first
);
112 case CREATE_THREAD_DEBUG_EVENT
:
113 fprintf( stderr
, "{create_thread,thread=%d,teb=%p,start=%p}",
114 event
->info
.create_thread
.handle
, event
->info
.create_thread
.teb
,
115 event
->info
.create_thread
.start
);
117 case CREATE_PROCESS_DEBUG_EVENT
:
118 fprintf( stderr
, "{create_process,file=%d,process=%d,thread=%d,base=%p,offset=%d,"
119 "size=%d,teb=%p,start=%p,name=%p,unicode=%d}",
120 event
->info
.create_process
.file
, event
->info
.create_process
.process
,
121 event
->info
.create_process
.thread
, event
->info
.create_process
.base
,
122 event
->info
.create_process
.dbg_offset
, event
->info
.create_process
.dbg_size
,
123 event
->info
.create_process
.teb
, event
->info
.create_process
.start
,
124 event
->info
.create_process
.name
, event
->info
.create_process
.unicode
);
126 case EXIT_THREAD_DEBUG_EVENT
:
127 fprintf( stderr
, "{exit_thread,code=%d}", event
->info
.exit
.exit_code
);
129 case EXIT_PROCESS_DEBUG_EVENT
:
130 fprintf( stderr
, "{exit_process,code=%d}", event
->info
.exit
.exit_code
);
132 case LOAD_DLL_DEBUG_EVENT
:
133 fprintf( stderr
, "{load_dll,file=%d,base=%p,offset=%d,size=%d,name=%p,unicode=%d}",
134 event
->info
.load_dll
.handle
, event
->info
.load_dll
.base
,
135 event
->info
.load_dll
.dbg_offset
, event
->info
.load_dll
.dbg_size
,
136 event
->info
.load_dll
.name
, event
->info
.load_dll
.unicode
);
138 case UNLOAD_DLL_DEBUG_EVENT
:
139 fprintf( stderr
, "{unload_dll,base=%p}", event
->info
.unload_dll
.base
);
141 case OUTPUT_DEBUG_STRING_EVENT
:
142 fprintf( stderr
, "{output_string,data=%p,unicode=%d,len=%d}",
143 event
->info
.output_string
.string
, event
->info
.output_string
.unicode
,
144 event
->info
.output_string
.length
);
147 fprintf( stderr
, "{rip,err=%d,type=%d}",
148 event
->info
.rip_info
.error
, event
->info
.rip_info
.type
);
150 case 0: /* zero is the code returned on timeouts */
151 fprintf( stderr
, "{}" );
154 fprintf( stderr
, "{code=??? (%d)}", event
->code
);
160 /* dumping for functions for requests that have a variable part */
162 static void dump_varargs_select_request( const struct select_request
*req
)
164 int count
= min( req
->count
, get_req_size( req
, req
->handles
, sizeof(int) ));
165 dump_ints( req
->handles
, count
);
168 static void dump_varargs_get_apcs_reply( const struct get_apcs_request
*req
)
171 for (i
= 0; i
< 2 * req
->count
; i
++)
172 fprintf( stderr
, "%c%p", i
? ',' : '{', req
->apcs
[i
] );
173 fprintf( stderr
, "}" );
176 static void dump_varargs_get_socket_event_reply( const struct get_socket_event_request
*req
)
178 dump_ints( req
->errors
, FD_MAX_EVENTS
);
181 static void dump_varargs_read_process_memory_reply( const struct read_process_memory_request
*req
)
183 int count
= min( req
->len
, get_req_size( req
, req
->data
, sizeof(int) ));
184 dump_bytes( (unsigned char *)req
->data
, count
* sizeof(int) );
187 static void dump_varargs_write_process_memory_request( const struct write_process_memory_request
*req
)
189 int count
= min( req
->len
, get_req_size( req
, req
->data
, sizeof(int) ));
190 dump_bytes( (unsigned char *)req
->data
, count
* sizeof(int) );
193 static void dump_varargs_set_key_value_request( const struct set_key_value_request
*req
)
195 int count
= min( req
->len
, get_req_size( req
, req
->data
, 1 ));
196 dump_bytes( req
->data
, count
);
199 static void dump_varargs_get_key_value_reply( const struct get_key_value_request
*req
)
201 int count
= min( req
->len
- req
->offset
, get_req_size( req
, req
->data
, 1 ));
202 dump_bytes( req
->data
, count
);
205 static void dump_varargs_enum_key_value_reply( const struct enum_key_value_request
*req
)
207 int count
= min( req
->len
- req
->offset
, get_req_size( req
, req
->data
, 1 ));
208 dump_bytes( req
->data
, count
);
211 typedef void (*dump_func
)( const void *req
);
213 /* Everything below this line is generated automatically by tools/make_requests */
214 /* ### make_requests begin ### */
216 static void dump_new_process_request( const struct new_process_request
*req
)
218 fprintf( stderr
, " inherit_all=%d,", req
->inherit_all
);
219 fprintf( stderr
, " create_flags=%d,", req
->create_flags
);
220 fprintf( stderr
, " start_flags=%d,", req
->start_flags
);
221 fprintf( stderr
, " exe_file=%d,", req
->exe_file
);
222 fprintf( stderr
, " hstdin=%d,", req
->hstdin
);
223 fprintf( stderr
, " hstdout=%d,", req
->hstdout
);
224 fprintf( stderr
, " hstderr=%d,", req
->hstderr
);
225 fprintf( stderr
, " cmd_show=%d,", req
->cmd_show
);
226 fprintf( stderr
, " alloc_fd=%d,", req
->alloc_fd
);
227 fprintf( stderr
, " filename=" );
228 dump_string( req
, req
->filename
);
231 static void dump_wait_process_request( const struct wait_process_request
*req
)
233 fprintf( stderr
, " pinherit=%d,", req
->pinherit
);
234 fprintf( stderr
, " tinherit=%d,", req
->tinherit
);
235 fprintf( stderr
, " timeout=%d,", req
->timeout
);
236 fprintf( stderr
, " cancel=%d", req
->cancel
);
239 static void dump_wait_process_reply( const struct wait_process_request
*req
)
241 fprintf( stderr
, " pid=%p,", req
->pid
);
242 fprintf( stderr
, " phandle=%d,", req
->phandle
);
243 fprintf( stderr
, " tid=%p,", req
->tid
);
244 fprintf( stderr
, " thandle=%d,", req
->thandle
);
245 fprintf( stderr
, " event=%d", req
->event
);
248 static void dump_new_thread_request( const struct new_thread_request
*req
)
250 fprintf( stderr
, " suspend=%d,", req
->suspend
);
251 fprintf( stderr
, " inherit=%d", req
->inherit
);
254 static void dump_new_thread_reply( const struct new_thread_request
*req
)
256 fprintf( stderr
, " tid=%p,", req
->tid
);
257 fprintf( stderr
, " handle=%d", req
->handle
);
260 static void dump_boot_done_request( const struct boot_done_request
*req
)
262 fprintf( stderr
, " debug_level=%d", req
->debug_level
);
265 static void dump_init_process_request( const struct init_process_request
*req
)
267 fprintf( stderr
, " ldt_copy=%p,", req
->ldt_copy
);
268 fprintf( stderr
, " ldt_flags=%p,", req
->ldt_flags
);
269 fprintf( stderr
, " ppid=%d", req
->ppid
);
272 static void dump_init_process_reply( const struct init_process_request
*req
)
274 fprintf( stderr
, " start_flags=%d,", req
->start_flags
);
275 fprintf( stderr
, " exe_file=%d,", req
->exe_file
);
276 fprintf( stderr
, " hstdin=%d,", req
->hstdin
);
277 fprintf( stderr
, " hstdout=%d,", req
->hstdout
);
278 fprintf( stderr
, " hstderr=%d,", req
->hstderr
);
279 fprintf( stderr
, " cmd_show=%d,", req
->cmd_show
);
280 fprintf( stderr
, " filename=" );
281 dump_string( req
, req
->filename
);
284 static void dump_init_process_done_request( const struct init_process_done_request
*req
)
286 fprintf( stderr
, " module=%p,", req
->module
);
287 fprintf( stderr
, " entry=%p,", req
->entry
);
288 fprintf( stderr
, " name=%p,", req
->name
);
289 fprintf( stderr
, " gui=%d", req
->gui
);
292 static void dump_init_process_done_reply( const struct init_process_done_request
*req
)
294 fprintf( stderr
, " debugged=%d", req
->debugged
);
297 static void dump_init_thread_request( const struct init_thread_request
*req
)
299 fprintf( stderr
, " unix_pid=%d,", req
->unix_pid
);
300 fprintf( stderr
, " teb=%p,", req
->teb
);
301 fprintf( stderr
, " entry=%p", req
->entry
);
304 static void dump_get_thread_buffer_request( const struct get_thread_buffer_request
*req
)
308 static void dump_get_thread_buffer_reply( const struct get_thread_buffer_request
*req
)
310 fprintf( stderr
, " pid=%p,", req
->pid
);
311 fprintf( stderr
, " tid=%p,", req
->tid
);
312 fprintf( stderr
, " boot=%d,", req
->boot
);
313 fprintf( stderr
, " version=%d", req
->version
);
316 static void dump_terminate_process_request( const struct terminate_process_request
*req
)
318 fprintf( stderr
, " handle=%d,", req
->handle
);
319 fprintf( stderr
, " exit_code=%d", req
->exit_code
);
322 static void dump_terminate_process_reply( const struct terminate_process_request
*req
)
324 fprintf( stderr
, " self=%d", req
->self
);
327 static void dump_terminate_thread_request( const struct terminate_thread_request
*req
)
329 fprintf( stderr
, " handle=%d,", req
->handle
);
330 fprintf( stderr
, " exit_code=%d", req
->exit_code
);
333 static void dump_terminate_thread_reply( const struct terminate_thread_request
*req
)
335 fprintf( stderr
, " self=%d,", req
->self
);
336 fprintf( stderr
, " last=%d", req
->last
);
339 static void dump_get_process_info_request( const struct get_process_info_request
*req
)
341 fprintf( stderr
, " handle=%d", req
->handle
);
344 static void dump_get_process_info_reply( const struct get_process_info_request
*req
)
346 fprintf( stderr
, " pid=%p,", req
->pid
);
347 fprintf( stderr
, " debugged=%d,", req
->debugged
);
348 fprintf( stderr
, " exit_code=%d,", req
->exit_code
);
349 fprintf( stderr
, " priority=%d,", req
->priority
);
350 fprintf( stderr
, " process_affinity=%d,", req
->process_affinity
);
351 fprintf( stderr
, " system_affinity=%d", req
->system_affinity
);
354 static void dump_set_process_info_request( const struct set_process_info_request
*req
)
356 fprintf( stderr
, " handle=%d,", req
->handle
);
357 fprintf( stderr
, " mask=%d,", req
->mask
);
358 fprintf( stderr
, " priority=%d,", req
->priority
);
359 fprintf( stderr
, " affinity=%d", req
->affinity
);
362 static void dump_get_thread_info_request( const struct get_thread_info_request
*req
)
364 fprintf( stderr
, " handle=%d,", req
->handle
);
365 fprintf( stderr
, " tid_in=%p", req
->tid_in
);
368 static void dump_get_thread_info_reply( const struct get_thread_info_request
*req
)
370 fprintf( stderr
, " tid=%p,", req
->tid
);
371 fprintf( stderr
, " teb=%p,", req
->teb
);
372 fprintf( stderr
, " exit_code=%d,", req
->exit_code
);
373 fprintf( stderr
, " priority=%d", req
->priority
);
376 static void dump_set_thread_info_request( const struct set_thread_info_request
*req
)
378 fprintf( stderr
, " handle=%d,", req
->handle
);
379 fprintf( stderr
, " mask=%d,", req
->mask
);
380 fprintf( stderr
, " priority=%d,", req
->priority
);
381 fprintf( stderr
, " affinity=%d", req
->affinity
);
384 static void dump_suspend_thread_request( const struct suspend_thread_request
*req
)
386 fprintf( stderr
, " handle=%d", req
->handle
);
389 static void dump_suspend_thread_reply( const struct suspend_thread_request
*req
)
391 fprintf( stderr
, " count=%d", req
->count
);
394 static void dump_resume_thread_request( const struct resume_thread_request
*req
)
396 fprintf( stderr
, " handle=%d", req
->handle
);
399 static void dump_resume_thread_reply( const struct resume_thread_request
*req
)
401 fprintf( stderr
, " count=%d", req
->count
);
404 static void dump_load_dll_request( const struct load_dll_request
*req
)
406 fprintf( stderr
, " handle=%d,", req
->handle
);
407 fprintf( stderr
, " base=%p,", req
->base
);
408 fprintf( stderr
, " dbg_offset=%d,", req
->dbg_offset
);
409 fprintf( stderr
, " dbg_size=%d,", req
->dbg_size
);
410 fprintf( stderr
, " name=%p", req
->name
);
413 static void dump_unload_dll_request( const struct unload_dll_request
*req
)
415 fprintf( stderr
, " base=%p", req
->base
);
418 static void dump_queue_apc_request( const struct queue_apc_request
*req
)
420 fprintf( stderr
, " handle=%d,", req
->handle
);
421 fprintf( stderr
, " func=%p,", req
->func
);
422 fprintf( stderr
, " param=%p", req
->param
);
425 static void dump_get_apcs_request( const struct get_apcs_request
*req
)
429 static void dump_get_apcs_reply( const struct get_apcs_request
*req
)
431 fprintf( stderr
, " count=%d,", req
->count
);
432 fprintf( stderr
, " apcs=" );
433 dump_varargs_get_apcs_reply( req
);
436 static void dump_close_handle_request( const struct close_handle_request
*req
)
438 fprintf( stderr
, " handle=%d", req
->handle
);
441 static void dump_get_handle_info_request( const struct get_handle_info_request
*req
)
443 fprintf( stderr
, " handle=%d", req
->handle
);
446 static void dump_get_handle_info_reply( const struct get_handle_info_request
*req
)
448 fprintf( stderr
, " flags=%d", req
->flags
);
451 static void dump_set_handle_info_request( const struct set_handle_info_request
*req
)
453 fprintf( stderr
, " handle=%d,", req
->handle
);
454 fprintf( stderr
, " flags=%d,", req
->flags
);
455 fprintf( stderr
, " mask=%d", req
->mask
);
458 static void dump_dup_handle_request( const struct dup_handle_request
*req
)
460 fprintf( stderr
, " src_process=%d,", req
->src_process
);
461 fprintf( stderr
, " src_handle=%d,", req
->src_handle
);
462 fprintf( stderr
, " dst_process=%d,", req
->dst_process
);
463 fprintf( stderr
, " access=%08x,", req
->access
);
464 fprintf( stderr
, " inherit=%d,", req
->inherit
);
465 fprintf( stderr
, " options=%d", req
->options
);
468 static void dump_dup_handle_reply( const struct dup_handle_request
*req
)
470 fprintf( stderr
, " handle=%d", req
->handle
);
473 static void dump_open_process_request( const struct open_process_request
*req
)
475 fprintf( stderr
, " pid=%p,", req
->pid
);
476 fprintf( stderr
, " access=%08x,", req
->access
);
477 fprintf( stderr
, " inherit=%d", req
->inherit
);
480 static void dump_open_process_reply( const struct open_process_request
*req
)
482 fprintf( stderr
, " handle=%d", req
->handle
);
485 static void dump_select_request( const struct select_request
*req
)
487 fprintf( stderr
, " count=%d,", req
->count
);
488 fprintf( stderr
, " flags=%d,", req
->flags
);
489 fprintf( stderr
, " timeout=%d,", req
->timeout
);
490 fprintf( stderr
, " handles=" );
491 dump_varargs_select_request( req
);
494 static void dump_select_reply( const struct select_request
*req
)
496 fprintf( stderr
, " signaled=%d", req
->signaled
);
499 static void dump_create_event_request( const struct create_event_request
*req
)
501 fprintf( stderr
, " manual_reset=%d,", req
->manual_reset
);
502 fprintf( stderr
, " initial_state=%d,", req
->initial_state
);
503 fprintf( stderr
, " inherit=%d,", req
->inherit
);
504 fprintf( stderr
, " name=" );
505 dump_unicode_string( req
, req
->name
);
508 static void dump_create_event_reply( const struct create_event_request
*req
)
510 fprintf( stderr
, " handle=%d", req
->handle
);
513 static void dump_event_op_request( const struct event_op_request
*req
)
515 fprintf( stderr
, " handle=%d,", req
->handle
);
516 fprintf( stderr
, " op=%d", req
->op
);
519 static void dump_open_event_request( const struct open_event_request
*req
)
521 fprintf( stderr
, " access=%08x,", req
->access
);
522 fprintf( stderr
, " inherit=%d,", req
->inherit
);
523 fprintf( stderr
, " name=" );
524 dump_unicode_string( req
, req
->name
);
527 static void dump_open_event_reply( const struct open_event_request
*req
)
529 fprintf( stderr
, " handle=%d", req
->handle
);
532 static void dump_create_mutex_request( const struct create_mutex_request
*req
)
534 fprintf( stderr
, " owned=%d,", req
->owned
);
535 fprintf( stderr
, " inherit=%d,", req
->inherit
);
536 fprintf( stderr
, " name=" );
537 dump_unicode_string( req
, req
->name
);
540 static void dump_create_mutex_reply( const struct create_mutex_request
*req
)
542 fprintf( stderr
, " handle=%d", req
->handle
);
545 static void dump_release_mutex_request( const struct release_mutex_request
*req
)
547 fprintf( stderr
, " handle=%d", req
->handle
);
550 static void dump_open_mutex_request( const struct open_mutex_request
*req
)
552 fprintf( stderr
, " access=%08x,", req
->access
);
553 fprintf( stderr
, " inherit=%d,", req
->inherit
);
554 fprintf( stderr
, " name=" );
555 dump_unicode_string( req
, req
->name
);
558 static void dump_open_mutex_reply( const struct open_mutex_request
*req
)
560 fprintf( stderr
, " handle=%d", req
->handle
);
563 static void dump_create_semaphore_request( const struct create_semaphore_request
*req
)
565 fprintf( stderr
, " initial=%08x,", req
->initial
);
566 fprintf( stderr
, " max=%08x,", req
->max
);
567 fprintf( stderr
, " inherit=%d,", req
->inherit
);
568 fprintf( stderr
, " name=" );
569 dump_unicode_string( req
, req
->name
);
572 static void dump_create_semaphore_reply( const struct create_semaphore_request
*req
)
574 fprintf( stderr
, " handle=%d", req
->handle
);
577 static void dump_release_semaphore_request( const struct release_semaphore_request
*req
)
579 fprintf( stderr
, " handle=%d,", req
->handle
);
580 fprintf( stderr
, " count=%08x", req
->count
);
583 static void dump_release_semaphore_reply( const struct release_semaphore_request
*req
)
585 fprintf( stderr
, " prev_count=%08x", req
->prev_count
);
588 static void dump_open_semaphore_request( const struct open_semaphore_request
*req
)
590 fprintf( stderr
, " access=%08x,", req
->access
);
591 fprintf( stderr
, " inherit=%d,", req
->inherit
);
592 fprintf( stderr
, " name=" );
593 dump_unicode_string( req
, req
->name
);
596 static void dump_open_semaphore_reply( const struct open_semaphore_request
*req
)
598 fprintf( stderr
, " handle=%d", req
->handle
);
601 static void dump_create_file_request( const struct create_file_request
*req
)
603 fprintf( stderr
, " access=%08x,", req
->access
);
604 fprintf( stderr
, " inherit=%d,", req
->inherit
);
605 fprintf( stderr
, " sharing=%08x,", req
->sharing
);
606 fprintf( stderr
, " create=%d,", req
->create
);
607 fprintf( stderr
, " attrs=%08x,", req
->attrs
);
608 fprintf( stderr
, " name=" );
609 dump_string( req
, req
->name
);
612 static void dump_create_file_reply( const struct create_file_request
*req
)
614 fprintf( stderr
, " handle=%d", req
->handle
);
617 static void dump_alloc_file_handle_request( const struct alloc_file_handle_request
*req
)
619 fprintf( stderr
, " access=%08x", req
->access
);
622 static void dump_alloc_file_handle_reply( const struct alloc_file_handle_request
*req
)
624 fprintf( stderr
, " handle=%d", req
->handle
);
627 static void dump_get_read_fd_request( const struct get_read_fd_request
*req
)
629 fprintf( stderr
, " handle=%d", req
->handle
);
632 static void dump_get_write_fd_request( const struct get_write_fd_request
*req
)
634 fprintf( stderr
, " handle=%d", req
->handle
);
637 static void dump_set_file_pointer_request( const struct set_file_pointer_request
*req
)
639 fprintf( stderr
, " handle=%d,", req
->handle
);
640 fprintf( stderr
, " low=%d,", req
->low
);
641 fprintf( stderr
, " high=%d,", req
->high
);
642 fprintf( stderr
, " whence=%d", req
->whence
);
645 static void dump_set_file_pointer_reply( const struct set_file_pointer_request
*req
)
647 fprintf( stderr
, " new_low=%d,", req
->new_low
);
648 fprintf( stderr
, " new_high=%d", req
->new_high
);
651 static void dump_truncate_file_request( const struct truncate_file_request
*req
)
653 fprintf( stderr
, " handle=%d", req
->handle
);
656 static void dump_set_file_time_request( const struct set_file_time_request
*req
)
658 fprintf( stderr
, " handle=%d,", req
->handle
);
659 fprintf( stderr
, " access_time=%ld,", req
->access_time
);
660 fprintf( stderr
, " write_time=%ld", req
->write_time
);
663 static void dump_flush_file_request( const struct flush_file_request
*req
)
665 fprintf( stderr
, " handle=%d", req
->handle
);
668 static void dump_get_file_info_request( const struct get_file_info_request
*req
)
670 fprintf( stderr
, " handle=%d", req
->handle
);
673 static void dump_get_file_info_reply( const struct get_file_info_request
*req
)
675 fprintf( stderr
, " type=%d,", req
->type
);
676 fprintf( stderr
, " attr=%d,", req
->attr
);
677 fprintf( stderr
, " access_time=%ld,", req
->access_time
);
678 fprintf( stderr
, " write_time=%ld,", req
->write_time
);
679 fprintf( stderr
, " size_high=%d,", req
->size_high
);
680 fprintf( stderr
, " size_low=%d,", req
->size_low
);
681 fprintf( stderr
, " links=%d,", req
->links
);
682 fprintf( stderr
, " index_high=%d,", req
->index_high
);
683 fprintf( stderr
, " index_low=%d,", req
->index_low
);
684 fprintf( stderr
, " serial=%08x", req
->serial
);
687 static void dump_lock_file_request( const struct lock_file_request
*req
)
689 fprintf( stderr
, " handle=%d,", req
->handle
);
690 fprintf( stderr
, " offset_low=%08x,", req
->offset_low
);
691 fprintf( stderr
, " offset_high=%08x,", req
->offset_high
);
692 fprintf( stderr
, " count_low=%08x,", req
->count_low
);
693 fprintf( stderr
, " count_high=%08x", req
->count_high
);
696 static void dump_unlock_file_request( const struct unlock_file_request
*req
)
698 fprintf( stderr
, " handle=%d,", req
->handle
);
699 fprintf( stderr
, " offset_low=%08x,", req
->offset_low
);
700 fprintf( stderr
, " offset_high=%08x,", req
->offset_high
);
701 fprintf( stderr
, " count_low=%08x,", req
->count_low
);
702 fprintf( stderr
, " count_high=%08x", req
->count_high
);
705 static void dump_create_pipe_request( const struct create_pipe_request
*req
)
707 fprintf( stderr
, " inherit=%d", req
->inherit
);
710 static void dump_create_pipe_reply( const struct create_pipe_request
*req
)
712 fprintf( stderr
, " handle_read=%d,", req
->handle_read
);
713 fprintf( stderr
, " handle_write=%d", req
->handle_write
);
716 static void dump_create_socket_request( const struct create_socket_request
*req
)
718 fprintf( stderr
, " access=%08x,", req
->access
);
719 fprintf( stderr
, " inherit=%d,", req
->inherit
);
720 fprintf( stderr
, " family=%d,", req
->family
);
721 fprintf( stderr
, " type=%d,", req
->type
);
722 fprintf( stderr
, " protocol=%d", req
->protocol
);
725 static void dump_create_socket_reply( const struct create_socket_request
*req
)
727 fprintf( stderr
, " handle=%d", req
->handle
);
730 static void dump_accept_socket_request( const struct accept_socket_request
*req
)
732 fprintf( stderr
, " lhandle=%d,", req
->lhandle
);
733 fprintf( stderr
, " access=%08x,", req
->access
);
734 fprintf( stderr
, " inherit=%d", req
->inherit
);
737 static void dump_accept_socket_reply( const struct accept_socket_request
*req
)
739 fprintf( stderr
, " handle=%d", req
->handle
);
742 static void dump_set_socket_event_request( const struct set_socket_event_request
*req
)
744 fprintf( stderr
, " handle=%d,", req
->handle
);
745 fprintf( stderr
, " mask=%08x,", req
->mask
);
746 fprintf( stderr
, " event=%d", req
->event
);
749 static void dump_get_socket_event_request( const struct get_socket_event_request
*req
)
751 fprintf( stderr
, " handle=%d,", req
->handle
);
752 fprintf( stderr
, " service=%d,", req
->service
);
753 fprintf( stderr
, " s_event=%d,", req
->s_event
);
754 fprintf( stderr
, " c_event=%d", req
->c_event
);
757 static void dump_get_socket_event_reply( const struct get_socket_event_request
*req
)
759 fprintf( stderr
, " mask=%08x,", req
->mask
);
760 fprintf( stderr
, " pmask=%08x,", req
->pmask
);
761 fprintf( stderr
, " state=%08x,", req
->state
);
762 fprintf( stderr
, " errors=" );
763 dump_varargs_get_socket_event_reply( req
);
766 static void dump_enable_socket_event_request( const struct enable_socket_event_request
*req
)
768 fprintf( stderr
, " handle=%d,", req
->handle
);
769 fprintf( stderr
, " mask=%08x,", req
->mask
);
770 fprintf( stderr
, " sstate=%08x,", req
->sstate
);
771 fprintf( stderr
, " cstate=%08x", req
->cstate
);
774 static void dump_alloc_console_request( const struct alloc_console_request
*req
)
776 fprintf( stderr
, " access=%08x,", req
->access
);
777 fprintf( stderr
, " inherit=%d", req
->inherit
);
780 static void dump_alloc_console_reply( const struct alloc_console_request
*req
)
782 fprintf( stderr
, " handle_in=%d,", req
->handle_in
);
783 fprintf( stderr
, " handle_out=%d", req
->handle_out
);
786 static void dump_free_console_request( const struct free_console_request
*req
)
788 fprintf( stderr
, " dummy=%d", req
->dummy
);
791 static void dump_open_console_request( const struct open_console_request
*req
)
793 fprintf( stderr
, " output=%d,", req
->output
);
794 fprintf( stderr
, " access=%08x,", req
->access
);
795 fprintf( stderr
, " inherit=%d", req
->inherit
);
798 static void dump_open_console_reply( const struct open_console_request
*req
)
800 fprintf( stderr
, " handle=%d", req
->handle
);
803 static void dump_set_console_fd_request( const struct set_console_fd_request
*req
)
805 fprintf( stderr
, " handle=%d,", req
->handle
);
806 fprintf( stderr
, " file_handle=%d,", req
->file_handle
);
807 fprintf( stderr
, " pid=%d", req
->pid
);
810 static void dump_get_console_mode_request( const struct get_console_mode_request
*req
)
812 fprintf( stderr
, " handle=%d", req
->handle
);
815 static void dump_get_console_mode_reply( const struct get_console_mode_request
*req
)
817 fprintf( stderr
, " mode=%d", req
->mode
);
820 static void dump_set_console_mode_request( const struct set_console_mode_request
*req
)
822 fprintf( stderr
, " handle=%d,", req
->handle
);
823 fprintf( stderr
, " mode=%d", req
->mode
);
826 static void dump_set_console_info_request( const struct set_console_info_request
*req
)
828 fprintf( stderr
, " handle=%d,", req
->handle
);
829 fprintf( stderr
, " mask=%d,", req
->mask
);
830 fprintf( stderr
, " cursor_size=%d,", req
->cursor_size
);
831 fprintf( stderr
, " cursor_visible=%d,", req
->cursor_visible
);
832 fprintf( stderr
, " title=" );
833 dump_string( req
, req
->title
);
836 static void dump_get_console_info_request( const struct get_console_info_request
*req
)
838 fprintf( stderr
, " handle=%d", req
->handle
);
841 static void dump_get_console_info_reply( const struct get_console_info_request
*req
)
843 fprintf( stderr
, " cursor_size=%d,", req
->cursor_size
);
844 fprintf( stderr
, " cursor_visible=%d,", req
->cursor_visible
);
845 fprintf( stderr
, " pid=%d,", req
->pid
);
846 fprintf( stderr
, " title=" );
847 dump_string( req
, req
->title
);
850 static void dump_write_console_input_request( const struct write_console_input_request
*req
)
852 fprintf( stderr
, " handle=%d,", req
->handle
);
853 fprintf( stderr
, " count=%d", req
->count
);
856 static void dump_write_console_input_reply( const struct write_console_input_request
*req
)
858 fprintf( stderr
, " written=%d", req
->written
);
861 static void dump_read_console_input_request( const struct read_console_input_request
*req
)
863 fprintf( stderr
, " handle=%d,", req
->handle
);
864 fprintf( stderr
, " count=%d,", req
->count
);
865 fprintf( stderr
, " flush=%d", req
->flush
);
868 static void dump_read_console_input_reply( const struct read_console_input_request
*req
)
870 fprintf( stderr
, " read=%d", req
->read
);
873 static void dump_create_change_notification_request( const struct create_change_notification_request
*req
)
875 fprintf( stderr
, " subtree=%d,", req
->subtree
);
876 fprintf( stderr
, " filter=%d", req
->filter
);
879 static void dump_create_change_notification_reply( const struct create_change_notification_request
*req
)
881 fprintf( stderr
, " handle=%d", req
->handle
);
884 static void dump_create_mapping_request( const struct create_mapping_request
*req
)
886 fprintf( stderr
, " size_high=%d,", req
->size_high
);
887 fprintf( stderr
, " size_low=%d,", req
->size_low
);
888 fprintf( stderr
, " protect=%d,", req
->protect
);
889 fprintf( stderr
, " inherit=%d,", req
->inherit
);
890 fprintf( stderr
, " file_handle=%d,", req
->file_handle
);
891 fprintf( stderr
, " name=" );
892 dump_unicode_string( req
, req
->name
);
895 static void dump_create_mapping_reply( const struct create_mapping_request
*req
)
897 fprintf( stderr
, " handle=%d", req
->handle
);
900 static void dump_open_mapping_request( const struct open_mapping_request
*req
)
902 fprintf( stderr
, " access=%08x,", req
->access
);
903 fprintf( stderr
, " inherit=%d,", req
->inherit
);
904 fprintf( stderr
, " name=" );
905 dump_unicode_string( req
, req
->name
);
908 static void dump_open_mapping_reply( const struct open_mapping_request
*req
)
910 fprintf( stderr
, " handle=%d", req
->handle
);
913 static void dump_get_mapping_info_request( const struct get_mapping_info_request
*req
)
915 fprintf( stderr
, " handle=%d", req
->handle
);
918 static void dump_get_mapping_info_reply( const struct get_mapping_info_request
*req
)
920 fprintf( stderr
, " size_high=%d,", req
->size_high
);
921 fprintf( stderr
, " size_low=%d,", req
->size_low
);
922 fprintf( stderr
, " protect=%d", req
->protect
);
925 static void dump_create_device_request( const struct create_device_request
*req
)
927 fprintf( stderr
, " access=%08x,", req
->access
);
928 fprintf( stderr
, " inherit=%d,", req
->inherit
);
929 fprintf( stderr
, " id=%d", req
->id
);
932 static void dump_create_device_reply( const struct create_device_request
*req
)
934 fprintf( stderr
, " handle=%d", req
->handle
);
937 static void dump_create_snapshot_request( const struct create_snapshot_request
*req
)
939 fprintf( stderr
, " inherit=%d,", req
->inherit
);
940 fprintf( stderr
, " flags=%d,", req
->flags
);
941 fprintf( stderr
, " pid=%p", req
->pid
);
944 static void dump_create_snapshot_reply( const struct create_snapshot_request
*req
)
946 fprintf( stderr
, " handle=%d", req
->handle
);
949 static void dump_next_process_request( const struct next_process_request
*req
)
951 fprintf( stderr
, " handle=%d,", req
->handle
);
952 fprintf( stderr
, " reset=%d", req
->reset
);
955 static void dump_next_process_reply( const struct next_process_request
*req
)
957 fprintf( stderr
, " count=%d,", req
->count
);
958 fprintf( stderr
, " pid=%p,", req
->pid
);
959 fprintf( stderr
, " threads=%d,", req
->threads
);
960 fprintf( stderr
, " priority=%d", req
->priority
);
963 static void dump_next_thread_request( const struct next_thread_request
*req
)
965 fprintf( stderr
, " handle=%d,", req
->handle
);
966 fprintf( stderr
, " reset=%d", req
->reset
);
969 static void dump_next_thread_reply( const struct next_thread_request
*req
)
971 fprintf( stderr
, " count=%d,", req
->count
);
972 fprintf( stderr
, " pid=%p,", req
->pid
);
973 fprintf( stderr
, " tid=%p,", req
->tid
);
974 fprintf( stderr
, " base_pri=%d,", req
->base_pri
);
975 fprintf( stderr
, " delta_pri=%d", req
->delta_pri
);
978 static void dump_next_module_request( const struct next_module_request
*req
)
980 fprintf( stderr
, " handle=%d,", req
->handle
);
981 fprintf( stderr
, " reset=%d", req
->reset
);
984 static void dump_next_module_reply( const struct next_module_request
*req
)
986 fprintf( stderr
, " pid=%p,", req
->pid
);
987 fprintf( stderr
, " base=%p", req
->base
);
990 static void dump_wait_debug_event_request( const struct wait_debug_event_request
*req
)
992 fprintf( stderr
, " timeout=%d", req
->timeout
);
995 static void dump_wait_debug_event_reply( const struct wait_debug_event_request
*req
)
997 fprintf( stderr
, " pid=%p,", req
->pid
);
998 fprintf( stderr
, " tid=%p,", req
->tid
);
999 fprintf( stderr
, " event=" );
1000 dump_debug_event_t( req
, &req
->event
);
1003 static void dump_exception_event_request( const struct exception_event_request
*req
)
1005 fprintf( stderr
, " record=" );
1006 dump_exc_record( req
, &req
->record
);
1007 fprintf( stderr
, "," );
1008 fprintf( stderr
, " first=%d,", req
->first
);
1009 fprintf( stderr
, " context=" );
1010 dump_context( req
, &req
->context
);
1013 static void dump_exception_event_reply( const struct exception_event_request
*req
)
1015 fprintf( stderr
, " status=%d", req
->status
);
1018 static void dump_output_debug_string_request( const struct output_debug_string_request
*req
)
1020 fprintf( stderr
, " string=%p,", req
->string
);
1021 fprintf( stderr
, " unicode=%d,", req
->unicode
);
1022 fprintf( stderr
, " length=%d", req
->length
);
1025 static void dump_continue_debug_event_request( const struct continue_debug_event_request
*req
)
1027 fprintf( stderr
, " pid=%p,", req
->pid
);
1028 fprintf( stderr
, " tid=%p,", req
->tid
);
1029 fprintf( stderr
, " status=%d", req
->status
);
1032 static void dump_debug_process_request( const struct debug_process_request
*req
)
1034 fprintf( stderr
, " pid=%p", req
->pid
);
1037 static void dump_read_process_memory_request( const struct read_process_memory_request
*req
)
1039 fprintf( stderr
, " handle=%d,", req
->handle
);
1040 fprintf( stderr
, " addr=%p,", req
->addr
);
1041 fprintf( stderr
, " len=%d", req
->len
);
1044 static void dump_read_process_memory_reply( const struct read_process_memory_request
*req
)
1046 fprintf( stderr
, " data=" );
1047 dump_varargs_read_process_memory_reply( req
);
1050 static void dump_write_process_memory_request( const struct write_process_memory_request
*req
)
1052 fprintf( stderr
, " handle=%d,", req
->handle
);
1053 fprintf( stderr
, " addr=%p,", req
->addr
);
1054 fprintf( stderr
, " len=%d,", req
->len
);
1055 fprintf( stderr
, " first_mask=%08x,", req
->first_mask
);
1056 fprintf( stderr
, " last_mask=%08x,", req
->last_mask
);
1057 fprintf( stderr
, " data=" );
1058 dump_varargs_write_process_memory_request( req
);
1061 static void dump_create_key_request( const struct create_key_request
*req
)
1063 fprintf( stderr
, " parent=%d,", req
->parent
);
1064 fprintf( stderr
, " access=%08x,", req
->access
);
1065 fprintf( stderr
, " options=%08x,", req
->options
);
1066 fprintf( stderr
, " modif=%ld,", req
->modif
);
1067 fprintf( stderr
, " name=" );
1068 dump_path_t( req
, &req
->name
);
1069 fprintf( stderr
, "," );
1070 fprintf( stderr
, " class=" );
1071 dump_unicode_string( req
, req
->class );
1074 static void dump_create_key_reply( const struct create_key_request
*req
)
1076 fprintf( stderr
, " hkey=%d,", req
->hkey
);
1077 fprintf( stderr
, " created=%d", req
->created
);
1080 static void dump_open_key_request( const struct open_key_request
*req
)
1082 fprintf( stderr
, " parent=%d,", req
->parent
);
1083 fprintf( stderr
, " access=%08x,", req
->access
);
1084 fprintf( stderr
, " name=" );
1085 dump_path_t( req
, &req
->name
);
1088 static void dump_open_key_reply( const struct open_key_request
*req
)
1090 fprintf( stderr
, " hkey=%d", req
->hkey
);
1093 static void dump_delete_key_request( const struct delete_key_request
*req
)
1095 fprintf( stderr
, " hkey=%d,", req
->hkey
);
1096 fprintf( stderr
, " name=" );
1097 dump_path_t( req
, &req
->name
);
1100 static void dump_close_key_request( const struct close_key_request
*req
)
1102 fprintf( stderr
, " hkey=%d", req
->hkey
);
1105 static void dump_enum_key_request( const struct enum_key_request
*req
)
1107 fprintf( stderr
, " hkey=%d,", req
->hkey
);
1108 fprintf( stderr
, " index=%d", req
->index
);
1111 static void dump_enum_key_reply( const struct enum_key_request
*req
)
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_query_key_info_request( const struct query_key_info_request
*req
)
1123 fprintf( stderr
, " hkey=%d", req
->hkey
);
1126 static void dump_query_key_info_reply( const struct query_key_info_request
*req
)
1128 fprintf( stderr
, " subkeys=%d,", req
->subkeys
);
1129 fprintf( stderr
, " max_subkey=%d,", req
->max_subkey
);
1130 fprintf( stderr
, " max_class=%d,", req
->max_class
);
1131 fprintf( stderr
, " values=%d,", req
->values
);
1132 fprintf( stderr
, " max_value=%d,", req
->max_value
);
1133 fprintf( stderr
, " max_data=%d,", req
->max_data
);
1134 fprintf( stderr
, " modif=%ld,", req
->modif
);
1135 fprintf( stderr
, " name=" );
1136 dump_path_t( req
, &req
->name
);
1137 fprintf( stderr
, "," );
1138 fprintf( stderr
, " class=" );
1139 dump_unicode_string( req
, req
->class );
1142 static void dump_set_key_value_request( const struct set_key_value_request
*req
)
1144 fprintf( stderr
, " hkey=%d,", req
->hkey
);
1145 fprintf( stderr
, " type=%d,", req
->type
);
1146 fprintf( stderr
, " total=%08x,", req
->total
);
1147 fprintf( stderr
, " offset=%08x,", req
->offset
);
1148 fprintf( stderr
, " len=%08x,", req
->len
);
1149 fprintf( stderr
, " name=" );
1150 dump_path_t( req
, &req
->name
);
1151 fprintf( stderr
, "," );
1152 fprintf( stderr
, " data=" );
1153 dump_varargs_set_key_value_request( req
);
1156 static void dump_get_key_value_request( const struct get_key_value_request
*req
)
1158 fprintf( stderr
, " hkey=%d,", req
->hkey
);
1159 fprintf( stderr
, " offset=%08x,", req
->offset
);
1160 fprintf( stderr
, " name=" );
1161 dump_unicode_string( req
, req
->name
);
1164 static void dump_get_key_value_reply( const struct get_key_value_request
*req
)
1166 fprintf( stderr
, " type=%d,", req
->type
);
1167 fprintf( stderr
, " len=%d,", req
->len
);
1168 fprintf( stderr
, " data=" );
1169 dump_varargs_get_key_value_reply( req
);
1172 static void dump_enum_key_value_request( const struct enum_key_value_request
*req
)
1174 fprintf( stderr
, " hkey=%d,", req
->hkey
);
1175 fprintf( stderr
, " index=%d,", req
->index
);
1176 fprintf( stderr
, " offset=%08x", req
->offset
);
1179 static void dump_enum_key_value_reply( const struct enum_key_value_request
*req
)
1181 fprintf( stderr
, " type=%d,", req
->type
);
1182 fprintf( stderr
, " len=%d,", req
->len
);
1183 fprintf( stderr
, " name=" );
1184 dump_path_t( req
, &req
->name
);
1185 fprintf( stderr
, "," );
1186 fprintf( stderr
, " data=" );
1187 dump_varargs_enum_key_value_reply( req
);
1190 static void dump_delete_key_value_request( const struct delete_key_value_request
*req
)
1192 fprintf( stderr
, " hkey=%d,", req
->hkey
);
1193 fprintf( stderr
, " name=" );
1194 dump_path_t( req
, &req
->name
);
1197 static void dump_load_registry_request( const struct load_registry_request
*req
)
1199 fprintf( stderr
, " hkey=%d,", req
->hkey
);
1200 fprintf( stderr
, " file=%d,", req
->file
);
1201 fprintf( stderr
, " name=" );
1202 dump_path_t( req
, &req
->name
);
1205 static void dump_save_registry_request( const struct save_registry_request
*req
)
1207 fprintf( stderr
, " hkey=%d,", req
->hkey
);
1208 fprintf( stderr
, " file=%d", req
->file
);
1211 static void dump_save_registry_atexit_request( const struct save_registry_atexit_request
*req
)
1213 fprintf( stderr
, " hkey=%d,", req
->hkey
);
1214 fprintf( stderr
, " file=" );
1215 dump_string( req
, req
->file
);
1218 static void dump_set_registry_levels_request( const struct set_registry_levels_request
*req
)
1220 fprintf( stderr
, " current=%d,", req
->current
);
1221 fprintf( stderr
, " saving=%d,", req
->saving
);
1222 fprintf( stderr
, " period=%d", req
->period
);
1225 static void dump_create_timer_request( const struct create_timer_request
*req
)
1227 fprintf( stderr
, " inherit=%d,", req
->inherit
);
1228 fprintf( stderr
, " manual=%d,", req
->manual
);
1229 fprintf( stderr
, " name=" );
1230 dump_unicode_string( req
, req
->name
);
1233 static void dump_create_timer_reply( const struct create_timer_request
*req
)
1235 fprintf( stderr
, " handle=%d", req
->handle
);
1238 static void dump_open_timer_request( const struct open_timer_request
*req
)
1240 fprintf( stderr
, " access=%08x,", req
->access
);
1241 fprintf( stderr
, " inherit=%d,", req
->inherit
);
1242 fprintf( stderr
, " name=" );
1243 dump_unicode_string( req
, req
->name
);
1246 static void dump_open_timer_reply( const struct open_timer_request
*req
)
1248 fprintf( stderr
, " handle=%d", req
->handle
);
1251 static void dump_set_timer_request( const struct set_timer_request
*req
)
1253 fprintf( stderr
, " handle=%d,", req
->handle
);
1254 fprintf( stderr
, " sec=%d,", req
->sec
);
1255 fprintf( stderr
, " usec=%d,", req
->usec
);
1256 fprintf( stderr
, " period=%d,", req
->period
);
1257 fprintf( stderr
, " callback=%p,", req
->callback
);
1258 fprintf( stderr
, " arg=%p", req
->arg
);
1261 static void dump_cancel_timer_request( const struct cancel_timer_request
*req
)
1263 fprintf( stderr
, " handle=%d", req
->handle
);
1266 static void dump_get_thread_context_request( const struct get_thread_context_request
*req
)
1268 fprintf( stderr
, " handle=%d,", req
->handle
);
1269 fprintf( stderr
, " flags=%08x", req
->flags
);
1272 static void dump_get_thread_context_reply( const struct get_thread_context_request
*req
)
1274 fprintf( stderr
, " context=" );
1275 dump_context( req
, &req
->context
);
1278 static void dump_set_thread_context_request( const struct set_thread_context_request
*req
)
1280 fprintf( stderr
, " handle=%d,", req
->handle
);
1281 fprintf( stderr
, " flags=%08x,", req
->flags
);
1282 fprintf( stderr
, " context=" );
1283 dump_context( req
, &req
->context
);
1286 static void dump_get_selector_entry_request( const struct get_selector_entry_request
*req
)
1288 fprintf( stderr
, " handle=%d,", req
->handle
);
1289 fprintf( stderr
, " entry=%d", req
->entry
);
1292 static void dump_get_selector_entry_reply( const struct get_selector_entry_request
*req
)
1294 fprintf( stderr
, " base=%08x,", req
->base
);
1295 fprintf( stderr
, " limit=%08x,", req
->limit
);
1296 fprintf( stderr
, " flags=%02x", req
->flags
);
1299 static void dump_add_atom_request( const struct add_atom_request
*req
)
1301 fprintf( stderr
, " local=%d,", req
->local
);
1302 fprintf( stderr
, " name=" );
1303 dump_unicode_string( req
, req
->name
);
1306 static void dump_add_atom_reply( const struct add_atom_request
*req
)
1308 fprintf( stderr
, " atom=%d", req
->atom
);
1311 static void dump_delete_atom_request( const struct delete_atom_request
*req
)
1313 fprintf( stderr
, " atom=%d,", req
->atom
);
1314 fprintf( stderr
, " local=%d", req
->local
);
1317 static void dump_find_atom_request( const struct find_atom_request
*req
)
1319 fprintf( stderr
, " local=%d,", req
->local
);
1320 fprintf( stderr
, " name=" );
1321 dump_unicode_string( req
, req
->name
);
1324 static void dump_find_atom_reply( const struct find_atom_request
*req
)
1326 fprintf( stderr
, " atom=%d", req
->atom
);
1329 static void dump_get_atom_name_request( const struct get_atom_name_request
*req
)
1331 fprintf( stderr
, " atom=%d,", req
->atom
);
1332 fprintf( stderr
, " local=%d", req
->local
);
1335 static void dump_get_atom_name_reply( const struct get_atom_name_request
*req
)
1337 fprintf( stderr
, " count=%d,", req
->count
);
1338 fprintf( stderr
, " name=" );
1339 dump_unicode_string( req
, req
->name
);
1342 static void dump_init_atom_table_request( const struct init_atom_table_request
*req
)
1344 fprintf( stderr
, " entries=%d", req
->entries
);
1347 static void dump_get_msg_queue_request( const struct get_msg_queue_request
*req
)
1351 static void dump_get_msg_queue_reply( const struct get_msg_queue_request
*req
)
1353 fprintf( stderr
, " handle=%d", req
->handle
);
1356 static void dump_wake_queue_request( const struct wake_queue_request
*req
)
1358 fprintf( stderr
, " handle=%d,", req
->handle
);
1359 fprintf( stderr
, " bits=%08x", req
->bits
);
1362 static void dump_wait_input_idle_request( const struct wait_input_idle_request
*req
)
1364 fprintf( stderr
, " handle=%d,", req
->handle
);
1365 fprintf( stderr
, " timeout=%d", req
->timeout
);
1368 static void dump_wait_input_idle_reply( const struct wait_input_idle_request
*req
)
1370 fprintf( stderr
, " event=%d", req
->event
);
1373 static const dump_func req_dumpers
[REQ_NB_REQUESTS
] = {
1374 (dump_func
)dump_new_process_request
,
1375 (dump_func
)dump_wait_process_request
,
1376 (dump_func
)dump_new_thread_request
,
1377 (dump_func
)dump_boot_done_request
,
1378 (dump_func
)dump_init_process_request
,
1379 (dump_func
)dump_init_process_done_request
,
1380 (dump_func
)dump_init_thread_request
,
1381 (dump_func
)dump_get_thread_buffer_request
,
1382 (dump_func
)dump_terminate_process_request
,
1383 (dump_func
)dump_terminate_thread_request
,
1384 (dump_func
)dump_get_process_info_request
,
1385 (dump_func
)dump_set_process_info_request
,
1386 (dump_func
)dump_get_thread_info_request
,
1387 (dump_func
)dump_set_thread_info_request
,
1388 (dump_func
)dump_suspend_thread_request
,
1389 (dump_func
)dump_resume_thread_request
,
1390 (dump_func
)dump_load_dll_request
,
1391 (dump_func
)dump_unload_dll_request
,
1392 (dump_func
)dump_queue_apc_request
,
1393 (dump_func
)dump_get_apcs_request
,
1394 (dump_func
)dump_close_handle_request
,
1395 (dump_func
)dump_get_handle_info_request
,
1396 (dump_func
)dump_set_handle_info_request
,
1397 (dump_func
)dump_dup_handle_request
,
1398 (dump_func
)dump_open_process_request
,
1399 (dump_func
)dump_select_request
,
1400 (dump_func
)dump_create_event_request
,
1401 (dump_func
)dump_event_op_request
,
1402 (dump_func
)dump_open_event_request
,
1403 (dump_func
)dump_create_mutex_request
,
1404 (dump_func
)dump_release_mutex_request
,
1405 (dump_func
)dump_open_mutex_request
,
1406 (dump_func
)dump_create_semaphore_request
,
1407 (dump_func
)dump_release_semaphore_request
,
1408 (dump_func
)dump_open_semaphore_request
,
1409 (dump_func
)dump_create_file_request
,
1410 (dump_func
)dump_alloc_file_handle_request
,
1411 (dump_func
)dump_get_read_fd_request
,
1412 (dump_func
)dump_get_write_fd_request
,
1413 (dump_func
)dump_set_file_pointer_request
,
1414 (dump_func
)dump_truncate_file_request
,
1415 (dump_func
)dump_set_file_time_request
,
1416 (dump_func
)dump_flush_file_request
,
1417 (dump_func
)dump_get_file_info_request
,
1418 (dump_func
)dump_lock_file_request
,
1419 (dump_func
)dump_unlock_file_request
,
1420 (dump_func
)dump_create_pipe_request
,
1421 (dump_func
)dump_create_socket_request
,
1422 (dump_func
)dump_accept_socket_request
,
1423 (dump_func
)dump_set_socket_event_request
,
1424 (dump_func
)dump_get_socket_event_request
,
1425 (dump_func
)dump_enable_socket_event_request
,
1426 (dump_func
)dump_alloc_console_request
,
1427 (dump_func
)dump_free_console_request
,
1428 (dump_func
)dump_open_console_request
,
1429 (dump_func
)dump_set_console_fd_request
,
1430 (dump_func
)dump_get_console_mode_request
,
1431 (dump_func
)dump_set_console_mode_request
,
1432 (dump_func
)dump_set_console_info_request
,
1433 (dump_func
)dump_get_console_info_request
,
1434 (dump_func
)dump_write_console_input_request
,
1435 (dump_func
)dump_read_console_input_request
,
1436 (dump_func
)dump_create_change_notification_request
,
1437 (dump_func
)dump_create_mapping_request
,
1438 (dump_func
)dump_open_mapping_request
,
1439 (dump_func
)dump_get_mapping_info_request
,
1440 (dump_func
)dump_create_device_request
,
1441 (dump_func
)dump_create_snapshot_request
,
1442 (dump_func
)dump_next_process_request
,
1443 (dump_func
)dump_next_thread_request
,
1444 (dump_func
)dump_next_module_request
,
1445 (dump_func
)dump_wait_debug_event_request
,
1446 (dump_func
)dump_exception_event_request
,
1447 (dump_func
)dump_output_debug_string_request
,
1448 (dump_func
)dump_continue_debug_event_request
,
1449 (dump_func
)dump_debug_process_request
,
1450 (dump_func
)dump_read_process_memory_request
,
1451 (dump_func
)dump_write_process_memory_request
,
1452 (dump_func
)dump_create_key_request
,
1453 (dump_func
)dump_open_key_request
,
1454 (dump_func
)dump_delete_key_request
,
1455 (dump_func
)dump_close_key_request
,
1456 (dump_func
)dump_enum_key_request
,
1457 (dump_func
)dump_query_key_info_request
,
1458 (dump_func
)dump_set_key_value_request
,
1459 (dump_func
)dump_get_key_value_request
,
1460 (dump_func
)dump_enum_key_value_request
,
1461 (dump_func
)dump_delete_key_value_request
,
1462 (dump_func
)dump_load_registry_request
,
1463 (dump_func
)dump_save_registry_request
,
1464 (dump_func
)dump_save_registry_atexit_request
,
1465 (dump_func
)dump_set_registry_levels_request
,
1466 (dump_func
)dump_create_timer_request
,
1467 (dump_func
)dump_open_timer_request
,
1468 (dump_func
)dump_set_timer_request
,
1469 (dump_func
)dump_cancel_timer_request
,
1470 (dump_func
)dump_get_thread_context_request
,
1471 (dump_func
)dump_set_thread_context_request
,
1472 (dump_func
)dump_get_selector_entry_request
,
1473 (dump_func
)dump_add_atom_request
,
1474 (dump_func
)dump_delete_atom_request
,
1475 (dump_func
)dump_find_atom_request
,
1476 (dump_func
)dump_get_atom_name_request
,
1477 (dump_func
)dump_init_atom_table_request
,
1478 (dump_func
)dump_get_msg_queue_request
,
1479 (dump_func
)dump_wake_queue_request
,
1480 (dump_func
)dump_wait_input_idle_request
,
1483 static const dump_func reply_dumpers
[REQ_NB_REQUESTS
] = {
1485 (dump_func
)dump_wait_process_reply
,
1486 (dump_func
)dump_new_thread_reply
,
1488 (dump_func
)dump_init_process_reply
,
1489 (dump_func
)dump_init_process_done_reply
,
1491 (dump_func
)dump_get_thread_buffer_reply
,
1492 (dump_func
)dump_terminate_process_reply
,
1493 (dump_func
)dump_terminate_thread_reply
,
1494 (dump_func
)dump_get_process_info_reply
,
1496 (dump_func
)dump_get_thread_info_reply
,
1498 (dump_func
)dump_suspend_thread_reply
,
1499 (dump_func
)dump_resume_thread_reply
,
1503 (dump_func
)dump_get_apcs_reply
,
1505 (dump_func
)dump_get_handle_info_reply
,
1507 (dump_func
)dump_dup_handle_reply
,
1508 (dump_func
)dump_open_process_reply
,
1509 (dump_func
)dump_select_reply
,
1510 (dump_func
)dump_create_event_reply
,
1512 (dump_func
)dump_open_event_reply
,
1513 (dump_func
)dump_create_mutex_reply
,
1515 (dump_func
)dump_open_mutex_reply
,
1516 (dump_func
)dump_create_semaphore_reply
,
1517 (dump_func
)dump_release_semaphore_reply
,
1518 (dump_func
)dump_open_semaphore_reply
,
1519 (dump_func
)dump_create_file_reply
,
1520 (dump_func
)dump_alloc_file_handle_reply
,
1523 (dump_func
)dump_set_file_pointer_reply
,
1527 (dump_func
)dump_get_file_info_reply
,
1530 (dump_func
)dump_create_pipe_reply
,
1531 (dump_func
)dump_create_socket_reply
,
1532 (dump_func
)dump_accept_socket_reply
,
1534 (dump_func
)dump_get_socket_event_reply
,
1536 (dump_func
)dump_alloc_console_reply
,
1538 (dump_func
)dump_open_console_reply
,
1540 (dump_func
)dump_get_console_mode_reply
,
1543 (dump_func
)dump_get_console_info_reply
,
1544 (dump_func
)dump_write_console_input_reply
,
1545 (dump_func
)dump_read_console_input_reply
,
1546 (dump_func
)dump_create_change_notification_reply
,
1547 (dump_func
)dump_create_mapping_reply
,
1548 (dump_func
)dump_open_mapping_reply
,
1549 (dump_func
)dump_get_mapping_info_reply
,
1550 (dump_func
)dump_create_device_reply
,
1551 (dump_func
)dump_create_snapshot_reply
,
1552 (dump_func
)dump_next_process_reply
,
1553 (dump_func
)dump_next_thread_reply
,
1554 (dump_func
)dump_next_module_reply
,
1555 (dump_func
)dump_wait_debug_event_reply
,
1556 (dump_func
)dump_exception_event_reply
,
1560 (dump_func
)dump_read_process_memory_reply
,
1562 (dump_func
)dump_create_key_reply
,
1563 (dump_func
)dump_open_key_reply
,
1566 (dump_func
)dump_enum_key_reply
,
1567 (dump_func
)dump_query_key_info_reply
,
1569 (dump_func
)dump_get_key_value_reply
,
1570 (dump_func
)dump_enum_key_value_reply
,
1576 (dump_func
)dump_create_timer_reply
,
1577 (dump_func
)dump_open_timer_reply
,
1580 (dump_func
)dump_get_thread_context_reply
,
1582 (dump_func
)dump_get_selector_entry_reply
,
1583 (dump_func
)dump_add_atom_reply
,
1585 (dump_func
)dump_find_atom_reply
,
1586 (dump_func
)dump_get_atom_name_reply
,
1588 (dump_func
)dump_get_msg_queue_reply
,
1590 (dump_func
)dump_wait_input_idle_reply
,
1593 static const char * const req_names
[REQ_NB_REQUESTS
] = {
1599 "init_process_done",
1601 "get_thread_buffer",
1602 "terminate_process",
1627 "release_semaphore",
1630 "alloc_file_handle",
1645 "enable_socket_event",
1654 "write_console_input",
1655 "read_console_input",
1656 "create_change_notification",
1667 "output_debug_string",
1668 "continue_debug_event",
1670 "read_process_memory",
1671 "write_process_memory",
1684 "save_registry_atexit",
1685 "set_registry_levels",
1690 "get_thread_context",
1691 "set_thread_context",
1692 "get_selector_entry",
1703 /* ### make_requests end ### */
1704 /* Everything above this line is generated automatically by tools/make_requests */
1706 void trace_request( enum request req
)
1708 current
->last_req
= req
;
1709 if (req
< REQ_NB_REQUESTS
)
1711 fprintf( stderr
, "%08x: %s(", (unsigned int)current
, req_names
[req
] );
1712 req_dumpers
[req
]( current
->buffer
);
1715 fprintf( stderr
, "%08x: %d(", (unsigned int)current
, req
);
1716 if (current
->pass_fd
!= -1) fprintf( stderr
, " ) fd=%d\n", current
->pass_fd
);
1717 else fprintf( stderr
, " )\n" );
1720 void trace_reply( struct thread
*thread
)
1722 fprintf( stderr
, "%08x: %s() = %x",
1723 (unsigned int)thread
, req_names
[thread
->last_req
], thread
->error
);
1724 if (reply_dumpers
[thread
->last_req
])
1726 fprintf( stderr
, " {" );
1727 reply_dumpers
[thread
->last_req
]( thread
->buffer
);
1728 fprintf( stderr
, " }" );
1730 if (thread
->pass_fd
!= -1) fprintf( stderr
, " fd=%d\n", thread
->pass_fd
);
1731 else fprintf( stderr
, "\n" );