2 * Server request tracing
4 * Copyright (C) 1999 Alexandre Julliard
11 #include <sys/types.h>
21 static const void *cur_data
;
24 /* utility functions */
26 inline static void remove_data( size_t size
)
28 cur_data
= (const char *)cur_data
+ size
;
32 static void dump_uints( const int *ptr
, int len
)
37 fprintf( stderr
, "%08x", *ptr
++ );
38 if (--len
) fputc( ',', stderr
);
43 static void dump_rectangle( const rectangle_t
*rect
)
45 fprintf( stderr
, "{%d,%d;%d,%d}",
46 rect
->left
, rect
->top
, rect
->right
, rect
->bottom
);
49 static void dump_char_info( const char_info_t
*info
)
51 fprintf( stderr
, "{'" );
52 dump_strW( &info
->ch
, 1, stderr
, "\'\'" );
53 fprintf( stderr
, "',%04x}", info
->attr
);
56 static void dump_context( const CONTEXT
*context
)
59 fprintf( stderr
, "{flags=%08lx,eax=%08lx,ebx=%08lx,ecx=%08lx,edx=%08lx,esi=%08lx,edi=%08lx,"
60 "ebp=%08lx,eip=%08lx,esp=%08lx,eflags=%08lx,cs=%04lx,ds=%04lx,es=%04lx,"
61 "fs=%04lx,gs=%04lx,dr0=%08lx,dr1=%08lx,dr2=%08lx,dr3=%08lx,dr6=%08lx,dr7=%08lx,",
62 context
->ContextFlags
, context
->Eax
, context
->Ebx
, context
->Ecx
, context
->Edx
,
63 context
->Esi
, context
->Edi
, context
->Ebp
, context
->Eip
, context
->Esp
, context
->EFlags
,
64 context
->SegCs
, context
->SegDs
, context
->SegEs
, context
->SegFs
, context
->SegGs
,
65 context
->Dr0
, context
->Dr1
, context
->Dr2
, context
->Dr3
, context
->Dr6
, context
->Dr7
);
66 fprintf( stderr
, "float=" );
67 dump_uints( (int *)&context
->FloatSave
, sizeof(context
->FloatSave
) / sizeof(int) );
68 fprintf( stderr
, "}" );
70 dump_uints( (int *)context
, sizeof(*context
) / sizeof(int) );
74 static void dump_exc_record( const EXCEPTION_RECORD
*rec
)
77 fprintf( stderr
, "{code=%lx,flags=%lx,rec=%p,addr=%p,params={",
78 rec
->ExceptionCode
, rec
->ExceptionFlags
, rec
->ExceptionRecord
,
79 rec
->ExceptionAddress
);
80 for (i
= 0; i
< min(rec
->NumberParameters
,EXCEPTION_MAXIMUM_PARAMETERS
); i
++)
82 if (i
) fputc( ',', stderr
);
83 fprintf( stderr
, "%lx", rec
->ExceptionInformation
[i
] );
88 static void dump_varargs_ints( size_t size
)
90 const int *data
= cur_data
;
91 size_t len
= size
/ sizeof(*data
);
96 fprintf( stderr
, "%d", *data
++ );
97 if (--len
) fputc( ',', stderr
);
103 static void dump_varargs_handles( size_t size
)
105 const handle_t
*data
= cur_data
;
106 size_t len
= size
/ sizeof(*data
);
108 fputc( '{', stderr
);
111 fprintf( stderr
, "%d", *data
++ );
112 if (--len
) fputc( ',', stderr
);
114 fputc( '}', stderr
);
118 static void dump_varargs_ptrs( size_t size
)
120 void * const *data
= cur_data
;
121 size_t len
= size
/ sizeof(*data
);
123 fputc( '{', stderr
);
126 fprintf( stderr
, "%p", *data
++ );
127 if (--len
) fputc( ',', stderr
);
129 fputc( '}', stderr
);
133 static void dump_varargs_user_handles( size_t size
)
135 const user_handle_t
*data
= cur_data
;
136 size_t len
= size
/ sizeof(*data
);
138 fputc( '{', stderr
);
141 fprintf( stderr
, "%08x", *data
++ );
142 if (--len
) fputc( ',', stderr
);
144 fputc( '}', stderr
);
148 static void dump_varargs_bytes( size_t size
)
150 const unsigned char *data
= cur_data
;
153 fputc( '{', stderr
);
156 fprintf( stderr
, "%02x", *data
++ );
157 if (--len
) fputc( ',', stderr
);
159 fputc( '}', stderr
);
163 static void dump_varargs_string( size_t size
)
165 fprintf( stderr
, "\"%.*s\"", (int)size
, (char *)cur_data
);
169 static void dump_varargs_unicode_str( size_t size
)
171 fprintf( stderr
, "L\"" );
172 dump_strW( cur_data
, size
/ sizeof(WCHAR
), stderr
, "\"\"" );
173 fputc( '\"', stderr
);
177 static void dump_varargs_context( size_t size
)
179 dump_context( cur_data
);
183 static void dump_varargs_exc_event( size_t size
)
185 const CONTEXT
*ptr
= cur_data
;
186 fprintf( stderr
, "{context=" );
188 fprintf( stderr
, ",rec=" );
189 dump_exc_record( (EXCEPTION_RECORD
*)(ptr
+ 1) );
190 fputc( '}', stderr
);
194 static void dump_varargs_debug_event( size_t size
)
196 const debug_event_t
*event
= cur_data
;
200 fprintf( stderr
, "{}" );
205 case EXCEPTION_DEBUG_EVENT
:
206 fprintf( stderr
, "{exception," );
207 dump_exc_record( &event
->info
.exception
.record
);
208 fprintf( stderr
, ",first=%d}", event
->info
.exception
.first
);
210 case CREATE_THREAD_DEBUG_EVENT
:
211 fprintf( stderr
, "{create_thread,thread=%d,teb=%p,start=%p}",
212 event
->info
.create_thread
.handle
, event
->info
.create_thread
.teb
,
213 event
->info
.create_thread
.start
);
215 case CREATE_PROCESS_DEBUG_EVENT
:
216 fprintf( stderr
, "{create_process,file=%d,process=%d,thread=%d,base=%p,offset=%d,"
217 "size=%d,teb=%p,start=%p,name=%p,unicode=%d}",
218 event
->info
.create_process
.file
, event
->info
.create_process
.process
,
219 event
->info
.create_process
.thread
, event
->info
.create_process
.base
,
220 event
->info
.create_process
.dbg_offset
, event
->info
.create_process
.dbg_size
,
221 event
->info
.create_process
.teb
, event
->info
.create_process
.start
,
222 event
->info
.create_process
.name
, event
->info
.create_process
.unicode
);
224 case EXIT_THREAD_DEBUG_EVENT
:
225 fprintf( stderr
, "{exit_thread,code=%d}", event
->info
.exit
.exit_code
);
227 case EXIT_PROCESS_DEBUG_EVENT
:
228 fprintf( stderr
, "{exit_process,code=%d}", event
->info
.exit
.exit_code
);
230 case LOAD_DLL_DEBUG_EVENT
:
231 fprintf( stderr
, "{load_dll,file=%d,base=%p,offset=%d,size=%d,name=%p,unicode=%d}",
232 event
->info
.load_dll
.handle
, event
->info
.load_dll
.base
,
233 event
->info
.load_dll
.dbg_offset
, event
->info
.load_dll
.dbg_size
,
234 event
->info
.load_dll
.name
, event
->info
.load_dll
.unicode
);
236 case UNLOAD_DLL_DEBUG_EVENT
:
237 fprintf( stderr
, "{unload_dll,base=%p}", event
->info
.unload_dll
.base
);
239 case OUTPUT_DEBUG_STRING_EVENT
:
240 fprintf( stderr
, "{output_string,data=%p,unicode=%d,len=%d}",
241 event
->info
.output_string
.string
, event
->info
.output_string
.unicode
,
242 event
->info
.output_string
.length
);
245 fprintf( stderr
, "{rip,err=%d,type=%d}",
246 event
->info
.rip_info
.error
, event
->info
.rip_info
.type
);
248 case 0: /* zero is the code returned on timeouts */
249 fprintf( stderr
, "{}" );
252 fprintf( stderr
, "{code=??? (%d)}", event
->code
);
258 static void dump_varargs_input_records( size_t size
)
260 const INPUT_RECORD
*rec
= cur_data
;
261 size_t len
= size
/ sizeof(*rec
);
263 fputc( '{', stderr
);
266 fprintf( stderr
, "{%04x,...}", rec
->EventType
);
268 if (--len
) fputc( ',', stderr
);
270 fputc( '}', stderr
);
274 static void dump_varargs_properties( size_t size
)
276 const property_data_t
*prop
= cur_data
;
277 size_t len
= size
/ sizeof(*prop
);
279 fputc( '{', stderr
);
282 fprintf( stderr
, "{atom=%04x,str=%d,handle=%08x}",
283 prop
->atom
, prop
->string
, prop
->handle
);
285 if (--len
) fputc( ',', stderr
);
287 fputc( '}', stderr
);
291 typedef void (*dump_func
)( const void *req
);
293 /* Everything below this line is generated automatically by tools/make_requests */
294 /* ### make_requests begin ### */
296 static void dump_new_process_request( const struct new_process_request
*req
)
298 fprintf( stderr
, " inherit_all=%d,", req
->inherit_all
);
299 fprintf( stderr
, " create_flags=%d,", req
->create_flags
);
300 fprintf( stderr
, " start_flags=%d,", req
->start_flags
);
301 fprintf( stderr
, " exe_file=%d,", req
->exe_file
);
302 fprintf( stderr
, " hstdin=%d,", req
->hstdin
);
303 fprintf( stderr
, " hstdout=%d,", req
->hstdout
);
304 fprintf( stderr
, " hstderr=%d,", req
->hstderr
);
305 fprintf( stderr
, " cmd_show=%d,", req
->cmd_show
);
306 fprintf( stderr
, " filename=" );
307 dump_varargs_string( cur_size
);
310 static void dump_new_process_reply( const struct new_process_reply
*req
)
312 fprintf( stderr
, " info=%d", req
->info
);
315 static void dump_get_new_process_info_request( const struct get_new_process_info_request
*req
)
317 fprintf( stderr
, " info=%d,", req
->info
);
318 fprintf( stderr
, " pinherit=%d,", req
->pinherit
);
319 fprintf( stderr
, " tinherit=%d", req
->tinherit
);
322 static void dump_get_new_process_info_reply( const struct get_new_process_info_reply
*req
)
324 fprintf( stderr
, " pid=%p,", req
->pid
);
325 fprintf( stderr
, " phandle=%d,", req
->phandle
);
326 fprintf( stderr
, " tid=%p,", req
->tid
);
327 fprintf( stderr
, " thandle=%d,", req
->thandle
);
328 fprintf( stderr
, " event=%d", req
->event
);
331 static void dump_new_thread_request( const struct new_thread_request
*req
)
333 fprintf( stderr
, " suspend=%d,", req
->suspend
);
334 fprintf( stderr
, " inherit=%d,", req
->inherit
);
335 fprintf( stderr
, " request_fd=%d", req
->request_fd
);
338 static void dump_new_thread_reply( const struct new_thread_reply
*req
)
340 fprintf( stderr
, " tid=%p,", req
->tid
);
341 fprintf( stderr
, " handle=%d", req
->handle
);
344 static void dump_boot_done_request( const struct boot_done_request
*req
)
346 fprintf( stderr
, " debug_level=%d", req
->debug_level
);
349 static void dump_init_process_request( const struct init_process_request
*req
)
351 fprintf( stderr
, " ldt_copy=%p,", req
->ldt_copy
);
352 fprintf( stderr
, " ppid=%d", req
->ppid
);
355 static void dump_init_process_reply( const struct init_process_reply
*req
)
357 fprintf( stderr
, " create_flags=%d,", req
->create_flags
);
358 fprintf( stderr
, " start_flags=%d,", req
->start_flags
);
359 fprintf( stderr
, " server_start=%08x,", req
->server_start
);
360 fprintf( stderr
, " exe_file=%d,", req
->exe_file
);
361 fprintf( stderr
, " hstdin=%d,", req
->hstdin
);
362 fprintf( stderr
, " hstdout=%d,", req
->hstdout
);
363 fprintf( stderr
, " hstderr=%d,", req
->hstderr
);
364 fprintf( stderr
, " cmd_show=%d,", req
->cmd_show
);
365 fprintf( stderr
, " filename=" );
366 dump_varargs_string( cur_size
);
369 static void dump_init_process_done_request( const struct init_process_done_request
*req
)
371 fprintf( stderr
, " module=%p,", req
->module
);
372 fprintf( stderr
, " entry=%p,", req
->entry
);
373 fprintf( stderr
, " name=%p,", req
->name
);
374 fprintf( stderr
, " exe_file=%d,", req
->exe_file
);
375 fprintf( stderr
, " gui=%d", req
->gui
);
378 static void dump_init_process_done_reply( const struct init_process_done_reply
*req
)
380 fprintf( stderr
, " debugged=%d", req
->debugged
);
383 static void dump_init_thread_request( const struct init_thread_request
*req
)
385 fprintf( stderr
, " unix_pid=%d,", req
->unix_pid
);
386 fprintf( stderr
, " teb=%p,", req
->teb
);
387 fprintf( stderr
, " entry=%p,", req
->entry
);
388 fprintf( stderr
, " reply_fd=%d,", req
->reply_fd
);
389 fprintf( stderr
, " wait_fd=%d", req
->wait_fd
);
392 static void dump_init_thread_reply( const struct init_thread_reply
*req
)
394 fprintf( stderr
, " pid=%p,", req
->pid
);
395 fprintf( stderr
, " tid=%p,", req
->tid
);
396 fprintf( stderr
, " boot=%d,", req
->boot
);
397 fprintf( stderr
, " version=%d", req
->version
);
400 static void dump_terminate_process_request( const struct terminate_process_request
*req
)
402 fprintf( stderr
, " handle=%d,", req
->handle
);
403 fprintf( stderr
, " exit_code=%d", req
->exit_code
);
406 static void dump_terminate_process_reply( const struct terminate_process_reply
*req
)
408 fprintf( stderr
, " self=%d", req
->self
);
411 static void dump_terminate_thread_request( const struct terminate_thread_request
*req
)
413 fprintf( stderr
, " handle=%d,", req
->handle
);
414 fprintf( stderr
, " exit_code=%d", req
->exit_code
);
417 static void dump_terminate_thread_reply( const struct terminate_thread_reply
*req
)
419 fprintf( stderr
, " self=%d,", req
->self
);
420 fprintf( stderr
, " last=%d", req
->last
);
423 static void dump_get_process_info_request( const struct get_process_info_request
*req
)
425 fprintf( stderr
, " handle=%d", req
->handle
);
428 static void dump_get_process_info_reply( const struct get_process_info_reply
*req
)
430 fprintf( stderr
, " pid=%p,", req
->pid
);
431 fprintf( stderr
, " debugged=%d,", req
->debugged
);
432 fprintf( stderr
, " exit_code=%d,", req
->exit_code
);
433 fprintf( stderr
, " priority=%d,", req
->priority
);
434 fprintf( stderr
, " process_affinity=%d,", req
->process_affinity
);
435 fprintf( stderr
, " system_affinity=%d", req
->system_affinity
);
438 static void dump_set_process_info_request( const struct set_process_info_request
*req
)
440 fprintf( stderr
, " handle=%d,", req
->handle
);
441 fprintf( stderr
, " mask=%d,", req
->mask
);
442 fprintf( stderr
, " priority=%d,", req
->priority
);
443 fprintf( stderr
, " affinity=%d", req
->affinity
);
446 static void dump_get_thread_info_request( const struct get_thread_info_request
*req
)
448 fprintf( stderr
, " handle=%d,", req
->handle
);
449 fprintf( stderr
, " tid_in=%p", req
->tid_in
);
452 static void dump_get_thread_info_reply( const struct get_thread_info_reply
*req
)
454 fprintf( stderr
, " tid=%p,", req
->tid
);
455 fprintf( stderr
, " teb=%p,", req
->teb
);
456 fprintf( stderr
, " exit_code=%d,", req
->exit_code
);
457 fprintf( stderr
, " priority=%d", req
->priority
);
460 static void dump_set_thread_info_request( const struct set_thread_info_request
*req
)
462 fprintf( stderr
, " handle=%d,", req
->handle
);
463 fprintf( stderr
, " mask=%d,", req
->mask
);
464 fprintf( stderr
, " priority=%d,", req
->priority
);
465 fprintf( stderr
, " affinity=%d", req
->affinity
);
468 static void dump_suspend_thread_request( const struct suspend_thread_request
*req
)
470 fprintf( stderr
, " handle=%d", req
->handle
);
473 static void dump_suspend_thread_reply( const struct suspend_thread_reply
*req
)
475 fprintf( stderr
, " count=%d", req
->count
);
478 static void dump_resume_thread_request( const struct resume_thread_request
*req
)
480 fprintf( stderr
, " handle=%d", req
->handle
);
483 static void dump_resume_thread_reply( const struct resume_thread_reply
*req
)
485 fprintf( stderr
, " count=%d", req
->count
);
488 static void dump_load_dll_request( const struct load_dll_request
*req
)
490 fprintf( stderr
, " handle=%d,", req
->handle
);
491 fprintf( stderr
, " base=%p,", req
->base
);
492 fprintf( stderr
, " dbg_offset=%d,", req
->dbg_offset
);
493 fprintf( stderr
, " dbg_size=%d,", req
->dbg_size
);
494 fprintf( stderr
, " name=%p", req
->name
);
497 static void dump_unload_dll_request( const struct unload_dll_request
*req
)
499 fprintf( stderr
, " base=%p", req
->base
);
502 static void dump_queue_apc_request( const struct queue_apc_request
*req
)
504 fprintf( stderr
, " handle=%d,", req
->handle
);
505 fprintf( stderr
, " user=%d,", req
->user
);
506 fprintf( stderr
, " func=%p,", req
->func
);
507 fprintf( stderr
, " param=%p", req
->param
);
510 static void dump_get_apc_request( const struct get_apc_request
*req
)
512 fprintf( stderr
, " alertable=%d", req
->alertable
);
515 static void dump_get_apc_reply( const struct get_apc_reply
*req
)
517 fprintf( stderr
, " func=%p,", req
->func
);
518 fprintf( stderr
, " type=%d,", req
->type
);
519 fprintf( stderr
, " args=" );
520 dump_varargs_ptrs( cur_size
);
523 static void dump_close_handle_request( const struct close_handle_request
*req
)
525 fprintf( stderr
, " handle=%d", req
->handle
);
528 static void dump_close_handle_reply( const struct close_handle_reply
*req
)
530 fprintf( stderr
, " fd=%d", req
->fd
);
533 static void dump_set_handle_info_request( const struct set_handle_info_request
*req
)
535 fprintf( stderr
, " handle=%d,", req
->handle
);
536 fprintf( stderr
, " flags=%d,", req
->flags
);
537 fprintf( stderr
, " mask=%d,", req
->mask
);
538 fprintf( stderr
, " fd=%d", req
->fd
);
541 static void dump_set_handle_info_reply( const struct set_handle_info_reply
*req
)
543 fprintf( stderr
, " old_flags=%d,", req
->old_flags
);
544 fprintf( stderr
, " cur_fd=%d", req
->cur_fd
);
547 static void dump_dup_handle_request( const struct dup_handle_request
*req
)
549 fprintf( stderr
, " src_process=%d,", req
->src_process
);
550 fprintf( stderr
, " src_handle=%d,", req
->src_handle
);
551 fprintf( stderr
, " dst_process=%d,", req
->dst_process
);
552 fprintf( stderr
, " access=%08x,", req
->access
);
553 fprintf( stderr
, " inherit=%d,", req
->inherit
);
554 fprintf( stderr
, " options=%d", req
->options
);
557 static void dump_dup_handle_reply( const struct dup_handle_reply
*req
)
559 fprintf( stderr
, " handle=%d,", req
->handle
);
560 fprintf( stderr
, " fd=%d", req
->fd
);
563 static void dump_open_process_request( const struct open_process_request
*req
)
565 fprintf( stderr
, " pid=%p,", req
->pid
);
566 fprintf( stderr
, " access=%08x,", req
->access
);
567 fprintf( stderr
, " inherit=%d", req
->inherit
);
570 static void dump_open_process_reply( const struct open_process_reply
*req
)
572 fprintf( stderr
, " handle=%d", req
->handle
);
575 static void dump_select_request( const struct select_request
*req
)
577 fprintf( stderr
, " flags=%d,", req
->flags
);
578 fprintf( stderr
, " cookie=%p,", req
->cookie
);
579 fprintf( stderr
, " sec=%d,", req
->sec
);
580 fprintf( stderr
, " usec=%d,", req
->usec
);
581 fprintf( stderr
, " handles=" );
582 dump_varargs_handles( cur_size
);
585 static void dump_create_event_request( const struct create_event_request
*req
)
587 fprintf( stderr
, " manual_reset=%d,", req
->manual_reset
);
588 fprintf( stderr
, " initial_state=%d,", req
->initial_state
);
589 fprintf( stderr
, " inherit=%d,", req
->inherit
);
590 fprintf( stderr
, " name=" );
591 dump_varargs_unicode_str( cur_size
);
594 static void dump_create_event_reply( const struct create_event_reply
*req
)
596 fprintf( stderr
, " handle=%d", req
->handle
);
599 static void dump_event_op_request( const struct event_op_request
*req
)
601 fprintf( stderr
, " handle=%d,", req
->handle
);
602 fprintf( stderr
, " op=%d", req
->op
);
605 static void dump_open_event_request( const struct open_event_request
*req
)
607 fprintf( stderr
, " access=%08x,", req
->access
);
608 fprintf( stderr
, " inherit=%d,", req
->inherit
);
609 fprintf( stderr
, " name=" );
610 dump_varargs_unicode_str( cur_size
);
613 static void dump_open_event_reply( const struct open_event_reply
*req
)
615 fprintf( stderr
, " handle=%d", req
->handle
);
618 static void dump_create_mutex_request( const struct create_mutex_request
*req
)
620 fprintf( stderr
, " owned=%d,", req
->owned
);
621 fprintf( stderr
, " inherit=%d,", req
->inherit
);
622 fprintf( stderr
, " name=" );
623 dump_varargs_unicode_str( cur_size
);
626 static void dump_create_mutex_reply( const struct create_mutex_reply
*req
)
628 fprintf( stderr
, " handle=%d", req
->handle
);
631 static void dump_release_mutex_request( const struct release_mutex_request
*req
)
633 fprintf( stderr
, " handle=%d", req
->handle
);
636 static void dump_open_mutex_request( const struct open_mutex_request
*req
)
638 fprintf( stderr
, " access=%08x,", req
->access
);
639 fprintf( stderr
, " inherit=%d,", req
->inherit
);
640 fprintf( stderr
, " name=" );
641 dump_varargs_unicode_str( cur_size
);
644 static void dump_open_mutex_reply( const struct open_mutex_reply
*req
)
646 fprintf( stderr
, " handle=%d", req
->handle
);
649 static void dump_create_semaphore_request( const struct create_semaphore_request
*req
)
651 fprintf( stderr
, " initial=%08x,", req
->initial
);
652 fprintf( stderr
, " max=%08x,", req
->max
);
653 fprintf( stderr
, " inherit=%d,", req
->inherit
);
654 fprintf( stderr
, " name=" );
655 dump_varargs_unicode_str( cur_size
);
658 static void dump_create_semaphore_reply( const struct create_semaphore_reply
*req
)
660 fprintf( stderr
, " handle=%d", req
->handle
);
663 static void dump_release_semaphore_request( const struct release_semaphore_request
*req
)
665 fprintf( stderr
, " handle=%d,", req
->handle
);
666 fprintf( stderr
, " count=%08x", req
->count
);
669 static void dump_release_semaphore_reply( const struct release_semaphore_reply
*req
)
671 fprintf( stderr
, " prev_count=%08x", req
->prev_count
);
674 static void dump_open_semaphore_request( const struct open_semaphore_request
*req
)
676 fprintf( stderr
, " access=%08x,", req
->access
);
677 fprintf( stderr
, " inherit=%d,", req
->inherit
);
678 fprintf( stderr
, " name=" );
679 dump_varargs_unicode_str( cur_size
);
682 static void dump_open_semaphore_reply( const struct open_semaphore_reply
*req
)
684 fprintf( stderr
, " handle=%d", req
->handle
);
687 static void dump_create_file_request( const struct create_file_request
*req
)
689 fprintf( stderr
, " access=%08x,", req
->access
);
690 fprintf( stderr
, " inherit=%d,", req
->inherit
);
691 fprintf( stderr
, " sharing=%08x,", req
->sharing
);
692 fprintf( stderr
, " create=%d,", req
->create
);
693 fprintf( stderr
, " attrs=%08x,", req
->attrs
);
694 fprintf( stderr
, " drive_type=%d,", req
->drive_type
);
695 fprintf( stderr
, " filename=" );
696 dump_varargs_string( cur_size
);
699 static void dump_create_file_reply( const struct create_file_reply
*req
)
701 fprintf( stderr
, " handle=%d", req
->handle
);
704 static void dump_alloc_file_handle_request( const struct alloc_file_handle_request
*req
)
706 fprintf( stderr
, " access=%08x,", req
->access
);
707 fprintf( stderr
, " inherit=%d,", req
->inherit
);
708 fprintf( stderr
, " fd=%d", req
->fd
);
711 static void dump_alloc_file_handle_reply( const struct alloc_file_handle_reply
*req
)
713 fprintf( stderr
, " handle=%d", req
->handle
);
716 static void dump_get_handle_fd_request( const struct get_handle_fd_request
*req
)
718 fprintf( stderr
, " handle=%d,", req
->handle
);
719 fprintf( stderr
, " access=%08x", req
->access
);
722 static void dump_get_handle_fd_reply( const struct get_handle_fd_reply
*req
)
724 fprintf( stderr
, " fd=%d,", req
->fd
);
725 fprintf( stderr
, " type=%d", req
->type
);
728 static void dump_set_file_pointer_request( const struct set_file_pointer_request
*req
)
730 fprintf( stderr
, " handle=%d,", req
->handle
);
731 fprintf( stderr
, " low=%d,", req
->low
);
732 fprintf( stderr
, " high=%d,", req
->high
);
733 fprintf( stderr
, " whence=%d", req
->whence
);
736 static void dump_set_file_pointer_reply( const struct set_file_pointer_reply
*req
)
738 fprintf( stderr
, " new_low=%d,", req
->new_low
);
739 fprintf( stderr
, " new_high=%d", req
->new_high
);
742 static void dump_truncate_file_request( const struct truncate_file_request
*req
)
744 fprintf( stderr
, " handle=%d", req
->handle
);
747 static void dump_set_file_time_request( const struct set_file_time_request
*req
)
749 fprintf( stderr
, " handle=%d,", req
->handle
);
750 fprintf( stderr
, " access_time=%ld,", req
->access_time
);
751 fprintf( stderr
, " write_time=%ld", req
->write_time
);
754 static void dump_flush_file_request( const struct flush_file_request
*req
)
756 fprintf( stderr
, " handle=%d", req
->handle
);
759 static void dump_get_file_info_request( const struct get_file_info_request
*req
)
761 fprintf( stderr
, " handle=%d", req
->handle
);
764 static void dump_get_file_info_reply( const struct get_file_info_reply
*req
)
766 fprintf( stderr
, " type=%d,", req
->type
);
767 fprintf( stderr
, " attr=%d,", req
->attr
);
768 fprintf( stderr
, " access_time=%ld,", req
->access_time
);
769 fprintf( stderr
, " write_time=%ld,", req
->write_time
);
770 fprintf( stderr
, " size_high=%d,", req
->size_high
);
771 fprintf( stderr
, " size_low=%d,", req
->size_low
);
772 fprintf( stderr
, " links=%d,", req
->links
);
773 fprintf( stderr
, " index_high=%d,", req
->index_high
);
774 fprintf( stderr
, " index_low=%d,", req
->index_low
);
775 fprintf( stderr
, " serial=%08x", req
->serial
);
778 static void dump_lock_file_request( const struct lock_file_request
*req
)
780 fprintf( stderr
, " handle=%d,", req
->handle
);
781 fprintf( stderr
, " offset_low=%08x,", req
->offset_low
);
782 fprintf( stderr
, " offset_high=%08x,", req
->offset_high
);
783 fprintf( stderr
, " count_low=%08x,", req
->count_low
);
784 fprintf( stderr
, " count_high=%08x", req
->count_high
);
787 static void dump_unlock_file_request( const struct unlock_file_request
*req
)
789 fprintf( stderr
, " handle=%d,", req
->handle
);
790 fprintf( stderr
, " offset_low=%08x,", req
->offset_low
);
791 fprintf( stderr
, " offset_high=%08x,", req
->offset_high
);
792 fprintf( stderr
, " count_low=%08x,", req
->count_low
);
793 fprintf( stderr
, " count_high=%08x", req
->count_high
);
796 static void dump_create_pipe_request( const struct create_pipe_request
*req
)
798 fprintf( stderr
, " inherit=%d", req
->inherit
);
801 static void dump_create_pipe_reply( const struct create_pipe_reply
*req
)
803 fprintf( stderr
, " handle_read=%d,", req
->handle_read
);
804 fprintf( stderr
, " handle_write=%d", req
->handle_write
);
807 static void dump_create_socket_request( const struct create_socket_request
*req
)
809 fprintf( stderr
, " access=%08x,", req
->access
);
810 fprintf( stderr
, " inherit=%d,", req
->inherit
);
811 fprintf( stderr
, " family=%d,", req
->family
);
812 fprintf( stderr
, " type=%d,", req
->type
);
813 fprintf( stderr
, " protocol=%d", req
->protocol
);
816 static void dump_create_socket_reply( const struct create_socket_reply
*req
)
818 fprintf( stderr
, " handle=%d", req
->handle
);
821 static void dump_accept_socket_request( const struct accept_socket_request
*req
)
823 fprintf( stderr
, " lhandle=%d,", req
->lhandle
);
824 fprintf( stderr
, " access=%08x,", req
->access
);
825 fprintf( stderr
, " inherit=%d", req
->inherit
);
828 static void dump_accept_socket_reply( const struct accept_socket_reply
*req
)
830 fprintf( stderr
, " handle=%d", req
->handle
);
833 static void dump_set_socket_event_request( const struct set_socket_event_request
*req
)
835 fprintf( stderr
, " handle=%d,", req
->handle
);
836 fprintf( stderr
, " mask=%08x,", req
->mask
);
837 fprintf( stderr
, " event=%d", req
->event
);
840 static void dump_get_socket_event_request( const struct get_socket_event_request
*req
)
842 fprintf( stderr
, " handle=%d,", req
->handle
);
843 fprintf( stderr
, " service=%d,", req
->service
);
844 fprintf( stderr
, " s_event=%d,", req
->s_event
);
845 fprintf( stderr
, " c_event=%d", req
->c_event
);
848 static void dump_get_socket_event_reply( const struct get_socket_event_reply
*req
)
850 fprintf( stderr
, " mask=%08x,", req
->mask
);
851 fprintf( stderr
, " pmask=%08x,", req
->pmask
);
852 fprintf( stderr
, " state=%08x,", req
->state
);
853 fprintf( stderr
, " errors=" );
854 dump_varargs_ints( cur_size
);
857 static void dump_enable_socket_event_request( const struct enable_socket_event_request
*req
)
859 fprintf( stderr
, " handle=%d,", req
->handle
);
860 fprintf( stderr
, " mask=%08x,", req
->mask
);
861 fprintf( stderr
, " sstate=%08x,", req
->sstate
);
862 fprintf( stderr
, " cstate=%08x", req
->cstate
);
865 static void dump_alloc_console_request( const struct alloc_console_request
*req
)
867 fprintf( stderr
, " access=%08x,", req
->access
);
868 fprintf( stderr
, " inherit=%d,", req
->inherit
);
869 fprintf( stderr
, " pid=%p", req
->pid
);
872 static void dump_alloc_console_reply( const struct alloc_console_reply
*req
)
874 fprintf( stderr
, " handle_in=%d,", req
->handle_in
);
875 fprintf( stderr
, " event=%d", req
->event
);
878 static void dump_free_console_request( const struct free_console_request
*req
)
882 static void dump_get_console_renderer_events_request( const struct get_console_renderer_events_request
*req
)
884 fprintf( stderr
, " handle=%d", req
->handle
);
887 static void dump_get_console_renderer_events_reply( const struct get_console_renderer_events_reply
*req
)
889 fprintf( stderr
, " data=" );
890 dump_varargs_bytes( cur_size
);
893 static void dump_open_console_request( const struct open_console_request
*req
)
895 fprintf( stderr
, " from=%d,", req
->from
);
896 fprintf( stderr
, " access=%08x,", req
->access
);
897 fprintf( stderr
, " inherit=%d,", req
->inherit
);
898 fprintf( stderr
, " share=%d", req
->share
);
901 static void dump_open_console_reply( const struct open_console_reply
*req
)
903 fprintf( stderr
, " handle=%d", req
->handle
);
906 static void dump_get_console_mode_request( const struct get_console_mode_request
*req
)
908 fprintf( stderr
, " handle=%d", req
->handle
);
911 static void dump_get_console_mode_reply( const struct get_console_mode_reply
*req
)
913 fprintf( stderr
, " mode=%d", req
->mode
);
916 static void dump_set_console_mode_request( const struct set_console_mode_request
*req
)
918 fprintf( stderr
, " handle=%d,", req
->handle
);
919 fprintf( stderr
, " mode=%d", req
->mode
);
922 static void dump_set_console_input_info_request( const struct set_console_input_info_request
*req
)
924 fprintf( stderr
, " handle=%d,", req
->handle
);
925 fprintf( stderr
, " mask=%d,", req
->mask
);
926 fprintf( stderr
, " active_sb=%d,", req
->active_sb
);
927 fprintf( stderr
, " history_mode=%d,", req
->history_mode
);
928 fprintf( stderr
, " history_size=%d,", req
->history_size
);
929 fprintf( stderr
, " title=" );
930 dump_varargs_unicode_str( cur_size
);
933 static void dump_get_console_input_info_request( const struct get_console_input_info_request
*req
)
935 fprintf( stderr
, " handle=%d", req
->handle
);
938 static void dump_get_console_input_info_reply( const struct get_console_input_info_reply
*req
)
940 fprintf( stderr
, " history_mode=%d,", req
->history_mode
);
941 fprintf( stderr
, " history_size=%d,", req
->history_size
);
942 fprintf( stderr
, " history_index=%d,", req
->history_index
);
943 fprintf( stderr
, " title=" );
944 dump_varargs_unicode_str( cur_size
);
947 static void dump_append_console_input_history_request( const struct append_console_input_history_request
*req
)
949 fprintf( stderr
, " handle=%d,", req
->handle
);
950 fprintf( stderr
, " line=" );
951 dump_varargs_unicode_str( cur_size
);
954 static void dump_get_console_input_history_request( const struct get_console_input_history_request
*req
)
956 fprintf( stderr
, " handle=%d,", req
->handle
);
957 fprintf( stderr
, " index=%d", req
->index
);
960 static void dump_get_console_input_history_reply( const struct get_console_input_history_reply
*req
)
962 fprintf( stderr
, " total=%d,", req
->total
);
963 fprintf( stderr
, " line=" );
964 dump_varargs_unicode_str( cur_size
);
967 static void dump_create_console_output_request( const struct create_console_output_request
*req
)
969 fprintf( stderr
, " handle_in=%d,", req
->handle_in
);
970 fprintf( stderr
, " access=%d,", req
->access
);
971 fprintf( stderr
, " share=%d,", req
->share
);
972 fprintf( stderr
, " inherit=%d", req
->inherit
);
975 static void dump_create_console_output_reply( const struct create_console_output_reply
*req
)
977 fprintf( stderr
, " handle_out=%d", req
->handle_out
);
980 static void dump_set_console_output_info_request( const struct set_console_output_info_request
*req
)
982 fprintf( stderr
, " handle=%d,", req
->handle
);
983 fprintf( stderr
, " mask=%d,", req
->mask
);
984 fprintf( stderr
, " cursor_size=%d,", req
->cursor_size
);
985 fprintf( stderr
, " cursor_visible=%d,", req
->cursor_visible
);
986 fprintf( stderr
, " cursor_x=%d,", req
->cursor_x
);
987 fprintf( stderr
, " cursor_y=%d,", req
->cursor_y
);
988 fprintf( stderr
, " width=%d,", req
->width
);
989 fprintf( stderr
, " height=%d,", req
->height
);
990 fprintf( stderr
, " attr=%d,", req
->attr
);
991 fprintf( stderr
, " win_left=%d,", req
->win_left
);
992 fprintf( stderr
, " win_top=%d,", req
->win_top
);
993 fprintf( stderr
, " win_right=%d,", req
->win_right
);
994 fprintf( stderr
, " win_bottom=%d,", req
->win_bottom
);
995 fprintf( stderr
, " max_width=%d,", req
->max_width
);
996 fprintf( stderr
, " max_height=%d", req
->max_height
);
999 static void dump_get_console_output_info_request( const struct get_console_output_info_request
*req
)
1001 fprintf( stderr
, " handle=%d", req
->handle
);
1004 static void dump_get_console_output_info_reply( const struct get_console_output_info_reply
*req
)
1006 fprintf( stderr
, " cursor_size=%d,", req
->cursor_size
);
1007 fprintf( stderr
, " cursor_visible=%d,", req
->cursor_visible
);
1008 fprintf( stderr
, " cursor_x=%d,", req
->cursor_x
);
1009 fprintf( stderr
, " cursor_y=%d,", req
->cursor_y
);
1010 fprintf( stderr
, " width=%d,", req
->width
);
1011 fprintf( stderr
, " height=%d,", req
->height
);
1012 fprintf( stderr
, " attr=%d,", req
->attr
);
1013 fprintf( stderr
, " win_left=%d,", req
->win_left
);
1014 fprintf( stderr
, " win_top=%d,", req
->win_top
);
1015 fprintf( stderr
, " win_right=%d,", req
->win_right
);
1016 fprintf( stderr
, " win_bottom=%d,", req
->win_bottom
);
1017 fprintf( stderr
, " max_width=%d,", req
->max_width
);
1018 fprintf( stderr
, " max_height=%d", req
->max_height
);
1021 static void dump_write_console_input_request( const struct write_console_input_request
*req
)
1023 fprintf( stderr
, " handle=%d,", req
->handle
);
1024 fprintf( stderr
, " rec=" );
1025 dump_varargs_input_records( cur_size
);
1028 static void dump_write_console_input_reply( const struct write_console_input_reply
*req
)
1030 fprintf( stderr
, " written=%d", req
->written
);
1033 static void dump_read_console_input_request( const struct read_console_input_request
*req
)
1035 fprintf( stderr
, " handle=%d,", req
->handle
);
1036 fprintf( stderr
, " flush=%d", req
->flush
);
1039 static void dump_read_console_input_reply( const struct read_console_input_reply
*req
)
1041 fprintf( stderr
, " read=%d,", req
->read
);
1042 fprintf( stderr
, " rec=" );
1043 dump_varargs_input_records( cur_size
);
1046 static void dump_write_console_output_request( const struct write_console_output_request
*req
)
1048 fprintf( stderr
, " handle=%d,", req
->handle
);
1049 fprintf( stderr
, " x=%d,", req
->x
);
1050 fprintf( stderr
, " y=%d,", req
->y
);
1051 fprintf( stderr
, " mode=%d,", req
->mode
);
1052 fprintf( stderr
, " wrap=%d,", req
->wrap
);
1053 fprintf( stderr
, " data=" );
1054 dump_varargs_bytes( cur_size
);
1057 static void dump_write_console_output_reply( const struct write_console_output_reply
*req
)
1059 fprintf( stderr
, " written=%d,", req
->written
);
1060 fprintf( stderr
, " width=%d,", req
->width
);
1061 fprintf( stderr
, " height=%d", req
->height
);
1064 static void dump_fill_console_output_request( const struct fill_console_output_request
*req
)
1066 fprintf( stderr
, " handle=%d,", req
->handle
);
1067 fprintf( stderr
, " x=%d,", req
->x
);
1068 fprintf( stderr
, " y=%d,", req
->y
);
1069 fprintf( stderr
, " mode=%d,", req
->mode
);
1070 fprintf( stderr
, " count=%d,", req
->count
);
1071 fprintf( stderr
, " wrap=%d,", req
->wrap
);
1072 fprintf( stderr
, " data=" );
1073 dump_char_info( &req
->data
);
1076 static void dump_fill_console_output_reply( const struct fill_console_output_reply
*req
)
1078 fprintf( stderr
, " written=%d", req
->written
);
1081 static void dump_read_console_output_request( const struct read_console_output_request
*req
)
1083 fprintf( stderr
, " handle=%d,", req
->handle
);
1084 fprintf( stderr
, " x=%d,", req
->x
);
1085 fprintf( stderr
, " y=%d,", req
->y
);
1086 fprintf( stderr
, " mode=%d,", req
->mode
);
1087 fprintf( stderr
, " wrap=%d", req
->wrap
);
1090 static void dump_read_console_output_reply( const struct read_console_output_reply
*req
)
1092 fprintf( stderr
, " width=%d,", req
->width
);
1093 fprintf( stderr
, " height=%d,", req
->height
);
1094 fprintf( stderr
, " data=" );
1095 dump_varargs_bytes( cur_size
);
1098 static void dump_move_console_output_request( const struct move_console_output_request
*req
)
1100 fprintf( stderr
, " handle=%d,", req
->handle
);
1101 fprintf( stderr
, " x_src=%d,", req
->x_src
);
1102 fprintf( stderr
, " y_src=%d,", req
->y_src
);
1103 fprintf( stderr
, " x_dst=%d,", req
->x_dst
);
1104 fprintf( stderr
, " y_dst=%d,", req
->y_dst
);
1105 fprintf( stderr
, " w=%d,", req
->w
);
1106 fprintf( stderr
, " h=%d", req
->h
);
1109 static void dump_create_change_notification_request( const struct create_change_notification_request
*req
)
1111 fprintf( stderr
, " subtree=%d,", req
->subtree
);
1112 fprintf( stderr
, " filter=%d", req
->filter
);
1115 static void dump_create_change_notification_reply( const struct create_change_notification_reply
*req
)
1117 fprintf( stderr
, " handle=%d", req
->handle
);
1120 static void dump_create_mapping_request( const struct create_mapping_request
*req
)
1122 fprintf( stderr
, " size_high=%d,", req
->size_high
);
1123 fprintf( stderr
, " size_low=%d,", req
->size_low
);
1124 fprintf( stderr
, " protect=%d,", req
->protect
);
1125 fprintf( stderr
, " inherit=%d,", req
->inherit
);
1126 fprintf( stderr
, " file_handle=%d,", req
->file_handle
);
1127 fprintf( stderr
, " name=" );
1128 dump_varargs_unicode_str( cur_size
);
1131 static void dump_create_mapping_reply( const struct create_mapping_reply
*req
)
1133 fprintf( stderr
, " handle=%d", req
->handle
);
1136 static void dump_open_mapping_request( const struct open_mapping_request
*req
)
1138 fprintf( stderr
, " access=%08x,", req
->access
);
1139 fprintf( stderr
, " inherit=%d,", req
->inherit
);
1140 fprintf( stderr
, " name=" );
1141 dump_varargs_unicode_str( cur_size
);
1144 static void dump_open_mapping_reply( const struct open_mapping_reply
*req
)
1146 fprintf( stderr
, " handle=%d", req
->handle
);
1149 static void dump_get_mapping_info_request( const struct get_mapping_info_request
*req
)
1151 fprintf( stderr
, " handle=%d", req
->handle
);
1154 static void dump_get_mapping_info_reply( const struct get_mapping_info_reply
*req
)
1156 fprintf( stderr
, " size_high=%d,", req
->size_high
);
1157 fprintf( stderr
, " size_low=%d,", req
->size_low
);
1158 fprintf( stderr
, " protect=%d,", req
->protect
);
1159 fprintf( stderr
, " header_size=%d,", req
->header_size
);
1160 fprintf( stderr
, " base=%p,", req
->base
);
1161 fprintf( stderr
, " shared_file=%d,", req
->shared_file
);
1162 fprintf( stderr
, " shared_size=%d,", req
->shared_size
);
1163 fprintf( stderr
, " drive_type=%d", req
->drive_type
);
1166 static void dump_create_device_request( const struct create_device_request
*req
)
1168 fprintf( stderr
, " access=%08x,", req
->access
);
1169 fprintf( stderr
, " inherit=%d,", req
->inherit
);
1170 fprintf( stderr
, " id=%d", req
->id
);
1173 static void dump_create_device_reply( const struct create_device_reply
*req
)
1175 fprintf( stderr
, " handle=%d", req
->handle
);
1178 static void dump_create_snapshot_request( const struct create_snapshot_request
*req
)
1180 fprintf( stderr
, " inherit=%d,", req
->inherit
);
1181 fprintf( stderr
, " flags=%d,", req
->flags
);
1182 fprintf( stderr
, " pid=%p", req
->pid
);
1185 static void dump_create_snapshot_reply( const struct create_snapshot_reply
*req
)
1187 fprintf( stderr
, " handle=%d", req
->handle
);
1190 static void dump_next_process_request( const struct next_process_request
*req
)
1192 fprintf( stderr
, " handle=%d,", req
->handle
);
1193 fprintf( stderr
, " reset=%d", req
->reset
);
1196 static void dump_next_process_reply( const struct next_process_reply
*req
)
1198 fprintf( stderr
, " count=%d,", req
->count
);
1199 fprintf( stderr
, " pid=%p,", req
->pid
);
1200 fprintf( stderr
, " threads=%d,", req
->threads
);
1201 fprintf( stderr
, " priority=%d", req
->priority
);
1204 static void dump_next_thread_request( const struct next_thread_request
*req
)
1206 fprintf( stderr
, " handle=%d,", req
->handle
);
1207 fprintf( stderr
, " reset=%d", req
->reset
);
1210 static void dump_next_thread_reply( const struct next_thread_reply
*req
)
1212 fprintf( stderr
, " count=%d,", req
->count
);
1213 fprintf( stderr
, " pid=%p,", req
->pid
);
1214 fprintf( stderr
, " tid=%p,", req
->tid
);
1215 fprintf( stderr
, " base_pri=%d,", req
->base_pri
);
1216 fprintf( stderr
, " delta_pri=%d", req
->delta_pri
);
1219 static void dump_next_module_request( const struct next_module_request
*req
)
1221 fprintf( stderr
, " handle=%d,", req
->handle
);
1222 fprintf( stderr
, " reset=%d", req
->reset
);
1225 static void dump_next_module_reply( const struct next_module_reply
*req
)
1227 fprintf( stderr
, " pid=%p,", req
->pid
);
1228 fprintf( stderr
, " base=%p", req
->base
);
1231 static void dump_wait_debug_event_request( const struct wait_debug_event_request
*req
)
1233 fprintf( stderr
, " get_handle=%d", req
->get_handle
);
1236 static void dump_wait_debug_event_reply( const struct wait_debug_event_reply
*req
)
1238 fprintf( stderr
, " pid=%p,", req
->pid
);
1239 fprintf( stderr
, " tid=%p,", req
->tid
);
1240 fprintf( stderr
, " wait=%d,", req
->wait
);
1241 fprintf( stderr
, " event=" );
1242 dump_varargs_debug_event( cur_size
);
1245 static void dump_queue_exception_event_request( const struct queue_exception_event_request
*req
)
1247 fprintf( stderr
, " first=%d,", req
->first
);
1248 fprintf( stderr
, " record=" );
1249 dump_varargs_exc_event( cur_size
);
1252 static void dump_queue_exception_event_reply( const struct queue_exception_event_reply
*req
)
1254 fprintf( stderr
, " handle=%d", req
->handle
);
1257 static void dump_get_exception_status_request( const struct get_exception_status_request
*req
)
1259 fprintf( stderr
, " handle=%d", req
->handle
);
1262 static void dump_get_exception_status_reply( const struct get_exception_status_reply
*req
)
1264 fprintf( stderr
, " status=%d,", req
->status
);
1265 fprintf( stderr
, " context=" );
1266 dump_varargs_context( cur_size
);
1269 static void dump_output_debug_string_request( const struct output_debug_string_request
*req
)
1271 fprintf( stderr
, " string=%p,", req
->string
);
1272 fprintf( stderr
, " unicode=%d,", req
->unicode
);
1273 fprintf( stderr
, " length=%d", req
->length
);
1276 static void dump_continue_debug_event_request( const struct continue_debug_event_request
*req
)
1278 fprintf( stderr
, " pid=%p,", req
->pid
);
1279 fprintf( stderr
, " tid=%p,", req
->tid
);
1280 fprintf( stderr
, " status=%d", req
->status
);
1283 static void dump_debug_process_request( const struct debug_process_request
*req
)
1285 fprintf( stderr
, " pid=%p", req
->pid
);
1288 static void dump_read_process_memory_request( const struct read_process_memory_request
*req
)
1290 fprintf( stderr
, " handle=%d,", req
->handle
);
1291 fprintf( stderr
, " addr=%p", req
->addr
);
1294 static void dump_read_process_memory_reply( const struct read_process_memory_reply
*req
)
1296 fprintf( stderr
, " data=" );
1297 dump_varargs_bytes( cur_size
);
1300 static void dump_write_process_memory_request( const struct write_process_memory_request
*req
)
1302 fprintf( stderr
, " handle=%d,", req
->handle
);
1303 fprintf( stderr
, " addr=%p,", req
->addr
);
1304 fprintf( stderr
, " first_mask=%08x,", req
->first_mask
);
1305 fprintf( stderr
, " last_mask=%08x,", req
->last_mask
);
1306 fprintf( stderr
, " data=" );
1307 dump_varargs_bytes( cur_size
);
1310 static void dump_create_key_request( const struct create_key_request
*req
)
1312 fprintf( stderr
, " parent=%d,", req
->parent
);
1313 fprintf( stderr
, " access=%08x,", req
->access
);
1314 fprintf( stderr
, " options=%08x,", req
->options
);
1315 fprintf( stderr
, " modif=%ld,", req
->modif
);
1316 fprintf( stderr
, " namelen=%d,", req
->namelen
);
1317 fprintf( stderr
, " name=" );
1318 dump_varargs_unicode_str( min(cur_size
,req
->namelen
) );
1319 fputc( ',', stderr
);
1320 fprintf( stderr
, " class=" );
1321 dump_varargs_unicode_str( cur_size
);
1324 static void dump_create_key_reply( const struct create_key_reply
*req
)
1326 fprintf( stderr
, " hkey=%d,", req
->hkey
);
1327 fprintf( stderr
, " created=%d", req
->created
);
1330 static void dump_open_key_request( const struct open_key_request
*req
)
1332 fprintf( stderr
, " parent=%d,", req
->parent
);
1333 fprintf( stderr
, " access=%08x,", req
->access
);
1334 fprintf( stderr
, " name=" );
1335 dump_varargs_unicode_str( cur_size
);
1338 static void dump_open_key_reply( const struct open_key_reply
*req
)
1340 fprintf( stderr
, " hkey=%d", req
->hkey
);
1343 static void dump_delete_key_request( const struct delete_key_request
*req
)
1345 fprintf( stderr
, " hkey=%d", req
->hkey
);
1348 static void dump_enum_key_request( const struct enum_key_request
*req
)
1350 fprintf( stderr
, " hkey=%d,", req
->hkey
);
1351 fprintf( stderr
, " index=%d,", req
->index
);
1352 fprintf( stderr
, " info_class=%d", req
->info_class
);
1355 static void dump_enum_key_reply( const struct enum_key_reply
*req
)
1357 fprintf( stderr
, " subkeys=%d,", req
->subkeys
);
1358 fprintf( stderr
, " max_subkey=%d,", req
->max_subkey
);
1359 fprintf( stderr
, " max_class=%d,", req
->max_class
);
1360 fprintf( stderr
, " values=%d,", req
->values
);
1361 fprintf( stderr
, " max_value=%d,", req
->max_value
);
1362 fprintf( stderr
, " max_data=%d,", req
->max_data
);
1363 fprintf( stderr
, " modif=%ld,", req
->modif
);
1364 fprintf( stderr
, " total=%d,", req
->total
);
1365 fprintf( stderr
, " namelen=%d,", req
->namelen
);
1366 fprintf( stderr
, " name=" );
1367 dump_varargs_unicode_str( min(cur_size
,req
->namelen
) );
1368 fputc( ',', stderr
);
1369 fprintf( stderr
, " class=" );
1370 dump_varargs_unicode_str( cur_size
);
1373 static void dump_set_key_value_request( const struct set_key_value_request
*req
)
1375 fprintf( stderr
, " hkey=%d,", req
->hkey
);
1376 fprintf( stderr
, " type=%d,", req
->type
);
1377 fprintf( stderr
, " namelen=%d,", req
->namelen
);
1378 fprintf( stderr
, " name=" );
1379 dump_varargs_unicode_str( min(cur_size
,req
->namelen
) );
1380 fputc( ',', stderr
);
1381 fprintf( stderr
, " data=" );
1382 dump_varargs_bytes( cur_size
);
1385 static void dump_get_key_value_request( const struct get_key_value_request
*req
)
1387 fprintf( stderr
, " hkey=%d,", req
->hkey
);
1388 fprintf( stderr
, " name=" );
1389 dump_varargs_unicode_str( cur_size
);
1392 static void dump_get_key_value_reply( const struct get_key_value_reply
*req
)
1394 fprintf( stderr
, " type=%d,", req
->type
);
1395 fprintf( stderr
, " total=%d,", req
->total
);
1396 fprintf( stderr
, " data=" );
1397 dump_varargs_bytes( cur_size
);
1400 static void dump_enum_key_value_request( const struct enum_key_value_request
*req
)
1402 fprintf( stderr
, " hkey=%d,", req
->hkey
);
1403 fprintf( stderr
, " index=%d,", req
->index
);
1404 fprintf( stderr
, " info_class=%d", req
->info_class
);
1407 static void dump_enum_key_value_reply( const struct enum_key_value_reply
*req
)
1409 fprintf( stderr
, " type=%d,", req
->type
);
1410 fprintf( stderr
, " total=%d,", req
->total
);
1411 fprintf( stderr
, " namelen=%d,", req
->namelen
);
1412 fprintf( stderr
, " name=" );
1413 dump_varargs_unicode_str( min(cur_size
,req
->namelen
) );
1414 fputc( ',', stderr
);
1415 fprintf( stderr
, " data=" );
1416 dump_varargs_bytes( cur_size
);
1419 static void dump_delete_key_value_request( const struct delete_key_value_request
*req
)
1421 fprintf( stderr
, " hkey=%d,", req
->hkey
);
1422 fprintf( stderr
, " name=" );
1423 dump_varargs_unicode_str( cur_size
);
1426 static void dump_load_registry_request( const struct load_registry_request
*req
)
1428 fprintf( stderr
, " hkey=%d,", req
->hkey
);
1429 fprintf( stderr
, " file=%d,", req
->file
);
1430 fprintf( stderr
, " name=" );
1431 dump_varargs_unicode_str( cur_size
);
1434 static void dump_save_registry_request( const struct save_registry_request
*req
)
1436 fprintf( stderr
, " hkey=%d,", req
->hkey
);
1437 fprintf( stderr
, " file=%d", req
->file
);
1440 static void dump_save_registry_atexit_request( const struct save_registry_atexit_request
*req
)
1442 fprintf( stderr
, " hkey=%d,", req
->hkey
);
1443 fprintf( stderr
, " file=" );
1444 dump_varargs_string( cur_size
);
1447 static void dump_set_registry_levels_request( const struct set_registry_levels_request
*req
)
1449 fprintf( stderr
, " current=%d,", req
->current
);
1450 fprintf( stderr
, " saving=%d,", req
->saving
);
1451 fprintf( stderr
, " period=%d", req
->period
);
1454 static void dump_create_timer_request( const struct create_timer_request
*req
)
1456 fprintf( stderr
, " inherit=%d,", req
->inherit
);
1457 fprintf( stderr
, " manual=%d,", req
->manual
);
1458 fprintf( stderr
, " name=" );
1459 dump_varargs_unicode_str( cur_size
);
1462 static void dump_create_timer_reply( const struct create_timer_reply
*req
)
1464 fprintf( stderr
, " handle=%d", req
->handle
);
1467 static void dump_open_timer_request( const struct open_timer_request
*req
)
1469 fprintf( stderr
, " access=%08x,", req
->access
);
1470 fprintf( stderr
, " inherit=%d,", req
->inherit
);
1471 fprintf( stderr
, " name=" );
1472 dump_varargs_unicode_str( cur_size
);
1475 static void dump_open_timer_reply( const struct open_timer_reply
*req
)
1477 fprintf( stderr
, " handle=%d", req
->handle
);
1480 static void dump_set_timer_request( const struct set_timer_request
*req
)
1482 fprintf( stderr
, " handle=%d,", req
->handle
);
1483 fprintf( stderr
, " sec=%d,", req
->sec
);
1484 fprintf( stderr
, " usec=%d,", req
->usec
);
1485 fprintf( stderr
, " period=%d,", req
->period
);
1486 fprintf( stderr
, " callback=%p,", req
->callback
);
1487 fprintf( stderr
, " arg=%p", req
->arg
);
1490 static void dump_cancel_timer_request( const struct cancel_timer_request
*req
)
1492 fprintf( stderr
, " handle=%d", req
->handle
);
1495 static void dump_get_thread_context_request( const struct get_thread_context_request
*req
)
1497 fprintf( stderr
, " handle=%d,", req
->handle
);
1498 fprintf( stderr
, " flags=%08x", req
->flags
);
1501 static void dump_get_thread_context_reply( const struct get_thread_context_reply
*req
)
1503 fprintf( stderr
, " context=" );
1504 dump_varargs_context( cur_size
);
1507 static void dump_set_thread_context_request( const struct set_thread_context_request
*req
)
1509 fprintf( stderr
, " handle=%d,", req
->handle
);
1510 fprintf( stderr
, " flags=%08x,", req
->flags
);
1511 fprintf( stderr
, " context=" );
1512 dump_varargs_context( cur_size
);
1515 static void dump_get_selector_entry_request( const struct get_selector_entry_request
*req
)
1517 fprintf( stderr
, " handle=%d,", req
->handle
);
1518 fprintf( stderr
, " entry=%d", req
->entry
);
1521 static void dump_get_selector_entry_reply( const struct get_selector_entry_reply
*req
)
1523 fprintf( stderr
, " base=%08x,", req
->base
);
1524 fprintf( stderr
, " limit=%08x,", req
->limit
);
1525 fprintf( stderr
, " flags=%02x", req
->flags
);
1528 static void dump_add_atom_request( const struct add_atom_request
*req
)
1530 fprintf( stderr
, " local=%d,", req
->local
);
1531 fprintf( stderr
, " name=" );
1532 dump_varargs_unicode_str( cur_size
);
1535 static void dump_add_atom_reply( const struct add_atom_reply
*req
)
1537 fprintf( stderr
, " atom=%04x", req
->atom
);
1540 static void dump_delete_atom_request( const struct delete_atom_request
*req
)
1542 fprintf( stderr
, " atom=%04x,", req
->atom
);
1543 fprintf( stderr
, " local=%d", req
->local
);
1546 static void dump_find_atom_request( const struct find_atom_request
*req
)
1548 fprintf( stderr
, " local=%d,", req
->local
);
1549 fprintf( stderr
, " name=" );
1550 dump_varargs_unicode_str( cur_size
);
1553 static void dump_find_atom_reply( const struct find_atom_reply
*req
)
1555 fprintf( stderr
, " atom=%04x", req
->atom
);
1558 static void dump_get_atom_name_request( const struct get_atom_name_request
*req
)
1560 fprintf( stderr
, " atom=%04x,", req
->atom
);
1561 fprintf( stderr
, " local=%d", req
->local
);
1564 static void dump_get_atom_name_reply( const struct get_atom_name_reply
*req
)
1566 fprintf( stderr
, " count=%d,", req
->count
);
1567 fprintf( stderr
, " name=" );
1568 dump_varargs_unicode_str( cur_size
);
1571 static void dump_init_atom_table_request( const struct init_atom_table_request
*req
)
1573 fprintf( stderr
, " entries=%d", req
->entries
);
1576 static void dump_get_msg_queue_request( const struct get_msg_queue_request
*req
)
1580 static void dump_get_msg_queue_reply( const struct get_msg_queue_reply
*req
)
1582 fprintf( stderr
, " handle=%d", req
->handle
);
1585 static void dump_set_queue_mask_request( const struct set_queue_mask_request
*req
)
1587 fprintf( stderr
, " wake_mask=%08x,", req
->wake_mask
);
1588 fprintf( stderr
, " changed_mask=%08x,", req
->changed_mask
);
1589 fprintf( stderr
, " skip_wait=%d", req
->skip_wait
);
1592 static void dump_set_queue_mask_reply( const struct set_queue_mask_reply
*req
)
1594 fprintf( stderr
, " wake_bits=%08x,", req
->wake_bits
);
1595 fprintf( stderr
, " changed_bits=%08x", req
->changed_bits
);
1598 static void dump_get_queue_status_request( const struct get_queue_status_request
*req
)
1600 fprintf( stderr
, " clear=%d", req
->clear
);
1603 static void dump_get_queue_status_reply( const struct get_queue_status_reply
*req
)
1605 fprintf( stderr
, " wake_bits=%08x,", req
->wake_bits
);
1606 fprintf( stderr
, " changed_bits=%08x", req
->changed_bits
);
1609 static void dump_wait_input_idle_request( const struct wait_input_idle_request
*req
)
1611 fprintf( stderr
, " handle=%d,", req
->handle
);
1612 fprintf( stderr
, " timeout=%d", req
->timeout
);
1615 static void dump_wait_input_idle_reply( const struct wait_input_idle_reply
*req
)
1617 fprintf( stderr
, " event=%d", req
->event
);
1620 static void dump_send_message_request( const struct send_message_request
*req
)
1622 fprintf( stderr
, " id=%p,", req
->id
);
1623 fprintf( stderr
, " type=%d,", req
->type
);
1624 fprintf( stderr
, " win=%08x,", req
->win
);
1625 fprintf( stderr
, " msg=%08x,", req
->msg
);
1626 fprintf( stderr
, " wparam=%08x,", req
->wparam
);
1627 fprintf( stderr
, " lparam=%08x,", req
->lparam
);
1628 fprintf( stderr
, " x=%d,", req
->x
);
1629 fprintf( stderr
, " y=%d,", req
->y
);
1630 fprintf( stderr
, " time=%08x,", req
->time
);
1631 fprintf( stderr
, " info=%08x,", req
->info
);
1632 fprintf( stderr
, " timeout=%d,", req
->timeout
);
1633 fprintf( stderr
, " data=" );
1634 dump_varargs_bytes( cur_size
);
1637 static void dump_get_message_request( const struct get_message_request
*req
)
1639 fprintf( stderr
, " flags=%d,", req
->flags
);
1640 fprintf( stderr
, " get_win=%08x,", req
->get_win
);
1641 fprintf( stderr
, " get_first=%08x,", req
->get_first
);
1642 fprintf( stderr
, " get_last=%08x", req
->get_last
);
1645 static void dump_get_message_reply( const struct get_message_reply
*req
)
1647 fprintf( stderr
, " type=%d,", req
->type
);
1648 fprintf( stderr
, " win=%08x,", req
->win
);
1649 fprintf( stderr
, " msg=%08x,", req
->msg
);
1650 fprintf( stderr
, " wparam=%08x,", req
->wparam
);
1651 fprintf( stderr
, " lparam=%08x,", req
->lparam
);
1652 fprintf( stderr
, " x=%d,", req
->x
);
1653 fprintf( stderr
, " y=%d,", req
->y
);
1654 fprintf( stderr
, " time=%08x,", req
->time
);
1655 fprintf( stderr
, " info=%08x,", req
->info
);
1656 fprintf( stderr
, " total=%d,", req
->total
);
1657 fprintf( stderr
, " data=" );
1658 dump_varargs_bytes( cur_size
);
1661 static void dump_reply_message_request( const struct reply_message_request
*req
)
1663 fprintf( stderr
, " result=%08x,", req
->result
);
1664 fprintf( stderr
, " remove=%d,", req
->remove
);
1665 fprintf( stderr
, " data=" );
1666 dump_varargs_bytes( cur_size
);
1669 static void dump_get_message_reply_request( const struct get_message_reply_request
*req
)
1671 fprintf( stderr
, " cancel=%d", req
->cancel
);
1674 static void dump_get_message_reply_reply( const struct get_message_reply_reply
*req
)
1676 fprintf( stderr
, " result=%08x,", req
->result
);
1677 fprintf( stderr
, " data=" );
1678 dump_varargs_bytes( cur_size
);
1681 static void dump_set_win_timer_request( const struct set_win_timer_request
*req
)
1683 fprintf( stderr
, " win=%08x,", req
->win
);
1684 fprintf( stderr
, " msg=%08x,", req
->msg
);
1685 fprintf( stderr
, " id=%08x,", req
->id
);
1686 fprintf( stderr
, " rate=%08x,", req
->rate
);
1687 fprintf( stderr
, " lparam=%08x", req
->lparam
);
1690 static void dump_kill_win_timer_request( const struct kill_win_timer_request
*req
)
1692 fprintf( stderr
, " win=%08x,", req
->win
);
1693 fprintf( stderr
, " msg=%08x,", req
->msg
);
1694 fprintf( stderr
, " id=%08x", req
->id
);
1697 static void dump_create_serial_request( const struct create_serial_request
*req
)
1699 fprintf( stderr
, " access=%08x,", req
->access
);
1700 fprintf( stderr
, " inherit=%d,", req
->inherit
);
1701 fprintf( stderr
, " attributes=%08x,", req
->attributes
);
1702 fprintf( stderr
, " sharing=%08x,", req
->sharing
);
1703 fprintf( stderr
, " name=" );
1704 dump_varargs_string( cur_size
);
1707 static void dump_create_serial_reply( const struct create_serial_reply
*req
)
1709 fprintf( stderr
, " handle=%d", req
->handle
);
1712 static void dump_get_serial_info_request( const struct get_serial_info_request
*req
)
1714 fprintf( stderr
, " handle=%d", req
->handle
);
1717 static void dump_get_serial_info_reply( const struct get_serial_info_reply
*req
)
1719 fprintf( stderr
, " readinterval=%08x,", req
->readinterval
);
1720 fprintf( stderr
, " readconst=%08x,", req
->readconst
);
1721 fprintf( stderr
, " readmult=%08x,", req
->readmult
);
1722 fprintf( stderr
, " writeconst=%08x,", req
->writeconst
);
1723 fprintf( stderr
, " writemult=%08x,", req
->writemult
);
1724 fprintf( stderr
, " eventmask=%08x,", req
->eventmask
);
1725 fprintf( stderr
, " commerror=%08x", req
->commerror
);
1728 static void dump_set_serial_info_request( const struct set_serial_info_request
*req
)
1730 fprintf( stderr
, " handle=%d,", req
->handle
);
1731 fprintf( stderr
, " flags=%d,", req
->flags
);
1732 fprintf( stderr
, " readinterval=%08x,", req
->readinterval
);
1733 fprintf( stderr
, " readconst=%08x,", req
->readconst
);
1734 fprintf( stderr
, " readmult=%08x,", req
->readmult
);
1735 fprintf( stderr
, " writeconst=%08x,", req
->writeconst
);
1736 fprintf( stderr
, " writemult=%08x,", req
->writemult
);
1737 fprintf( stderr
, " eventmask=%08x,", req
->eventmask
);
1738 fprintf( stderr
, " commerror=%08x", req
->commerror
);
1741 static void dump_register_async_request( const struct register_async_request
*req
)
1743 fprintf( stderr
, " handle=%d,", req
->handle
);
1744 fprintf( stderr
, " func=%p,", req
->func
);
1745 fprintf( stderr
, " type=%d,", req
->type
);
1746 fprintf( stderr
, " overlapped=%p,", req
->overlapped
);
1747 fprintf( stderr
, " count=%d,", req
->count
);
1748 fprintf( stderr
, " status=%08x", req
->status
);
1751 static void dump_create_named_pipe_request( const struct create_named_pipe_request
*req
)
1753 fprintf( stderr
, " openmode=%08x,", req
->openmode
);
1754 fprintf( stderr
, " pipemode=%08x,", req
->pipemode
);
1755 fprintf( stderr
, " maxinstances=%08x,", req
->maxinstances
);
1756 fprintf( stderr
, " outsize=%08x,", req
->outsize
);
1757 fprintf( stderr
, " insize=%08x,", req
->insize
);
1758 fprintf( stderr
, " timeout=%08x,", req
->timeout
);
1759 fprintf( stderr
, " filename=" );
1760 dump_varargs_string( cur_size
);
1763 static void dump_create_named_pipe_reply( const struct create_named_pipe_reply
*req
)
1765 fprintf( stderr
, " handle=%d", req
->handle
);
1768 static void dump_open_named_pipe_request( const struct open_named_pipe_request
*req
)
1770 fprintf( stderr
, " access=%08x,", req
->access
);
1771 fprintf( stderr
, " filename=" );
1772 dump_varargs_string( cur_size
);
1775 static void dump_open_named_pipe_reply( const struct open_named_pipe_reply
*req
)
1777 fprintf( stderr
, " handle=%d", req
->handle
);
1780 static void dump_connect_named_pipe_request( const struct connect_named_pipe_request
*req
)
1782 fprintf( stderr
, " handle=%d,", req
->handle
);
1783 fprintf( stderr
, " overlapped=%p,", req
->overlapped
);
1784 fprintf( stderr
, " func=%p", req
->func
);
1787 static void dump_wait_named_pipe_request( const struct wait_named_pipe_request
*req
)
1789 fprintf( stderr
, " timeout=%08x,", req
->timeout
);
1790 fprintf( stderr
, " overlapped=%p,", req
->overlapped
);
1791 fprintf( stderr
, " func=%p,", req
->func
);
1792 fprintf( stderr
, " filename=" );
1793 dump_varargs_string( cur_size
);
1796 static void dump_disconnect_named_pipe_request( const struct disconnect_named_pipe_request
*req
)
1798 fprintf( stderr
, " handle=%d", req
->handle
);
1801 static void dump_get_named_pipe_info_request( const struct get_named_pipe_info_request
*req
)
1803 fprintf( stderr
, " handle=%d", req
->handle
);
1806 static void dump_get_named_pipe_info_reply( const struct get_named_pipe_info_reply
*req
)
1808 fprintf( stderr
, " flags=%08x,", req
->flags
);
1809 fprintf( stderr
, " maxinstances=%08x,", req
->maxinstances
);
1810 fprintf( stderr
, " outsize=%08x,", req
->outsize
);
1811 fprintf( stderr
, " insize=%08x", req
->insize
);
1814 static void dump_create_window_request( const struct create_window_request
*req
)
1816 fprintf( stderr
, " parent=%08x,", req
->parent
);
1817 fprintf( stderr
, " owner=%08x,", req
->owner
);
1818 fprintf( stderr
, " atom=%04x", req
->atom
);
1821 static void dump_create_window_reply( const struct create_window_reply
*req
)
1823 fprintf( stderr
, " handle=%08x", req
->handle
);
1826 static void dump_link_window_request( const struct link_window_request
*req
)
1828 fprintf( stderr
, " handle=%08x,", req
->handle
);
1829 fprintf( stderr
, " parent=%08x,", req
->parent
);
1830 fprintf( stderr
, " previous=%08x", req
->previous
);
1833 static void dump_link_window_reply( const struct link_window_reply
*req
)
1835 fprintf( stderr
, " full_parent=%08x", req
->full_parent
);
1838 static void dump_destroy_window_request( const struct destroy_window_request
*req
)
1840 fprintf( stderr
, " handle=%08x", req
->handle
);
1843 static void dump_set_window_owner_request( const struct set_window_owner_request
*req
)
1845 fprintf( stderr
, " handle=%08x,", req
->handle
);
1846 fprintf( stderr
, " owner=%08x", req
->owner
);
1849 static void dump_set_window_owner_reply( const struct set_window_owner_reply
*req
)
1851 fprintf( stderr
, " full_owner=%08x", req
->full_owner
);
1854 static void dump_get_window_info_request( const struct get_window_info_request
*req
)
1856 fprintf( stderr
, " handle=%08x", req
->handle
);
1859 static void dump_get_window_info_reply( const struct get_window_info_reply
*req
)
1861 fprintf( stderr
, " full_handle=%08x,", req
->full_handle
);
1862 fprintf( stderr
, " pid=%p,", req
->pid
);
1863 fprintf( stderr
, " tid=%p,", req
->tid
);
1864 fprintf( stderr
, " atom=%04x", req
->atom
);
1867 static void dump_set_window_info_request( const struct set_window_info_request
*req
)
1869 fprintf( stderr
, " handle=%08x,", req
->handle
);
1870 fprintf( stderr
, " flags=%08x,", req
->flags
);
1871 fprintf( stderr
, " style=%08x,", req
->style
);
1872 fprintf( stderr
, " ex_style=%08x,", req
->ex_style
);
1873 fprintf( stderr
, " id=%08x,", req
->id
);
1874 fprintf( stderr
, " instance=%p,", req
->instance
);
1875 fprintf( stderr
, " user_data=%p", req
->user_data
);
1878 static void dump_set_window_info_reply( const struct set_window_info_reply
*req
)
1880 fprintf( stderr
, " old_style=%08x,", req
->old_style
);
1881 fprintf( stderr
, " old_ex_style=%08x,", req
->old_ex_style
);
1882 fprintf( stderr
, " old_id=%08x,", req
->old_id
);
1883 fprintf( stderr
, " old_instance=%p,", req
->old_instance
);
1884 fprintf( stderr
, " old_user_data=%p", req
->old_user_data
);
1887 static void dump_get_window_parents_request( const struct get_window_parents_request
*req
)
1889 fprintf( stderr
, " handle=%08x", req
->handle
);
1892 static void dump_get_window_parents_reply( const struct get_window_parents_reply
*req
)
1894 fprintf( stderr
, " count=%d,", req
->count
);
1895 fprintf( stderr
, " parents=" );
1896 dump_varargs_user_handles( cur_size
);
1899 static void dump_get_window_children_request( const struct get_window_children_request
*req
)
1901 fprintf( stderr
, " parent=%08x,", req
->parent
);
1902 fprintf( stderr
, " atom=%04x,", req
->atom
);
1903 fprintf( stderr
, " tid=%p", req
->tid
);
1906 static void dump_get_window_children_reply( const struct get_window_children_reply
*req
)
1908 fprintf( stderr
, " count=%d,", req
->count
);
1909 fprintf( stderr
, " children=" );
1910 dump_varargs_user_handles( cur_size
);
1913 static void dump_get_window_tree_request( const struct get_window_tree_request
*req
)
1915 fprintf( stderr
, " handle=%08x", req
->handle
);
1918 static void dump_get_window_tree_reply( const struct get_window_tree_reply
*req
)
1920 fprintf( stderr
, " parent=%08x,", req
->parent
);
1921 fprintf( stderr
, " owner=%08x,", req
->owner
);
1922 fprintf( stderr
, " next_sibling=%08x,", req
->next_sibling
);
1923 fprintf( stderr
, " prev_sibling=%08x,", req
->prev_sibling
);
1924 fprintf( stderr
, " first_sibling=%08x,", req
->first_sibling
);
1925 fprintf( stderr
, " last_sibling=%08x,", req
->last_sibling
);
1926 fprintf( stderr
, " first_child=%08x,", req
->first_child
);
1927 fprintf( stderr
, " last_child=%08x", req
->last_child
);
1930 static void dump_set_window_rectangles_request( const struct set_window_rectangles_request
*req
)
1932 fprintf( stderr
, " handle=%08x,", req
->handle
);
1933 fprintf( stderr
, " window=" );
1934 dump_rectangle( &req
->window
);
1935 fprintf( stderr
, "," );
1936 fprintf( stderr
, " client=" );
1937 dump_rectangle( &req
->client
);
1940 static void dump_get_window_rectangles_request( const struct get_window_rectangles_request
*req
)
1942 fprintf( stderr
, " handle=%08x", req
->handle
);
1945 static void dump_get_window_rectangles_reply( const struct get_window_rectangles_reply
*req
)
1947 fprintf( stderr
, " window=" );
1948 dump_rectangle( &req
->window
);
1949 fprintf( stderr
, "," );
1950 fprintf( stderr
, " client=" );
1951 dump_rectangle( &req
->client
);
1954 static void dump_get_window_text_request( const struct get_window_text_request
*req
)
1956 fprintf( stderr
, " handle=%08x", req
->handle
);
1959 static void dump_get_window_text_reply( const struct get_window_text_reply
*req
)
1961 fprintf( stderr
, " text=" );
1962 dump_varargs_unicode_str( cur_size
);
1965 static void dump_set_window_text_request( const struct set_window_text_request
*req
)
1967 fprintf( stderr
, " handle=%08x,", req
->handle
);
1968 fprintf( stderr
, " text=" );
1969 dump_varargs_unicode_str( cur_size
);
1972 static void dump_inc_window_paint_count_request( const struct inc_window_paint_count_request
*req
)
1974 fprintf( stderr
, " handle=%08x,", req
->handle
);
1975 fprintf( stderr
, " incr=%d", req
->incr
);
1978 static void dump_get_windows_offset_request( const struct get_windows_offset_request
*req
)
1980 fprintf( stderr
, " from=%08x,", req
->from
);
1981 fprintf( stderr
, " to=%08x", req
->to
);
1984 static void dump_get_windows_offset_reply( const struct get_windows_offset_reply
*req
)
1986 fprintf( stderr
, " x=%d,", req
->x
);
1987 fprintf( stderr
, " y=%d", req
->y
);
1990 static void dump_set_window_property_request( const struct set_window_property_request
*req
)
1992 fprintf( stderr
, " window=%08x,", req
->window
);
1993 fprintf( stderr
, " atom=%04x,", req
->atom
);
1994 fprintf( stderr
, " string=%d,", req
->string
);
1995 fprintf( stderr
, " handle=%d", req
->handle
);
1998 static void dump_remove_window_property_request( const struct remove_window_property_request
*req
)
2000 fprintf( stderr
, " window=%08x,", req
->window
);
2001 fprintf( stderr
, " atom=%04x", req
->atom
);
2004 static void dump_remove_window_property_reply( const struct remove_window_property_reply
*req
)
2006 fprintf( stderr
, " handle=%d", req
->handle
);
2009 static void dump_get_window_property_request( const struct get_window_property_request
*req
)
2011 fprintf( stderr
, " window=%08x,", req
->window
);
2012 fprintf( stderr
, " atom=%04x", req
->atom
);
2015 static void dump_get_window_property_reply( const struct get_window_property_reply
*req
)
2017 fprintf( stderr
, " handle=%d", req
->handle
);
2020 static void dump_get_window_properties_request( const struct get_window_properties_request
*req
)
2022 fprintf( stderr
, " window=%08x", req
->window
);
2025 static void dump_get_window_properties_reply( const struct get_window_properties_reply
*req
)
2027 fprintf( stderr
, " total=%d,", req
->total
);
2028 fprintf( stderr
, " props=" );
2029 dump_varargs_properties( cur_size
);
2032 static const dump_func req_dumpers
[REQ_NB_REQUESTS
] = {
2033 (dump_func
)dump_new_process_request
,
2034 (dump_func
)dump_get_new_process_info_request
,
2035 (dump_func
)dump_new_thread_request
,
2036 (dump_func
)dump_boot_done_request
,
2037 (dump_func
)dump_init_process_request
,
2038 (dump_func
)dump_init_process_done_request
,
2039 (dump_func
)dump_init_thread_request
,
2040 (dump_func
)dump_terminate_process_request
,
2041 (dump_func
)dump_terminate_thread_request
,
2042 (dump_func
)dump_get_process_info_request
,
2043 (dump_func
)dump_set_process_info_request
,
2044 (dump_func
)dump_get_thread_info_request
,
2045 (dump_func
)dump_set_thread_info_request
,
2046 (dump_func
)dump_suspend_thread_request
,
2047 (dump_func
)dump_resume_thread_request
,
2048 (dump_func
)dump_load_dll_request
,
2049 (dump_func
)dump_unload_dll_request
,
2050 (dump_func
)dump_queue_apc_request
,
2051 (dump_func
)dump_get_apc_request
,
2052 (dump_func
)dump_close_handle_request
,
2053 (dump_func
)dump_set_handle_info_request
,
2054 (dump_func
)dump_dup_handle_request
,
2055 (dump_func
)dump_open_process_request
,
2056 (dump_func
)dump_select_request
,
2057 (dump_func
)dump_create_event_request
,
2058 (dump_func
)dump_event_op_request
,
2059 (dump_func
)dump_open_event_request
,
2060 (dump_func
)dump_create_mutex_request
,
2061 (dump_func
)dump_release_mutex_request
,
2062 (dump_func
)dump_open_mutex_request
,
2063 (dump_func
)dump_create_semaphore_request
,
2064 (dump_func
)dump_release_semaphore_request
,
2065 (dump_func
)dump_open_semaphore_request
,
2066 (dump_func
)dump_create_file_request
,
2067 (dump_func
)dump_alloc_file_handle_request
,
2068 (dump_func
)dump_get_handle_fd_request
,
2069 (dump_func
)dump_set_file_pointer_request
,
2070 (dump_func
)dump_truncate_file_request
,
2071 (dump_func
)dump_set_file_time_request
,
2072 (dump_func
)dump_flush_file_request
,
2073 (dump_func
)dump_get_file_info_request
,
2074 (dump_func
)dump_lock_file_request
,
2075 (dump_func
)dump_unlock_file_request
,
2076 (dump_func
)dump_create_pipe_request
,
2077 (dump_func
)dump_create_socket_request
,
2078 (dump_func
)dump_accept_socket_request
,
2079 (dump_func
)dump_set_socket_event_request
,
2080 (dump_func
)dump_get_socket_event_request
,
2081 (dump_func
)dump_enable_socket_event_request
,
2082 (dump_func
)dump_alloc_console_request
,
2083 (dump_func
)dump_free_console_request
,
2084 (dump_func
)dump_get_console_renderer_events_request
,
2085 (dump_func
)dump_open_console_request
,
2086 (dump_func
)dump_get_console_mode_request
,
2087 (dump_func
)dump_set_console_mode_request
,
2088 (dump_func
)dump_set_console_input_info_request
,
2089 (dump_func
)dump_get_console_input_info_request
,
2090 (dump_func
)dump_append_console_input_history_request
,
2091 (dump_func
)dump_get_console_input_history_request
,
2092 (dump_func
)dump_create_console_output_request
,
2093 (dump_func
)dump_set_console_output_info_request
,
2094 (dump_func
)dump_get_console_output_info_request
,
2095 (dump_func
)dump_write_console_input_request
,
2096 (dump_func
)dump_read_console_input_request
,
2097 (dump_func
)dump_write_console_output_request
,
2098 (dump_func
)dump_fill_console_output_request
,
2099 (dump_func
)dump_read_console_output_request
,
2100 (dump_func
)dump_move_console_output_request
,
2101 (dump_func
)dump_create_change_notification_request
,
2102 (dump_func
)dump_create_mapping_request
,
2103 (dump_func
)dump_open_mapping_request
,
2104 (dump_func
)dump_get_mapping_info_request
,
2105 (dump_func
)dump_create_device_request
,
2106 (dump_func
)dump_create_snapshot_request
,
2107 (dump_func
)dump_next_process_request
,
2108 (dump_func
)dump_next_thread_request
,
2109 (dump_func
)dump_next_module_request
,
2110 (dump_func
)dump_wait_debug_event_request
,
2111 (dump_func
)dump_queue_exception_event_request
,
2112 (dump_func
)dump_get_exception_status_request
,
2113 (dump_func
)dump_output_debug_string_request
,
2114 (dump_func
)dump_continue_debug_event_request
,
2115 (dump_func
)dump_debug_process_request
,
2116 (dump_func
)dump_read_process_memory_request
,
2117 (dump_func
)dump_write_process_memory_request
,
2118 (dump_func
)dump_create_key_request
,
2119 (dump_func
)dump_open_key_request
,
2120 (dump_func
)dump_delete_key_request
,
2121 (dump_func
)dump_enum_key_request
,
2122 (dump_func
)dump_set_key_value_request
,
2123 (dump_func
)dump_get_key_value_request
,
2124 (dump_func
)dump_enum_key_value_request
,
2125 (dump_func
)dump_delete_key_value_request
,
2126 (dump_func
)dump_load_registry_request
,
2127 (dump_func
)dump_save_registry_request
,
2128 (dump_func
)dump_save_registry_atexit_request
,
2129 (dump_func
)dump_set_registry_levels_request
,
2130 (dump_func
)dump_create_timer_request
,
2131 (dump_func
)dump_open_timer_request
,
2132 (dump_func
)dump_set_timer_request
,
2133 (dump_func
)dump_cancel_timer_request
,
2134 (dump_func
)dump_get_thread_context_request
,
2135 (dump_func
)dump_set_thread_context_request
,
2136 (dump_func
)dump_get_selector_entry_request
,
2137 (dump_func
)dump_add_atom_request
,
2138 (dump_func
)dump_delete_atom_request
,
2139 (dump_func
)dump_find_atom_request
,
2140 (dump_func
)dump_get_atom_name_request
,
2141 (dump_func
)dump_init_atom_table_request
,
2142 (dump_func
)dump_get_msg_queue_request
,
2143 (dump_func
)dump_set_queue_mask_request
,
2144 (dump_func
)dump_get_queue_status_request
,
2145 (dump_func
)dump_wait_input_idle_request
,
2146 (dump_func
)dump_send_message_request
,
2147 (dump_func
)dump_get_message_request
,
2148 (dump_func
)dump_reply_message_request
,
2149 (dump_func
)dump_get_message_reply_request
,
2150 (dump_func
)dump_set_win_timer_request
,
2151 (dump_func
)dump_kill_win_timer_request
,
2152 (dump_func
)dump_create_serial_request
,
2153 (dump_func
)dump_get_serial_info_request
,
2154 (dump_func
)dump_set_serial_info_request
,
2155 (dump_func
)dump_register_async_request
,
2156 (dump_func
)dump_create_named_pipe_request
,
2157 (dump_func
)dump_open_named_pipe_request
,
2158 (dump_func
)dump_connect_named_pipe_request
,
2159 (dump_func
)dump_wait_named_pipe_request
,
2160 (dump_func
)dump_disconnect_named_pipe_request
,
2161 (dump_func
)dump_get_named_pipe_info_request
,
2162 (dump_func
)dump_create_window_request
,
2163 (dump_func
)dump_link_window_request
,
2164 (dump_func
)dump_destroy_window_request
,
2165 (dump_func
)dump_set_window_owner_request
,
2166 (dump_func
)dump_get_window_info_request
,
2167 (dump_func
)dump_set_window_info_request
,
2168 (dump_func
)dump_get_window_parents_request
,
2169 (dump_func
)dump_get_window_children_request
,
2170 (dump_func
)dump_get_window_tree_request
,
2171 (dump_func
)dump_set_window_rectangles_request
,
2172 (dump_func
)dump_get_window_rectangles_request
,
2173 (dump_func
)dump_get_window_text_request
,
2174 (dump_func
)dump_set_window_text_request
,
2175 (dump_func
)dump_inc_window_paint_count_request
,
2176 (dump_func
)dump_get_windows_offset_request
,
2177 (dump_func
)dump_set_window_property_request
,
2178 (dump_func
)dump_remove_window_property_request
,
2179 (dump_func
)dump_get_window_property_request
,
2180 (dump_func
)dump_get_window_properties_request
,
2183 static const dump_func reply_dumpers
[REQ_NB_REQUESTS
] = {
2184 (dump_func
)dump_new_process_reply
,
2185 (dump_func
)dump_get_new_process_info_reply
,
2186 (dump_func
)dump_new_thread_reply
,
2188 (dump_func
)dump_init_process_reply
,
2189 (dump_func
)dump_init_process_done_reply
,
2190 (dump_func
)dump_init_thread_reply
,
2191 (dump_func
)dump_terminate_process_reply
,
2192 (dump_func
)dump_terminate_thread_reply
,
2193 (dump_func
)dump_get_process_info_reply
,
2195 (dump_func
)dump_get_thread_info_reply
,
2197 (dump_func
)dump_suspend_thread_reply
,
2198 (dump_func
)dump_resume_thread_reply
,
2202 (dump_func
)dump_get_apc_reply
,
2203 (dump_func
)dump_close_handle_reply
,
2204 (dump_func
)dump_set_handle_info_reply
,
2205 (dump_func
)dump_dup_handle_reply
,
2206 (dump_func
)dump_open_process_reply
,
2208 (dump_func
)dump_create_event_reply
,
2210 (dump_func
)dump_open_event_reply
,
2211 (dump_func
)dump_create_mutex_reply
,
2213 (dump_func
)dump_open_mutex_reply
,
2214 (dump_func
)dump_create_semaphore_reply
,
2215 (dump_func
)dump_release_semaphore_reply
,
2216 (dump_func
)dump_open_semaphore_reply
,
2217 (dump_func
)dump_create_file_reply
,
2218 (dump_func
)dump_alloc_file_handle_reply
,
2219 (dump_func
)dump_get_handle_fd_reply
,
2220 (dump_func
)dump_set_file_pointer_reply
,
2224 (dump_func
)dump_get_file_info_reply
,
2227 (dump_func
)dump_create_pipe_reply
,
2228 (dump_func
)dump_create_socket_reply
,
2229 (dump_func
)dump_accept_socket_reply
,
2231 (dump_func
)dump_get_socket_event_reply
,
2233 (dump_func
)dump_alloc_console_reply
,
2235 (dump_func
)dump_get_console_renderer_events_reply
,
2236 (dump_func
)dump_open_console_reply
,
2237 (dump_func
)dump_get_console_mode_reply
,
2240 (dump_func
)dump_get_console_input_info_reply
,
2242 (dump_func
)dump_get_console_input_history_reply
,
2243 (dump_func
)dump_create_console_output_reply
,
2245 (dump_func
)dump_get_console_output_info_reply
,
2246 (dump_func
)dump_write_console_input_reply
,
2247 (dump_func
)dump_read_console_input_reply
,
2248 (dump_func
)dump_write_console_output_reply
,
2249 (dump_func
)dump_fill_console_output_reply
,
2250 (dump_func
)dump_read_console_output_reply
,
2252 (dump_func
)dump_create_change_notification_reply
,
2253 (dump_func
)dump_create_mapping_reply
,
2254 (dump_func
)dump_open_mapping_reply
,
2255 (dump_func
)dump_get_mapping_info_reply
,
2256 (dump_func
)dump_create_device_reply
,
2257 (dump_func
)dump_create_snapshot_reply
,
2258 (dump_func
)dump_next_process_reply
,
2259 (dump_func
)dump_next_thread_reply
,
2260 (dump_func
)dump_next_module_reply
,
2261 (dump_func
)dump_wait_debug_event_reply
,
2262 (dump_func
)dump_queue_exception_event_reply
,
2263 (dump_func
)dump_get_exception_status_reply
,
2267 (dump_func
)dump_read_process_memory_reply
,
2269 (dump_func
)dump_create_key_reply
,
2270 (dump_func
)dump_open_key_reply
,
2272 (dump_func
)dump_enum_key_reply
,
2274 (dump_func
)dump_get_key_value_reply
,
2275 (dump_func
)dump_enum_key_value_reply
,
2281 (dump_func
)dump_create_timer_reply
,
2282 (dump_func
)dump_open_timer_reply
,
2285 (dump_func
)dump_get_thread_context_reply
,
2287 (dump_func
)dump_get_selector_entry_reply
,
2288 (dump_func
)dump_add_atom_reply
,
2290 (dump_func
)dump_find_atom_reply
,
2291 (dump_func
)dump_get_atom_name_reply
,
2293 (dump_func
)dump_get_msg_queue_reply
,
2294 (dump_func
)dump_set_queue_mask_reply
,
2295 (dump_func
)dump_get_queue_status_reply
,
2296 (dump_func
)dump_wait_input_idle_reply
,
2298 (dump_func
)dump_get_message_reply
,
2300 (dump_func
)dump_get_message_reply_reply
,
2303 (dump_func
)dump_create_serial_reply
,
2304 (dump_func
)dump_get_serial_info_reply
,
2307 (dump_func
)dump_create_named_pipe_reply
,
2308 (dump_func
)dump_open_named_pipe_reply
,
2312 (dump_func
)dump_get_named_pipe_info_reply
,
2313 (dump_func
)dump_create_window_reply
,
2314 (dump_func
)dump_link_window_reply
,
2316 (dump_func
)dump_set_window_owner_reply
,
2317 (dump_func
)dump_get_window_info_reply
,
2318 (dump_func
)dump_set_window_info_reply
,
2319 (dump_func
)dump_get_window_parents_reply
,
2320 (dump_func
)dump_get_window_children_reply
,
2321 (dump_func
)dump_get_window_tree_reply
,
2323 (dump_func
)dump_get_window_rectangles_reply
,
2324 (dump_func
)dump_get_window_text_reply
,
2327 (dump_func
)dump_get_windows_offset_reply
,
2329 (dump_func
)dump_remove_window_property_reply
,
2330 (dump_func
)dump_get_window_property_reply
,
2331 (dump_func
)dump_get_window_properties_reply
,
2334 static const char * const req_names
[REQ_NB_REQUESTS
] = {
2336 "get_new_process_info",
2340 "init_process_done",
2342 "terminate_process",
2366 "release_semaphore",
2369 "alloc_file_handle",
2383 "enable_socket_event",
2386 "get_console_renderer_events",
2390 "set_console_input_info",
2391 "get_console_input_info",
2392 "append_console_input_history",
2393 "get_console_input_history",
2394 "create_console_output",
2395 "set_console_output_info",
2396 "get_console_output_info",
2397 "write_console_input",
2398 "read_console_input",
2399 "write_console_output",
2400 "fill_console_output",
2401 "read_console_output",
2402 "move_console_output",
2403 "create_change_notification",
2413 "queue_exception_event",
2414 "get_exception_status",
2415 "output_debug_string",
2416 "continue_debug_event",
2418 "read_process_memory",
2419 "write_process_memory",
2430 "save_registry_atexit",
2431 "set_registry_levels",
2436 "get_thread_context",
2437 "set_thread_context",
2438 "get_selector_entry",
2451 "get_message_reply",
2458 "create_named_pipe",
2460 "connect_named_pipe",
2462 "disconnect_named_pipe",
2463 "get_named_pipe_info",
2470 "get_window_parents",
2471 "get_window_children",
2473 "set_window_rectangles",
2474 "get_window_rectangles",
2477 "inc_window_paint_count",
2478 "get_windows_offset",
2479 "set_window_property",
2480 "remove_window_property",
2481 "get_window_property",
2482 "get_window_properties",
2485 /* ### make_requests end ### */
2486 /* Everything above this line is generated automatically by tools/make_requests */
2488 static const char *get_status_name( unsigned int status
)
2490 #define NAME(status) { #status, STATUS_##status }
2497 NAME(ACCESS_DENIED
),
2498 NAME(ACCESS_VIOLATION
),
2499 NAME(BUFFER_OVERFLOW
),
2500 NAME(CHILD_MUST_BE_VOLATILE
),
2501 NAME(DIRECTORY_NOT_EMPTY
),
2503 NAME(FILE_LOCK_CONFLICT
),
2504 NAME(INVALID_FILE_FOR_SECTION
),
2505 NAME(INVALID_HANDLE
),
2506 NAME(INVALID_PARAMETER
),
2508 NAME(MEDIA_WRITE_PROTECTED
),
2509 NAME(MUTANT_NOT_OWNED
),
2510 NAME(NOT_REGISTRY_FILE
),
2512 NAME(NO_MORE_ENTRIES
),
2513 NAME(NO_MORE_FILES
),
2515 NAME(OBJECT_NAME_COLLISION
),
2516 NAME(OBJECT_NAME_INVALID
),
2517 NAME(OBJECT_NAME_NOT_FOUND
),
2518 NAME(OBJECT_PATH_INVALID
),
2519 NAME(OBJECT_TYPE_MISMATCH
),
2522 NAME(SEMAPHORE_LIMIT_EXCEEDED
),
2523 NAME(SHARING_VIOLATION
),
2524 NAME(SUSPEND_COUNT_EXCEEDED
),
2526 NAME(TOO_MANY_OPENED_FILES
),
2529 { NULL
, 0 } /* terminator */
2534 static char buffer
[10];
2538 for (i
= 0; status_names
[i
].name
; i
++)
2539 if (status_names
[i
].value
== status
) return status_names
[i
].name
;
2541 sprintf( buffer
, "%x", status
);
2545 void trace_request(void)
2547 enum request req
= current
->req
.request_header
.req
;
2548 if (req
< REQ_NB_REQUESTS
)
2550 fprintf( stderr
, "%08x: %s(", (unsigned int)current
, req_names
[req
] );
2551 if (req_dumpers
[req
])
2554 cur_data
= get_req_data();
2555 cur_size
= get_req_data_size();
2556 req_dumpers
[req
]( ¤t
->req
);
2558 fprintf( stderr
, " )\n" );
2560 else fprintf( stderr
, "%08x: %d(?)\n", (unsigned int)current
, req
);
2563 void trace_reply( enum request req
, const union generic_reply
*reply
)
2565 if (req
< REQ_NB_REQUESTS
)
2567 fprintf( stderr
, "%08x: %s() = %s",
2568 (unsigned int)current
, req_names
[req
], get_status_name(current
->error
) );
2569 if (reply_dumpers
[req
])
2571 fprintf( stderr
, " {" );
2573 cur_data
= current
->reply_data
;
2574 cur_size
= reply
->reply_header
.reply_size
;
2575 reply_dumpers
[req
]( reply
);
2576 fprintf( stderr
, " }" );
2578 fputc( '\n', stderr
);
2580 else fprintf( stderr
, "%08x: %d() = %s\n",
2581 (unsigned int)current
, req
, get_status_name(current
->error
) );