2 * Server request tracing
4 * Copyright (C) 1999 Alexandre Julliard
22 /* utility functions */
24 static const void *get_data( const void *req
)
26 return (char *)get_req_data(req
) + cur_pos
;
29 static size_t get_size( const void *req
)
31 return get_req_data_size(req
) - cur_pos
;
34 static void dump_uints( const int *ptr
, int len
)
39 fprintf( stderr
, "%08x", *ptr
++ );
40 if (--len
) fputc( ',', stderr
);
45 static void dump_context( const CONTEXT
*context
)
48 fprintf( stderr
, "{flags=%08lx,eax=%08lx,ebx=%08lx,ecx=%08lx,edx=%08lx,esi=%08lx,edi=%08lx,"
49 "ebp=%08lx,eip=%08lx,esp=%08lx,eflags=%08lx,cs=%04lx,ds=%04lx,es=%04lx,"
50 "fs=%04lx,gs=%04lx,dr0=%08lx,dr1=%08lx,dr2=%08lx,dr3=%08lx,dr6=%08lx,dr7=%08lx,",
51 context
->ContextFlags
, context
->Eax
, context
->Ebx
, context
->Ecx
, context
->Edx
,
52 context
->Esi
, context
->Edi
, context
->Ebp
, context
->Eip
, context
->Esp
, context
->EFlags
,
53 context
->SegCs
, context
->SegDs
, context
->SegEs
, context
->SegFs
, context
->SegGs
,
54 context
->Dr0
, context
->Dr1
, context
->Dr2
, context
->Dr3
, context
->Dr6
, context
->Dr7
);
55 fprintf( stderr
, "float=" );
56 dump_uints( (int *)&context
->FloatSave
, sizeof(context
->FloatSave
) / sizeof(int) );
57 fprintf( stderr
, "}" );
59 dump_uints( (int *)context
, sizeof(*context
) / sizeof(int) );
63 static void dump_exc_record( const EXCEPTION_RECORD
*rec
)
66 fprintf( stderr
, "{code=%lx,flags=%lx,rec=%p,addr=%p,params={",
67 rec
->ExceptionCode
, rec
->ExceptionFlags
, rec
->ExceptionRecord
,
68 rec
->ExceptionAddress
);
69 for (i
= 0; i
< min(rec
->NumberParameters
,EXCEPTION_MAXIMUM_PARAMETERS
); i
++)
71 if (i
) fputc( ',', stderr
);
72 fprintf( stderr
, "%lx", rec
->ExceptionInformation
[i
] );
77 static size_t dump_varargs_ints( const void *req
)
79 const int *data
= get_data(req
);
80 size_t len
= get_size(req
) / sizeof(*data
);
85 fprintf( stderr
, "%d", *data
++ );
86 if (--len
) fputc( ',', stderr
);
92 static size_t dump_varargs_handles( const void *req
)
94 const handle_t
*data
= get_data(req
);
95 size_t len
= get_size(req
) / sizeof(*data
);
100 fprintf( stderr
, "%d", *data
++ );
101 if (--len
) fputc( ',', stderr
);
103 fputc( '}', stderr
);
104 return get_size(req
);
107 static size_t dump_varargs_ptrs( const void *req
)
109 void * const *data
= get_data(req
);
110 size_t len
= get_size(req
) / sizeof(*data
);
112 fputc( '{', stderr
);
115 fprintf( stderr
, "%p", *data
++ );
116 if (--len
) fputc( ',', stderr
);
118 fputc( '}', stderr
);
119 return get_size(req
);
122 static size_t dump_varargs_user_handles( const void *req
)
124 const user_handle_t
*data
= get_data(req
);
125 size_t len
= get_size(req
) / sizeof(*data
);
127 fputc( '{', stderr
);
130 fprintf( stderr
, "%08x", *data
++ );
131 if (--len
) fputc( ',', stderr
);
133 fputc( '}', stderr
);
134 return get_size(req
);
137 static size_t dump_varargs_bytes( const void *req
)
139 const unsigned char *data
= get_data(req
);
140 size_t len
= get_size(req
);
142 fputc( '{', stderr
);
145 fprintf( stderr
, "%02x", *data
++ );
146 if (--len
) fputc( ',', stderr
);
148 fputc( '}', stderr
);
149 return get_size(req
);
152 static size_t dump_varargs_string( const void *req
)
154 fprintf( stderr
, "\"%.*s\"", (int)get_size(req
), (char *)get_data(req
) );
155 return get_size(req
);
158 static size_t dump_varargs_unicode_len_str( const void *req
)
160 const WCHAR
*str
= get_data(req
);
161 int len
= *str
++ + sizeof(WCHAR
);
162 len
= min( len
, get_size(req
) );
163 fprintf( stderr
, "L\"" );
164 if (len
>= sizeof(WCHAR
)) dump_strW( str
, (len
/ sizeof(WCHAR
)) - 1, stderr
, "\"\"" );
165 fputc( '\"', stderr
);
169 static size_t dump_varargs_unicode_str( const void *req
)
171 fprintf( stderr
, "L\"" );
172 dump_strW( get_data(req
), get_size(req
) / sizeof(WCHAR
), stderr
, "\"\"" );
173 fputc( '\"', stderr
);
174 return get_size(req
);
177 static size_t dump_varargs_context( const void *req
)
179 dump_context( get_data(req
) );
180 return get_size(req
);
183 static size_t dump_varargs_exc_event( const void *req
)
185 const CONTEXT
*ptr
= get_data(req
);
186 fprintf( stderr
, "{context=" );
188 fprintf( stderr
, ",rec=" );
189 dump_exc_record( (EXCEPTION_RECORD
*)(ptr
+ 1) );
190 fputc( '}', stderr
);
191 return get_size(req
);
194 static size_t dump_varargs_debug_event( const void *req
)
196 const debug_event_t
*event
= get_data(req
);
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
);
255 return get_size(req
);
258 static size_t dump_varargs_input_records( const void *req
)
260 const INPUT_RECORD
*rec
= get_data(req
);
261 size_t len
= get_size(req
) / sizeof(*rec
);
263 fputc( '{', stderr
);
266 fprintf( stderr
, "{%04x,...}", rec
->EventType
);
268 if (--len
) fputc( ',', stderr
);
270 fputc( '}', stderr
);
271 return get_size(req
);
274 typedef void (*dump_func
)( const void *req
);
276 /* Everything below this line is generated automatically by tools/make_requests */
277 /* ### make_requests begin ### */
279 static void dump_new_process_request( const struct new_process_request
*req
)
281 fprintf( stderr
, " inherit_all=%d,", req
->inherit_all
);
282 fprintf( stderr
, " create_flags=%d,", req
->create_flags
);
283 fprintf( stderr
, " start_flags=%d,", req
->start_flags
);
284 fprintf( stderr
, " exe_file=%d,", req
->exe_file
);
285 fprintf( stderr
, " hstdin=%d,", req
->hstdin
);
286 fprintf( stderr
, " hstdout=%d,", req
->hstdout
);
287 fprintf( stderr
, " hstderr=%d,", req
->hstderr
);
288 fprintf( stderr
, " cmd_show=%d,", req
->cmd_show
);
289 fprintf( stderr
, " filename=" );
290 cur_pos
+= dump_varargs_string( req
);
293 static void dump_new_process_reply( const struct new_process_request
*req
)
295 fprintf( stderr
, " info=%d", req
->info
);
298 static void dump_get_new_process_info_request( const struct get_new_process_info_request
*req
)
300 fprintf( stderr
, " info=%d,", req
->info
);
301 fprintf( stderr
, " pinherit=%d,", req
->pinherit
);
302 fprintf( stderr
, " tinherit=%d", req
->tinherit
);
305 static void dump_get_new_process_info_reply( const struct get_new_process_info_request
*req
)
307 fprintf( stderr
, " pid=%p,", req
->pid
);
308 fprintf( stderr
, " phandle=%d,", req
->phandle
);
309 fprintf( stderr
, " tid=%p,", req
->tid
);
310 fprintf( stderr
, " thandle=%d,", req
->thandle
);
311 fprintf( stderr
, " event=%d", req
->event
);
314 static void dump_new_thread_request( const struct new_thread_request
*req
)
316 fprintf( stderr
, " suspend=%d,", req
->suspend
);
317 fprintf( stderr
, " inherit=%d,", req
->inherit
);
318 fprintf( stderr
, " request_fd=%d", req
->request_fd
);
321 static void dump_new_thread_reply( const struct new_thread_request
*req
)
323 fprintf( stderr
, " tid=%p,", req
->tid
);
324 fprintf( stderr
, " handle=%d", req
->handle
);
327 static void dump_boot_done_request( const struct boot_done_request
*req
)
329 fprintf( stderr
, " debug_level=%d", req
->debug_level
);
332 static void dump_init_process_request( const struct init_process_request
*req
)
334 fprintf( stderr
, " ldt_copy=%p,", req
->ldt_copy
);
335 fprintf( stderr
, " ppid=%d", req
->ppid
);
338 static void dump_init_process_reply( const struct init_process_request
*req
)
340 fprintf( stderr
, " create_flags=%d,", req
->create_flags
);
341 fprintf( stderr
, " start_flags=%d,", req
->start_flags
);
342 fprintf( stderr
, " server_start=%08x,", req
->server_start
);
343 fprintf( stderr
, " exe_file=%d,", req
->exe_file
);
344 fprintf( stderr
, " hstdin=%d,", req
->hstdin
);
345 fprintf( stderr
, " hstdout=%d,", req
->hstdout
);
346 fprintf( stderr
, " hstderr=%d,", req
->hstderr
);
347 fprintf( stderr
, " cmd_show=%d,", req
->cmd_show
);
348 fprintf( stderr
, " filename=" );
349 cur_pos
+= dump_varargs_string( req
);
352 static void dump_init_process_done_request( const struct init_process_done_request
*req
)
354 fprintf( stderr
, " module=%p,", req
->module
);
355 fprintf( stderr
, " entry=%p,", req
->entry
);
356 fprintf( stderr
, " name=%p,", req
->name
);
357 fprintf( stderr
, " exe_file=%d,", req
->exe_file
);
358 fprintf( stderr
, " gui=%d", req
->gui
);
361 static void dump_init_process_done_reply( const struct init_process_done_request
*req
)
363 fprintf( stderr
, " debugged=%d", req
->debugged
);
366 static void dump_init_thread_request( const struct init_thread_request
*req
)
368 fprintf( stderr
, " unix_pid=%d,", req
->unix_pid
);
369 fprintf( stderr
, " teb=%p,", req
->teb
);
370 fprintf( stderr
, " entry=%p,", req
->entry
);
371 fprintf( stderr
, " reply_fd=%d,", req
->reply_fd
);
372 fprintf( stderr
, " wait_fd=%d", req
->wait_fd
);
375 static void dump_init_thread_reply( const struct init_thread_request
*req
)
377 fprintf( stderr
, " pid=%p,", req
->pid
);
378 fprintf( stderr
, " tid=%p,", req
->tid
);
379 fprintf( stderr
, " boot=%d,", req
->boot
);
380 fprintf( stderr
, " version=%d", req
->version
);
383 static void dump_set_thread_buffer_request( const struct set_thread_buffer_request
*req
)
385 fprintf( stderr
, " fd=%d", req
->fd
);
388 static void dump_set_thread_buffer_reply( const struct set_thread_buffer_request
*req
)
390 fprintf( stderr
, " offset=%08x,", req
->offset
);
391 fprintf( stderr
, " size=%08x", req
->size
);
394 static void dump_terminate_process_request( const struct terminate_process_request
*req
)
396 fprintf( stderr
, " handle=%d,", req
->handle
);
397 fprintf( stderr
, " exit_code=%d", req
->exit_code
);
400 static void dump_terminate_process_reply( const struct terminate_process_request
*req
)
402 fprintf( stderr
, " self=%d", req
->self
);
405 static void dump_terminate_thread_request( const struct terminate_thread_request
*req
)
407 fprintf( stderr
, " handle=%d,", req
->handle
);
408 fprintf( stderr
, " exit_code=%d", req
->exit_code
);
411 static void dump_terminate_thread_reply( const struct terminate_thread_request
*req
)
413 fprintf( stderr
, " self=%d,", req
->self
);
414 fprintf( stderr
, " last=%d", req
->last
);
417 static void dump_get_process_info_request( const struct get_process_info_request
*req
)
419 fprintf( stderr
, " handle=%d", req
->handle
);
422 static void dump_get_process_info_reply( const struct get_process_info_request
*req
)
424 fprintf( stderr
, " pid=%p,", req
->pid
);
425 fprintf( stderr
, " debugged=%d,", req
->debugged
);
426 fprintf( stderr
, " exit_code=%d,", req
->exit_code
);
427 fprintf( stderr
, " priority=%d,", req
->priority
);
428 fprintf( stderr
, " process_affinity=%d,", req
->process_affinity
);
429 fprintf( stderr
, " system_affinity=%d", req
->system_affinity
);
432 static void dump_set_process_info_request( const struct set_process_info_request
*req
)
434 fprintf( stderr
, " handle=%d,", req
->handle
);
435 fprintf( stderr
, " mask=%d,", req
->mask
);
436 fprintf( stderr
, " priority=%d,", req
->priority
);
437 fprintf( stderr
, " affinity=%d", req
->affinity
);
440 static void dump_get_thread_info_request( const struct get_thread_info_request
*req
)
442 fprintf( stderr
, " handle=%d,", req
->handle
);
443 fprintf( stderr
, " tid_in=%p", req
->tid_in
);
446 static void dump_get_thread_info_reply( const struct get_thread_info_request
*req
)
448 fprintf( stderr
, " tid=%p,", req
->tid
);
449 fprintf( stderr
, " teb=%p,", req
->teb
);
450 fprintf( stderr
, " exit_code=%d,", req
->exit_code
);
451 fprintf( stderr
, " priority=%d", req
->priority
);
454 static void dump_set_thread_info_request( const struct set_thread_info_request
*req
)
456 fprintf( stderr
, " handle=%d,", req
->handle
);
457 fprintf( stderr
, " mask=%d,", req
->mask
);
458 fprintf( stderr
, " priority=%d,", req
->priority
);
459 fprintf( stderr
, " affinity=%d", req
->affinity
);
462 static void dump_suspend_thread_request( const struct suspend_thread_request
*req
)
464 fprintf( stderr
, " handle=%d", req
->handle
);
467 static void dump_suspend_thread_reply( const struct suspend_thread_request
*req
)
469 fprintf( stderr
, " count=%d", req
->count
);
472 static void dump_resume_thread_request( const struct resume_thread_request
*req
)
474 fprintf( stderr
, " handle=%d", req
->handle
);
477 static void dump_resume_thread_reply( const struct resume_thread_request
*req
)
479 fprintf( stderr
, " count=%d", req
->count
);
482 static void dump_load_dll_request( const struct load_dll_request
*req
)
484 fprintf( stderr
, " handle=%d,", req
->handle
);
485 fprintf( stderr
, " base=%p,", req
->base
);
486 fprintf( stderr
, " dbg_offset=%d,", req
->dbg_offset
);
487 fprintf( stderr
, " dbg_size=%d,", req
->dbg_size
);
488 fprintf( stderr
, " name=%p", req
->name
);
491 static void dump_unload_dll_request( const struct unload_dll_request
*req
)
493 fprintf( stderr
, " base=%p", req
->base
);
496 static void dump_queue_apc_request( const struct queue_apc_request
*req
)
498 fprintf( stderr
, " handle=%d,", req
->handle
);
499 fprintf( stderr
, " user=%d,", req
->user
);
500 fprintf( stderr
, " func=%p,", req
->func
);
501 fprintf( stderr
, " param=%p", req
->param
);
504 static void dump_get_apc_request( const struct get_apc_request
*req
)
506 fprintf( stderr
, " alertable=%d", req
->alertable
);
509 static void dump_get_apc_reply( const struct get_apc_request
*req
)
511 fprintf( stderr
, " func=%p,", req
->func
);
512 fprintf( stderr
, " type=%d,", req
->type
);
513 fprintf( stderr
, " args=" );
514 cur_pos
+= dump_varargs_ptrs( req
);
517 static void dump_close_handle_request( const struct close_handle_request
*req
)
519 fprintf( stderr
, " handle=%d", req
->handle
);
522 static void dump_close_handle_reply( const struct close_handle_request
*req
)
524 fprintf( stderr
, " fd=%d", req
->fd
);
527 static void dump_set_handle_info_request( const struct set_handle_info_request
*req
)
529 fprintf( stderr
, " handle=%d,", req
->handle
);
530 fprintf( stderr
, " flags=%d,", req
->flags
);
531 fprintf( stderr
, " mask=%d,", req
->mask
);
532 fprintf( stderr
, " fd=%d", req
->fd
);
535 static void dump_set_handle_info_reply( const struct set_handle_info_request
*req
)
537 fprintf( stderr
, " old_flags=%d,", req
->old_flags
);
538 fprintf( stderr
, " cur_fd=%d", req
->cur_fd
);
541 static void dump_dup_handle_request( const struct dup_handle_request
*req
)
543 fprintf( stderr
, " src_process=%d,", req
->src_process
);
544 fprintf( stderr
, " src_handle=%d,", req
->src_handle
);
545 fprintf( stderr
, " dst_process=%d,", req
->dst_process
);
546 fprintf( stderr
, " access=%08x,", req
->access
);
547 fprintf( stderr
, " inherit=%d,", req
->inherit
);
548 fprintf( stderr
, " options=%d", req
->options
);
551 static void dump_dup_handle_reply( const struct dup_handle_request
*req
)
553 fprintf( stderr
, " handle=%d,", req
->handle
);
554 fprintf( stderr
, " fd=%d", req
->fd
);
557 static void dump_open_process_request( const struct open_process_request
*req
)
559 fprintf( stderr
, " pid=%p,", req
->pid
);
560 fprintf( stderr
, " access=%08x,", req
->access
);
561 fprintf( stderr
, " inherit=%d", req
->inherit
);
564 static void dump_open_process_reply( const struct open_process_request
*req
)
566 fprintf( stderr
, " handle=%d", req
->handle
);
569 static void dump_select_request( const struct select_request
*req
)
571 fprintf( stderr
, " flags=%d,", req
->flags
);
572 fprintf( stderr
, " cookie=%p,", req
->cookie
);
573 fprintf( stderr
, " sec=%d,", req
->sec
);
574 fprintf( stderr
, " usec=%d,", req
->usec
);
575 fprintf( stderr
, " handles=" );
576 cur_pos
+= dump_varargs_handles( req
);
579 static void dump_create_event_request( const struct create_event_request
*req
)
581 fprintf( stderr
, " manual_reset=%d,", req
->manual_reset
);
582 fprintf( stderr
, " initial_state=%d,", req
->initial_state
);
583 fprintf( stderr
, " inherit=%d,", req
->inherit
);
584 fprintf( stderr
, " name=" );
585 cur_pos
+= dump_varargs_unicode_str( req
);
588 static void dump_create_event_reply( const struct create_event_request
*req
)
590 fprintf( stderr
, " handle=%d", req
->handle
);
593 static void dump_event_op_request( const struct event_op_request
*req
)
595 fprintf( stderr
, " handle=%d,", req
->handle
);
596 fprintf( stderr
, " op=%d", req
->op
);
599 static void dump_open_event_request( const struct open_event_request
*req
)
601 fprintf( stderr
, " access=%08x,", req
->access
);
602 fprintf( stderr
, " inherit=%d,", req
->inherit
);
603 fprintf( stderr
, " name=" );
604 cur_pos
+= dump_varargs_unicode_str( req
);
607 static void dump_open_event_reply( const struct open_event_request
*req
)
609 fprintf( stderr
, " handle=%d", req
->handle
);
612 static void dump_create_mutex_request( const struct create_mutex_request
*req
)
614 fprintf( stderr
, " owned=%d,", req
->owned
);
615 fprintf( stderr
, " inherit=%d,", req
->inherit
);
616 fprintf( stderr
, " name=" );
617 cur_pos
+= dump_varargs_unicode_str( req
);
620 static void dump_create_mutex_reply( const struct create_mutex_request
*req
)
622 fprintf( stderr
, " handle=%d", req
->handle
);
625 static void dump_release_mutex_request( const struct release_mutex_request
*req
)
627 fprintf( stderr
, " handle=%d", req
->handle
);
630 static void dump_open_mutex_request( const struct open_mutex_request
*req
)
632 fprintf( stderr
, " access=%08x,", req
->access
);
633 fprintf( stderr
, " inherit=%d,", req
->inherit
);
634 fprintf( stderr
, " name=" );
635 cur_pos
+= dump_varargs_unicode_str( req
);
638 static void dump_open_mutex_reply( const struct open_mutex_request
*req
)
640 fprintf( stderr
, " handle=%d", req
->handle
);
643 static void dump_create_semaphore_request( const struct create_semaphore_request
*req
)
645 fprintf( stderr
, " initial=%08x,", req
->initial
);
646 fprintf( stderr
, " max=%08x,", req
->max
);
647 fprintf( stderr
, " inherit=%d,", req
->inherit
);
648 fprintf( stderr
, " name=" );
649 cur_pos
+= dump_varargs_unicode_str( req
);
652 static void dump_create_semaphore_reply( const struct create_semaphore_request
*req
)
654 fprintf( stderr
, " handle=%d", req
->handle
);
657 static void dump_release_semaphore_request( const struct release_semaphore_request
*req
)
659 fprintf( stderr
, " handle=%d,", req
->handle
);
660 fprintf( stderr
, " count=%08x", req
->count
);
663 static void dump_release_semaphore_reply( const struct release_semaphore_request
*req
)
665 fprintf( stderr
, " prev_count=%08x", req
->prev_count
);
668 static void dump_open_semaphore_request( const struct open_semaphore_request
*req
)
670 fprintf( stderr
, " access=%08x,", req
->access
);
671 fprintf( stderr
, " inherit=%d,", req
->inherit
);
672 fprintf( stderr
, " name=" );
673 cur_pos
+= dump_varargs_unicode_str( req
);
676 static void dump_open_semaphore_reply( const struct open_semaphore_request
*req
)
678 fprintf( stderr
, " handle=%d", req
->handle
);
681 static void dump_create_file_request( const struct create_file_request
*req
)
683 fprintf( stderr
, " access=%08x,", req
->access
);
684 fprintf( stderr
, " inherit=%d,", req
->inherit
);
685 fprintf( stderr
, " sharing=%08x,", req
->sharing
);
686 fprintf( stderr
, " create=%d,", req
->create
);
687 fprintf( stderr
, " attrs=%08x,", req
->attrs
);
688 fprintf( stderr
, " filename=" );
689 cur_pos
+= dump_varargs_string( req
);
692 static void dump_create_file_reply( const struct create_file_request
*req
)
694 fprintf( stderr
, " handle=%d", req
->handle
);
697 static void dump_alloc_file_handle_request( const struct alloc_file_handle_request
*req
)
699 fprintf( stderr
, " access=%08x,", req
->access
);
700 fprintf( stderr
, " fd=%d", req
->fd
);
703 static void dump_alloc_file_handle_reply( const struct alloc_file_handle_request
*req
)
705 fprintf( stderr
, " handle=%d", req
->handle
);
708 static void dump_get_handle_fd_request( const struct get_handle_fd_request
*req
)
710 fprintf( stderr
, " handle=%d,", req
->handle
);
711 fprintf( stderr
, " access=%08x", req
->access
);
714 static void dump_get_handle_fd_reply( const struct get_handle_fd_request
*req
)
716 fprintf( stderr
, " fd=%d,", req
->fd
);
717 fprintf( stderr
, " type=%d", req
->type
);
720 static void dump_set_file_pointer_request( const struct set_file_pointer_request
*req
)
722 fprintf( stderr
, " handle=%d,", req
->handle
);
723 fprintf( stderr
, " low=%d,", req
->low
);
724 fprintf( stderr
, " high=%d,", req
->high
);
725 fprintf( stderr
, " whence=%d", req
->whence
);
728 static void dump_set_file_pointer_reply( const struct set_file_pointer_request
*req
)
730 fprintf( stderr
, " new_low=%d,", req
->new_low
);
731 fprintf( stderr
, " new_high=%d", req
->new_high
);
734 static void dump_truncate_file_request( const struct truncate_file_request
*req
)
736 fprintf( stderr
, " handle=%d", req
->handle
);
739 static void dump_set_file_time_request( const struct set_file_time_request
*req
)
741 fprintf( stderr
, " handle=%d,", req
->handle
);
742 fprintf( stderr
, " access_time=%ld,", req
->access_time
);
743 fprintf( stderr
, " write_time=%ld", req
->write_time
);
746 static void dump_flush_file_request( const struct flush_file_request
*req
)
748 fprintf( stderr
, " handle=%d", req
->handle
);
751 static void dump_get_file_info_request( const struct get_file_info_request
*req
)
753 fprintf( stderr
, " handle=%d", req
->handle
);
756 static void dump_get_file_info_reply( const struct get_file_info_request
*req
)
758 fprintf( stderr
, " type=%d,", req
->type
);
759 fprintf( stderr
, " attr=%d,", req
->attr
);
760 fprintf( stderr
, " access_time=%ld,", req
->access_time
);
761 fprintf( stderr
, " write_time=%ld,", req
->write_time
);
762 fprintf( stderr
, " size_high=%d,", req
->size_high
);
763 fprintf( stderr
, " size_low=%d,", req
->size_low
);
764 fprintf( stderr
, " links=%d,", req
->links
);
765 fprintf( stderr
, " index_high=%d,", req
->index_high
);
766 fprintf( stderr
, " index_low=%d,", req
->index_low
);
767 fprintf( stderr
, " serial=%08x", req
->serial
);
770 static void dump_lock_file_request( const struct lock_file_request
*req
)
772 fprintf( stderr
, " handle=%d,", req
->handle
);
773 fprintf( stderr
, " offset_low=%08x,", req
->offset_low
);
774 fprintf( stderr
, " offset_high=%08x,", req
->offset_high
);
775 fprintf( stderr
, " count_low=%08x,", req
->count_low
);
776 fprintf( stderr
, " count_high=%08x", req
->count_high
);
779 static void dump_unlock_file_request( const struct unlock_file_request
*req
)
781 fprintf( stderr
, " handle=%d,", req
->handle
);
782 fprintf( stderr
, " offset_low=%08x,", req
->offset_low
);
783 fprintf( stderr
, " offset_high=%08x,", req
->offset_high
);
784 fprintf( stderr
, " count_low=%08x,", req
->count_low
);
785 fprintf( stderr
, " count_high=%08x", req
->count_high
);
788 static void dump_create_pipe_request( const struct create_pipe_request
*req
)
790 fprintf( stderr
, " inherit=%d", req
->inherit
);
793 static void dump_create_pipe_reply( const struct create_pipe_request
*req
)
795 fprintf( stderr
, " handle_read=%d,", req
->handle_read
);
796 fprintf( stderr
, " handle_write=%d", req
->handle_write
);
799 static void dump_create_socket_request( const struct create_socket_request
*req
)
801 fprintf( stderr
, " access=%08x,", req
->access
);
802 fprintf( stderr
, " inherit=%d,", req
->inherit
);
803 fprintf( stderr
, " family=%d,", req
->family
);
804 fprintf( stderr
, " type=%d,", req
->type
);
805 fprintf( stderr
, " protocol=%d", req
->protocol
);
808 static void dump_create_socket_reply( const struct create_socket_request
*req
)
810 fprintf( stderr
, " handle=%d", req
->handle
);
813 static void dump_accept_socket_request( const struct accept_socket_request
*req
)
815 fprintf( stderr
, " lhandle=%d,", req
->lhandle
);
816 fprintf( stderr
, " access=%08x,", req
->access
);
817 fprintf( stderr
, " inherit=%d", req
->inherit
);
820 static void dump_accept_socket_reply( const struct accept_socket_request
*req
)
822 fprintf( stderr
, " handle=%d", req
->handle
);
825 static void dump_set_socket_event_request( const struct set_socket_event_request
*req
)
827 fprintf( stderr
, " handle=%d,", req
->handle
);
828 fprintf( stderr
, " mask=%08x,", req
->mask
);
829 fprintf( stderr
, " event=%d", req
->event
);
832 static void dump_get_socket_event_request( const struct get_socket_event_request
*req
)
834 fprintf( stderr
, " handle=%d,", req
->handle
);
835 fprintf( stderr
, " service=%d,", req
->service
);
836 fprintf( stderr
, " s_event=%d,", req
->s_event
);
837 fprintf( stderr
, " c_event=%d", req
->c_event
);
840 static void dump_get_socket_event_reply( const struct get_socket_event_request
*req
)
842 fprintf( stderr
, " mask=%08x,", req
->mask
);
843 fprintf( stderr
, " pmask=%08x,", req
->pmask
);
844 fprintf( stderr
, " state=%08x,", req
->state
);
845 fprintf( stderr
, " errors=" );
846 cur_pos
+= dump_varargs_ints( req
);
849 static void dump_enable_socket_event_request( const struct enable_socket_event_request
*req
)
851 fprintf( stderr
, " handle=%d,", req
->handle
);
852 fprintf( stderr
, " mask=%08x,", req
->mask
);
853 fprintf( stderr
, " sstate=%08x,", req
->sstate
);
854 fprintf( stderr
, " cstate=%08x", req
->cstate
);
857 static void dump_alloc_console_request( const struct alloc_console_request
*req
)
859 fprintf( stderr
, " access=%08x,", req
->access
);
860 fprintf( stderr
, " inherit=%d", req
->inherit
);
863 static void dump_alloc_console_reply( const struct alloc_console_request
*req
)
865 fprintf( stderr
, " handle_in=%d,", req
->handle_in
);
866 fprintf( stderr
, " handle_out=%d", req
->handle_out
);
869 static void dump_free_console_request( const struct free_console_request
*req
)
873 static void dump_open_console_request( const struct open_console_request
*req
)
875 fprintf( stderr
, " output=%d,", req
->output
);
876 fprintf( stderr
, " access=%08x,", req
->access
);
877 fprintf( stderr
, " inherit=%d", req
->inherit
);
880 static void dump_open_console_reply( const struct open_console_request
*req
)
882 fprintf( stderr
, " handle=%d", req
->handle
);
885 static void dump_set_console_fd_request( const struct set_console_fd_request
*req
)
887 fprintf( stderr
, " handle=%d,", req
->handle
);
888 fprintf( stderr
, " fd_in=%d,", req
->fd_in
);
889 fprintf( stderr
, " fd_out=%d,", req
->fd_out
);
890 fprintf( stderr
, " pid=%d", req
->pid
);
893 static void dump_get_console_mode_request( const struct get_console_mode_request
*req
)
895 fprintf( stderr
, " handle=%d", req
->handle
);
898 static void dump_get_console_mode_reply( const struct get_console_mode_request
*req
)
900 fprintf( stderr
, " mode=%d", req
->mode
);
903 static void dump_set_console_mode_request( const struct set_console_mode_request
*req
)
905 fprintf( stderr
, " handle=%d,", req
->handle
);
906 fprintf( stderr
, " mode=%d", req
->mode
);
909 static void dump_set_console_info_request( const struct set_console_info_request
*req
)
911 fprintf( stderr
, " handle=%d,", req
->handle
);
912 fprintf( stderr
, " mask=%d,", req
->mask
);
913 fprintf( stderr
, " cursor_size=%d,", req
->cursor_size
);
914 fprintf( stderr
, " cursor_visible=%d,", req
->cursor_visible
);
915 fprintf( stderr
, " title=" );
916 cur_pos
+= dump_varargs_string( req
);
919 static void dump_get_console_info_request( const struct get_console_info_request
*req
)
921 fprintf( stderr
, " handle=%d", req
->handle
);
924 static void dump_get_console_info_reply( const struct get_console_info_request
*req
)
926 fprintf( stderr
, " cursor_size=%d,", req
->cursor_size
);
927 fprintf( stderr
, " cursor_visible=%d,", req
->cursor_visible
);
928 fprintf( stderr
, " pid=%d,", req
->pid
);
929 fprintf( stderr
, " title=" );
930 cur_pos
+= dump_varargs_string( req
);
933 static void dump_write_console_input_request( const struct write_console_input_request
*req
)
935 fprintf( stderr
, " handle=%d,", req
->handle
);
936 fprintf( stderr
, " rec=" );
937 cur_pos
+= dump_varargs_input_records( req
);
940 static void dump_write_console_input_reply( const struct write_console_input_request
*req
)
942 fprintf( stderr
, " written=%d", req
->written
);
945 static void dump_read_console_input_request( const struct read_console_input_request
*req
)
947 fprintf( stderr
, " handle=%d,", req
->handle
);
948 fprintf( stderr
, " flush=%d", req
->flush
);
951 static void dump_read_console_input_reply( const struct read_console_input_request
*req
)
953 fprintf( stderr
, " read=%d,", req
->read
);
954 fprintf( stderr
, " rec=" );
955 cur_pos
+= dump_varargs_input_records( req
);
958 static void dump_create_change_notification_request( const struct create_change_notification_request
*req
)
960 fprintf( stderr
, " subtree=%d,", req
->subtree
);
961 fprintf( stderr
, " filter=%d", req
->filter
);
964 static void dump_create_change_notification_reply( const struct create_change_notification_request
*req
)
966 fprintf( stderr
, " handle=%d", req
->handle
);
969 static void dump_create_mapping_request( const struct create_mapping_request
*req
)
971 fprintf( stderr
, " size_high=%d,", req
->size_high
);
972 fprintf( stderr
, " size_low=%d,", req
->size_low
);
973 fprintf( stderr
, " protect=%d,", req
->protect
);
974 fprintf( stderr
, " inherit=%d,", req
->inherit
);
975 fprintf( stderr
, " file_handle=%d,", req
->file_handle
);
976 fprintf( stderr
, " name=" );
977 cur_pos
+= dump_varargs_unicode_str( req
);
980 static void dump_create_mapping_reply( const struct create_mapping_request
*req
)
982 fprintf( stderr
, " handle=%d", req
->handle
);
985 static void dump_open_mapping_request( const struct open_mapping_request
*req
)
987 fprintf( stderr
, " access=%08x,", req
->access
);
988 fprintf( stderr
, " inherit=%d,", req
->inherit
);
989 fprintf( stderr
, " name=" );
990 cur_pos
+= dump_varargs_unicode_str( req
);
993 static void dump_open_mapping_reply( const struct open_mapping_request
*req
)
995 fprintf( stderr
, " handle=%d", req
->handle
);
998 static void dump_get_mapping_info_request( const struct get_mapping_info_request
*req
)
1000 fprintf( stderr
, " handle=%d", req
->handle
);
1003 static void dump_get_mapping_info_reply( const struct get_mapping_info_request
*req
)
1005 fprintf( stderr
, " size_high=%d,", req
->size_high
);
1006 fprintf( stderr
, " size_low=%d,", req
->size_low
);
1007 fprintf( stderr
, " protect=%d,", req
->protect
);
1008 fprintf( stderr
, " header_size=%d,", req
->header_size
);
1009 fprintf( stderr
, " base=%p,", req
->base
);
1010 fprintf( stderr
, " shared_file=%d,", req
->shared_file
);
1011 fprintf( stderr
, " shared_size=%d", req
->shared_size
);
1014 static void dump_create_device_request( const struct create_device_request
*req
)
1016 fprintf( stderr
, " access=%08x,", req
->access
);
1017 fprintf( stderr
, " inherit=%d,", req
->inherit
);
1018 fprintf( stderr
, " id=%d", req
->id
);
1021 static void dump_create_device_reply( const struct create_device_request
*req
)
1023 fprintf( stderr
, " handle=%d", req
->handle
);
1026 static void dump_create_snapshot_request( const struct create_snapshot_request
*req
)
1028 fprintf( stderr
, " inherit=%d,", req
->inherit
);
1029 fprintf( stderr
, " flags=%d,", req
->flags
);
1030 fprintf( stderr
, " pid=%p", req
->pid
);
1033 static void dump_create_snapshot_reply( const struct create_snapshot_request
*req
)
1035 fprintf( stderr
, " handle=%d", req
->handle
);
1038 static void dump_next_process_request( const struct next_process_request
*req
)
1040 fprintf( stderr
, " handle=%d,", req
->handle
);
1041 fprintf( stderr
, " reset=%d", req
->reset
);
1044 static void dump_next_process_reply( const struct next_process_request
*req
)
1046 fprintf( stderr
, " count=%d,", req
->count
);
1047 fprintf( stderr
, " pid=%p,", req
->pid
);
1048 fprintf( stderr
, " threads=%d,", req
->threads
);
1049 fprintf( stderr
, " priority=%d", req
->priority
);
1052 static void dump_next_thread_request( const struct next_thread_request
*req
)
1054 fprintf( stderr
, " handle=%d,", req
->handle
);
1055 fprintf( stderr
, " reset=%d", req
->reset
);
1058 static void dump_next_thread_reply( const struct next_thread_request
*req
)
1060 fprintf( stderr
, " count=%d,", req
->count
);
1061 fprintf( stderr
, " pid=%p,", req
->pid
);
1062 fprintf( stderr
, " tid=%p,", req
->tid
);
1063 fprintf( stderr
, " base_pri=%d,", req
->base_pri
);
1064 fprintf( stderr
, " delta_pri=%d", req
->delta_pri
);
1067 static void dump_next_module_request( const struct next_module_request
*req
)
1069 fprintf( stderr
, " handle=%d,", req
->handle
);
1070 fprintf( stderr
, " reset=%d", req
->reset
);
1073 static void dump_next_module_reply( const struct next_module_request
*req
)
1075 fprintf( stderr
, " pid=%p,", req
->pid
);
1076 fprintf( stderr
, " base=%p", req
->base
);
1079 static void dump_wait_debug_event_request( const struct wait_debug_event_request
*req
)
1081 fprintf( stderr
, " get_handle=%d", req
->get_handle
);
1084 static void dump_wait_debug_event_reply( const struct wait_debug_event_request
*req
)
1086 fprintf( stderr
, " pid=%p,", req
->pid
);
1087 fprintf( stderr
, " tid=%p,", req
->tid
);
1088 fprintf( stderr
, " wait=%d,", req
->wait
);
1089 fprintf( stderr
, " event=" );
1090 cur_pos
+= dump_varargs_debug_event( req
);
1093 static void dump_queue_exception_event_request( const struct queue_exception_event_request
*req
)
1095 fprintf( stderr
, " first=%d,", req
->first
);
1096 fprintf( stderr
, " record=" );
1097 cur_pos
+= dump_varargs_exc_event( req
);
1100 static void dump_queue_exception_event_reply( const struct queue_exception_event_request
*req
)
1102 fprintf( stderr
, " handle=%d", req
->handle
);
1105 static void dump_get_exception_status_request( const struct get_exception_status_request
*req
)
1109 static void dump_get_exception_status_reply( const struct get_exception_status_request
*req
)
1111 fprintf( stderr
, " handle=%d,", req
->handle
);
1112 fprintf( stderr
, " status=%d,", req
->status
);
1113 fprintf( stderr
, " context=" );
1114 cur_pos
+= dump_varargs_context( req
);
1117 static void dump_output_debug_string_request( const struct output_debug_string_request
*req
)
1119 fprintf( stderr
, " string=%p,", req
->string
);
1120 fprintf( stderr
, " unicode=%d,", req
->unicode
);
1121 fprintf( stderr
, " length=%d", req
->length
);
1124 static void dump_continue_debug_event_request( const struct continue_debug_event_request
*req
)
1126 fprintf( stderr
, " pid=%p,", req
->pid
);
1127 fprintf( stderr
, " tid=%p,", req
->tid
);
1128 fprintf( stderr
, " status=%d", req
->status
);
1131 static void dump_debug_process_request( const struct debug_process_request
*req
)
1133 fprintf( stderr
, " pid=%p", req
->pid
);
1136 static void dump_read_process_memory_request( const struct read_process_memory_request
*req
)
1138 fprintf( stderr
, " handle=%d,", req
->handle
);
1139 fprintf( stderr
, " addr=%p,", req
->addr
);
1140 fprintf( stderr
, " len=%d", req
->len
);
1143 static void dump_read_process_memory_reply( const struct read_process_memory_request
*req
)
1145 fprintf( stderr
, " data=" );
1146 cur_pos
+= dump_varargs_bytes( req
);
1149 static void dump_write_process_memory_request( const struct write_process_memory_request
*req
)
1151 fprintf( stderr
, " handle=%d,", req
->handle
);
1152 fprintf( stderr
, " addr=%p,", req
->addr
);
1153 fprintf( stderr
, " len=%d,", req
->len
);
1154 fprintf( stderr
, " first_mask=%08x,", req
->first_mask
);
1155 fprintf( stderr
, " last_mask=%08x,", req
->last_mask
);
1156 fprintf( stderr
, " data=" );
1157 cur_pos
+= dump_varargs_bytes( req
);
1160 static void dump_create_key_request( const struct create_key_request
*req
)
1162 fprintf( stderr
, " parent=%d,", req
->parent
);
1163 fprintf( stderr
, " access=%08x,", req
->access
);
1164 fprintf( stderr
, " options=%08x,", req
->options
);
1165 fprintf( stderr
, " modif=%ld,", req
->modif
);
1166 fprintf( stderr
, " name=" );
1167 cur_pos
+= dump_varargs_unicode_len_str( req
);
1168 fputc( ',', stderr
);
1169 fprintf( stderr
, " class=" );
1170 cur_pos
+= dump_varargs_unicode_str( req
);
1173 static void dump_create_key_reply( const struct create_key_request
*req
)
1175 fprintf( stderr
, " hkey=%d,", req
->hkey
);
1176 fprintf( stderr
, " created=%d", req
->created
);
1179 static void dump_open_key_request( const struct open_key_request
*req
)
1181 fprintf( stderr
, " parent=%d,", req
->parent
);
1182 fprintf( stderr
, " access=%08x,", req
->access
);
1183 fprintf( stderr
, " name=" );
1184 cur_pos
+= dump_varargs_unicode_str( req
);
1187 static void dump_open_key_reply( const struct open_key_request
*req
)
1189 fprintf( stderr
, " hkey=%d", req
->hkey
);
1192 static void dump_delete_key_request( const struct delete_key_request
*req
)
1194 fprintf( stderr
, " hkey=%d", req
->hkey
);
1197 static void dump_enum_key_request( const struct enum_key_request
*req
)
1199 fprintf( stderr
, " hkey=%d,", req
->hkey
);
1200 fprintf( stderr
, " index=%d,", req
->index
);
1201 fprintf( stderr
, " full=%d", req
->full
);
1204 static void dump_enum_key_reply( const struct enum_key_request
*req
)
1206 fprintf( stderr
, " subkeys=%d,", req
->subkeys
);
1207 fprintf( stderr
, " max_subkey=%d,", req
->max_subkey
);
1208 fprintf( stderr
, " max_class=%d,", req
->max_class
);
1209 fprintf( stderr
, " values=%d,", req
->values
);
1210 fprintf( stderr
, " max_value=%d,", req
->max_value
);
1211 fprintf( stderr
, " max_data=%d,", req
->max_data
);
1212 fprintf( stderr
, " modif=%ld,", req
->modif
);
1213 fprintf( stderr
, " name=" );
1214 cur_pos
+= dump_varargs_unicode_len_str( req
);
1215 fputc( ',', stderr
);
1216 fprintf( stderr
, " class=" );
1217 cur_pos
+= dump_varargs_unicode_str( req
);
1220 static void dump_set_key_value_request( const struct set_key_value_request
*req
)
1222 fprintf( stderr
, " hkey=%d,", req
->hkey
);
1223 fprintf( stderr
, " type=%d,", req
->type
);
1224 fprintf( stderr
, " total=%08x,", req
->total
);
1225 fprintf( stderr
, " offset=%08x,", req
->offset
);
1226 fprintf( stderr
, " name=" );
1227 cur_pos
+= dump_varargs_unicode_len_str( req
);
1228 fputc( ',', stderr
);
1229 fprintf( stderr
, " data=" );
1230 cur_pos
+= dump_varargs_bytes( req
);
1233 static void dump_get_key_value_request( const struct get_key_value_request
*req
)
1235 fprintf( stderr
, " hkey=%d,", req
->hkey
);
1236 fprintf( stderr
, " offset=%08x,", req
->offset
);
1237 fprintf( stderr
, " name=" );
1238 cur_pos
+= dump_varargs_unicode_len_str( req
);
1241 static void dump_get_key_value_reply( const struct get_key_value_request
*req
)
1243 fprintf( stderr
, " type=%d,", req
->type
);
1244 fprintf( stderr
, " len=%d,", req
->len
);
1245 fprintf( stderr
, " data=" );
1246 cur_pos
+= dump_varargs_bytes( req
);
1249 static void dump_enum_key_value_request( const struct enum_key_value_request
*req
)
1251 fprintf( stderr
, " hkey=%d,", req
->hkey
);
1252 fprintf( stderr
, " index=%d,", req
->index
);
1253 fprintf( stderr
, " offset=%08x", req
->offset
);
1256 static void dump_enum_key_value_reply( const struct enum_key_value_request
*req
)
1258 fprintf( stderr
, " type=%d,", req
->type
);
1259 fprintf( stderr
, " len=%d,", req
->len
);
1260 fprintf( stderr
, " name=" );
1261 cur_pos
+= dump_varargs_unicode_len_str( req
);
1262 fputc( ',', stderr
);
1263 fprintf( stderr
, " data=" );
1264 cur_pos
+= dump_varargs_bytes( req
);
1267 static void dump_delete_key_value_request( const struct delete_key_value_request
*req
)
1269 fprintf( stderr
, " hkey=%d,", req
->hkey
);
1270 fprintf( stderr
, " name=" );
1271 cur_pos
+= dump_varargs_unicode_str( req
);
1274 static void dump_load_registry_request( const struct load_registry_request
*req
)
1276 fprintf( stderr
, " hkey=%d,", req
->hkey
);
1277 fprintf( stderr
, " file=%d,", req
->file
);
1278 fprintf( stderr
, " name=" );
1279 cur_pos
+= dump_varargs_unicode_str( req
);
1282 static void dump_save_registry_request( const struct save_registry_request
*req
)
1284 fprintf( stderr
, " hkey=%d,", req
->hkey
);
1285 fprintf( stderr
, " file=%d", req
->file
);
1288 static void dump_save_registry_atexit_request( const struct save_registry_atexit_request
*req
)
1290 fprintf( stderr
, " hkey=%d,", req
->hkey
);
1291 fprintf( stderr
, " file=" );
1292 cur_pos
+= dump_varargs_string( req
);
1295 static void dump_set_registry_levels_request( const struct set_registry_levels_request
*req
)
1297 fprintf( stderr
, " current=%d,", req
->current
);
1298 fprintf( stderr
, " saving=%d,", req
->saving
);
1299 fprintf( stderr
, " period=%d", req
->period
);
1302 static void dump_create_timer_request( const struct create_timer_request
*req
)
1304 fprintf( stderr
, " inherit=%d,", req
->inherit
);
1305 fprintf( stderr
, " manual=%d,", req
->manual
);
1306 fprintf( stderr
, " name=" );
1307 cur_pos
+= dump_varargs_unicode_str( req
);
1310 static void dump_create_timer_reply( const struct create_timer_request
*req
)
1312 fprintf( stderr
, " handle=%d", req
->handle
);
1315 static void dump_open_timer_request( const struct open_timer_request
*req
)
1317 fprintf( stderr
, " access=%08x,", req
->access
);
1318 fprintf( stderr
, " inherit=%d,", req
->inherit
);
1319 fprintf( stderr
, " name=" );
1320 cur_pos
+= dump_varargs_unicode_str( req
);
1323 static void dump_open_timer_reply( const struct open_timer_request
*req
)
1325 fprintf( stderr
, " handle=%d", req
->handle
);
1328 static void dump_set_timer_request( const struct set_timer_request
*req
)
1330 fprintf( stderr
, " handle=%d,", req
->handle
);
1331 fprintf( stderr
, " sec=%d,", req
->sec
);
1332 fprintf( stderr
, " usec=%d,", req
->usec
);
1333 fprintf( stderr
, " period=%d,", req
->period
);
1334 fprintf( stderr
, " callback=%p,", req
->callback
);
1335 fprintf( stderr
, " arg=%p", req
->arg
);
1338 static void dump_cancel_timer_request( const struct cancel_timer_request
*req
)
1340 fprintf( stderr
, " handle=%d", req
->handle
);
1343 static void dump_get_thread_context_request( const struct get_thread_context_request
*req
)
1345 fprintf( stderr
, " handle=%d,", req
->handle
);
1346 fprintf( stderr
, " flags=%08x", req
->flags
);
1349 static void dump_get_thread_context_reply( const struct get_thread_context_request
*req
)
1351 fprintf( stderr
, " context=" );
1352 cur_pos
+= dump_varargs_context( req
);
1355 static void dump_set_thread_context_request( const struct set_thread_context_request
*req
)
1357 fprintf( stderr
, " handle=%d,", req
->handle
);
1358 fprintf( stderr
, " flags=%08x,", req
->flags
);
1359 fprintf( stderr
, " context=" );
1360 cur_pos
+= dump_varargs_context( req
);
1363 static void dump_get_selector_entry_request( const struct get_selector_entry_request
*req
)
1365 fprintf( stderr
, " handle=%d,", req
->handle
);
1366 fprintf( stderr
, " entry=%d", req
->entry
);
1369 static void dump_get_selector_entry_reply( const struct get_selector_entry_request
*req
)
1371 fprintf( stderr
, " base=%08x,", req
->base
);
1372 fprintf( stderr
, " limit=%08x,", req
->limit
);
1373 fprintf( stderr
, " flags=%02x", req
->flags
);
1376 static void dump_add_atom_request( const struct add_atom_request
*req
)
1378 fprintf( stderr
, " local=%d,", req
->local
);
1379 fprintf( stderr
, " name=" );
1380 cur_pos
+= dump_varargs_unicode_str( req
);
1383 static void dump_add_atom_reply( const struct add_atom_request
*req
)
1385 fprintf( stderr
, " atom=%d", req
->atom
);
1388 static void dump_delete_atom_request( const struct delete_atom_request
*req
)
1390 fprintf( stderr
, " atom=%d,", req
->atom
);
1391 fprintf( stderr
, " local=%d", req
->local
);
1394 static void dump_find_atom_request( const struct find_atom_request
*req
)
1396 fprintf( stderr
, " local=%d,", req
->local
);
1397 fprintf( stderr
, " name=" );
1398 cur_pos
+= dump_varargs_unicode_str( req
);
1401 static void dump_find_atom_reply( const struct find_atom_request
*req
)
1403 fprintf( stderr
, " atom=%d", req
->atom
);
1406 static void dump_get_atom_name_request( const struct get_atom_name_request
*req
)
1408 fprintf( stderr
, " atom=%d,", req
->atom
);
1409 fprintf( stderr
, " local=%d", req
->local
);
1412 static void dump_get_atom_name_reply( const struct get_atom_name_request
*req
)
1414 fprintf( stderr
, " count=%d,", req
->count
);
1415 fprintf( stderr
, " name=" );
1416 cur_pos
+= dump_varargs_unicode_str( req
);
1419 static void dump_init_atom_table_request( const struct init_atom_table_request
*req
)
1421 fprintf( stderr
, " entries=%d", req
->entries
);
1424 static void dump_get_msg_queue_request( const struct get_msg_queue_request
*req
)
1428 static void dump_get_msg_queue_reply( const struct get_msg_queue_request
*req
)
1430 fprintf( stderr
, " handle=%d", req
->handle
);
1433 static void dump_inc_queue_paint_count_request( const struct inc_queue_paint_count_request
*req
)
1435 fprintf( stderr
, " id=%p,", req
->id
);
1436 fprintf( stderr
, " incr=%d", req
->incr
);
1439 static void dump_set_queue_mask_request( const struct set_queue_mask_request
*req
)
1441 fprintf( stderr
, " wake_mask=%08x,", req
->wake_mask
);
1442 fprintf( stderr
, " changed_mask=%08x,", req
->changed_mask
);
1443 fprintf( stderr
, " skip_wait=%d", req
->skip_wait
);
1446 static void dump_set_queue_mask_reply( const struct set_queue_mask_request
*req
)
1448 fprintf( stderr
, " wake_bits=%08x,", req
->wake_bits
);
1449 fprintf( stderr
, " changed_bits=%08x", req
->changed_bits
);
1452 static void dump_get_queue_status_request( const struct get_queue_status_request
*req
)
1454 fprintf( stderr
, " clear=%d", req
->clear
);
1457 static void dump_get_queue_status_reply( const struct get_queue_status_request
*req
)
1459 fprintf( stderr
, " wake_bits=%08x,", req
->wake_bits
);
1460 fprintf( stderr
, " changed_bits=%08x", req
->changed_bits
);
1463 static void dump_wait_input_idle_request( const struct wait_input_idle_request
*req
)
1465 fprintf( stderr
, " handle=%d,", req
->handle
);
1466 fprintf( stderr
, " timeout=%d", req
->timeout
);
1469 static void dump_wait_input_idle_reply( const struct wait_input_idle_request
*req
)
1471 fprintf( stderr
, " event=%d", req
->event
);
1474 static void dump_send_message_request( const struct send_message_request
*req
)
1476 fprintf( stderr
, " id=%p,", req
->id
);
1477 fprintf( stderr
, " type=%d,", req
->type
);
1478 fprintf( stderr
, " win=%08x,", req
->win
);
1479 fprintf( stderr
, " msg=%08x,", req
->msg
);
1480 fprintf( stderr
, " wparam=%08x,", req
->wparam
);
1481 fprintf( stderr
, " lparam=%08x,", req
->lparam
);
1482 fprintf( stderr
, " x=%d,", req
->x
);
1483 fprintf( stderr
, " y=%d,", req
->y
);
1484 fprintf( stderr
, " time=%08x,", req
->time
);
1485 fprintf( stderr
, " info=%08x,", req
->info
);
1486 fprintf( stderr
, " timeout=%d,", req
->timeout
);
1487 fprintf( stderr
, " data=" );
1488 cur_pos
+= dump_varargs_bytes( req
);
1491 static void dump_get_message_request( const struct get_message_request
*req
)
1493 fprintf( stderr
, " flags=%d,", req
->flags
);
1494 fprintf( stderr
, " get_win=%08x,", req
->get_win
);
1495 fprintf( stderr
, " get_first=%08x,", req
->get_first
);
1496 fprintf( stderr
, " get_last=%08x", req
->get_last
);
1499 static void dump_get_message_reply( const struct get_message_request
*req
)
1501 fprintf( stderr
, " type=%d,", req
->type
);
1502 fprintf( stderr
, " win=%08x,", req
->win
);
1503 fprintf( stderr
, " msg=%08x,", req
->msg
);
1504 fprintf( stderr
, " wparam=%08x,", req
->wparam
);
1505 fprintf( stderr
, " lparam=%08x,", req
->lparam
);
1506 fprintf( stderr
, " x=%d,", req
->x
);
1507 fprintf( stderr
, " y=%d,", req
->y
);
1508 fprintf( stderr
, " time=%08x,", req
->time
);
1509 fprintf( stderr
, " info=%08x,", req
->info
);
1510 fprintf( stderr
, " data=" );
1511 cur_pos
+= dump_varargs_bytes( req
);
1514 static void dump_reply_message_request( const struct reply_message_request
*req
)
1516 fprintf( stderr
, " result=%08x,", req
->result
);
1517 fprintf( stderr
, " remove=%d,", req
->remove
);
1518 fprintf( stderr
, " data=" );
1519 cur_pos
+= dump_varargs_bytes( req
);
1522 static void dump_get_message_reply_request( const struct get_message_reply_request
*req
)
1524 fprintf( stderr
, " cancel=%d", req
->cancel
);
1527 static void dump_get_message_reply_reply( const struct get_message_reply_request
*req
)
1529 fprintf( stderr
, " result=%08x,", req
->result
);
1530 fprintf( stderr
, " data=" );
1531 cur_pos
+= dump_varargs_bytes( req
);
1534 static void dump_cleanup_window_queue_request( const struct cleanup_window_queue_request
*req
)
1536 fprintf( stderr
, " win=%08x", req
->win
);
1539 static void dump_set_win_timer_request( const struct set_win_timer_request
*req
)
1541 fprintf( stderr
, " win=%08x,", req
->win
);
1542 fprintf( stderr
, " msg=%08x,", req
->msg
);
1543 fprintf( stderr
, " id=%08x,", req
->id
);
1544 fprintf( stderr
, " rate=%08x,", req
->rate
);
1545 fprintf( stderr
, " lparam=%08x", req
->lparam
);
1548 static void dump_kill_win_timer_request( const struct kill_win_timer_request
*req
)
1550 fprintf( stderr
, " win=%08x,", req
->win
);
1551 fprintf( stderr
, " msg=%08x,", req
->msg
);
1552 fprintf( stderr
, " id=%08x", req
->id
);
1555 static void dump_create_serial_request( const struct create_serial_request
*req
)
1557 fprintf( stderr
, " access=%08x,", req
->access
);
1558 fprintf( stderr
, " inherit=%d,", req
->inherit
);
1559 fprintf( stderr
, " sharing=%08x,", req
->sharing
);
1560 fprintf( stderr
, " name=" );
1561 cur_pos
+= dump_varargs_string( req
);
1564 static void dump_create_serial_reply( const struct create_serial_request
*req
)
1566 fprintf( stderr
, " handle=%d", req
->handle
);
1569 static void dump_get_serial_info_request( const struct get_serial_info_request
*req
)
1571 fprintf( stderr
, " handle=%d", req
->handle
);
1574 static void dump_get_serial_info_reply( const struct get_serial_info_request
*req
)
1576 fprintf( stderr
, " readinterval=%08x,", req
->readinterval
);
1577 fprintf( stderr
, " readconst=%08x,", req
->readconst
);
1578 fprintf( stderr
, " readmult=%08x,", req
->readmult
);
1579 fprintf( stderr
, " writeconst=%08x,", req
->writeconst
);
1580 fprintf( stderr
, " writemult=%08x,", req
->writemult
);
1581 fprintf( stderr
, " eventmask=%08x,", req
->eventmask
);
1582 fprintf( stderr
, " commerror=%08x", req
->commerror
);
1585 static void dump_set_serial_info_request( const struct set_serial_info_request
*req
)
1587 fprintf( stderr
, " handle=%d,", req
->handle
);
1588 fprintf( stderr
, " flags=%d,", req
->flags
);
1589 fprintf( stderr
, " readinterval=%08x,", req
->readinterval
);
1590 fprintf( stderr
, " readconst=%08x,", req
->readconst
);
1591 fprintf( stderr
, " readmult=%08x,", req
->readmult
);
1592 fprintf( stderr
, " writeconst=%08x,", req
->writeconst
);
1593 fprintf( stderr
, " writemult=%08x,", req
->writemult
);
1594 fprintf( stderr
, " eventmask=%08x,", req
->eventmask
);
1595 fprintf( stderr
, " commerror=%08x", req
->commerror
);
1598 static void dump_create_async_request( const struct create_async_request
*req
)
1600 fprintf( stderr
, " file_handle=%d,", req
->file_handle
);
1601 fprintf( stderr
, " count=%d,", req
->count
);
1602 fprintf( stderr
, " type=%d", req
->type
);
1605 static void dump_create_async_reply( const struct create_async_request
*req
)
1607 fprintf( stderr
, " timeout=%d", req
->timeout
);
1610 static void dump_create_named_pipe_request( const struct create_named_pipe_request
*req
)
1612 fprintf( stderr
, " openmode=%08x,", req
->openmode
);
1613 fprintf( stderr
, " pipemode=%08x,", req
->pipemode
);
1614 fprintf( stderr
, " maxinstances=%08x,", req
->maxinstances
);
1615 fprintf( stderr
, " outsize=%08x,", req
->outsize
);
1616 fprintf( stderr
, " insize=%08x,", req
->insize
);
1617 fprintf( stderr
, " timeout=%08x,", req
->timeout
);
1618 fprintf( stderr
, " filename=" );
1619 cur_pos
+= dump_varargs_string( req
);
1622 static void dump_create_named_pipe_reply( const struct create_named_pipe_request
*req
)
1624 fprintf( stderr
, " handle=%d", req
->handle
);
1627 static void dump_open_named_pipe_request( const struct open_named_pipe_request
*req
)
1629 fprintf( stderr
, " access=%08x,", req
->access
);
1630 fprintf( stderr
, " filename=" );
1631 cur_pos
+= dump_varargs_string( req
);
1634 static void dump_open_named_pipe_reply( const struct open_named_pipe_request
*req
)
1636 fprintf( stderr
, " handle=%d", req
->handle
);
1639 static void dump_connect_named_pipe_request( const struct connect_named_pipe_request
*req
)
1641 fprintf( stderr
, " handle=%d,", req
->handle
);
1642 fprintf( stderr
, " event=%d", req
->event
);
1645 static void dump_wait_named_pipe_request( const struct wait_named_pipe_request
*req
)
1647 fprintf( stderr
, " timeout=%08x,", req
->timeout
);
1648 fprintf( stderr
, " event=%d,", req
->event
);
1649 fprintf( stderr
, " filename=" );
1650 cur_pos
+= dump_varargs_string( req
);
1653 static void dump_disconnect_named_pipe_request( const struct disconnect_named_pipe_request
*req
)
1655 fprintf( stderr
, " handle=%d", req
->handle
);
1658 static void dump_get_named_pipe_info_request( const struct get_named_pipe_info_request
*req
)
1660 fprintf( stderr
, " handle=%d", req
->handle
);
1663 static void dump_get_named_pipe_info_reply( const struct get_named_pipe_info_request
*req
)
1665 fprintf( stderr
, " flags=%08x,", req
->flags
);
1666 fprintf( stderr
, " maxinstances=%08x,", req
->maxinstances
);
1667 fprintf( stderr
, " outsize=%08x,", req
->outsize
);
1668 fprintf( stderr
, " insize=%08x", req
->insize
);
1671 static void dump_create_window_request( const struct create_window_request
*req
)
1673 fprintf( stderr
, " parent=%08x,", req
->parent
);
1674 fprintf( stderr
, " owner=%08x", req
->owner
);
1677 static void dump_create_window_reply( const struct create_window_request
*req
)
1679 fprintf( stderr
, " handle=%08x", req
->handle
);
1682 static void dump_link_window_request( const struct link_window_request
*req
)
1684 fprintf( stderr
, " handle=%08x,", req
->handle
);
1685 fprintf( stderr
, " parent=%08x,", req
->parent
);
1686 fprintf( stderr
, " previous=%08x", req
->previous
);
1689 static void dump_destroy_window_request( const struct destroy_window_request
*req
)
1691 fprintf( stderr
, " handle=%08x", req
->handle
);
1694 static void dump_get_window_info_request( const struct get_window_info_request
*req
)
1696 fprintf( stderr
, " handle=%08x", req
->handle
);
1699 static void dump_get_window_info_reply( const struct get_window_info_request
*req
)
1701 fprintf( stderr
, " full_handle=%08x,", req
->full_handle
);
1702 fprintf( stderr
, " pid=%p,", req
->pid
);
1703 fprintf( stderr
, " tid=%p", req
->tid
);
1706 static void dump_get_window_parents_request( const struct get_window_parents_request
*req
)
1708 fprintf( stderr
, " handle=%08x", req
->handle
);
1711 static void dump_get_window_parents_reply( const struct get_window_parents_request
*req
)
1713 fprintf( stderr
, " count=%d,", req
->count
);
1714 fprintf( stderr
, " parents=" );
1715 cur_pos
+= dump_varargs_user_handles( req
);
1718 static void dump_get_window_children_request( const struct get_window_children_request
*req
)
1720 fprintf( stderr
, " parent=%08x", req
->parent
);
1723 static void dump_get_window_children_reply( const struct get_window_children_request
*req
)
1725 fprintf( stderr
, " count=%d,", req
->count
);
1726 fprintf( stderr
, " children=" );
1727 cur_pos
+= dump_varargs_user_handles( req
);
1730 static void dump_get_window_tree_request( const struct get_window_tree_request
*req
)
1732 fprintf( stderr
, " handle=%08x", req
->handle
);
1735 static void dump_get_window_tree_reply( const struct get_window_tree_request
*req
)
1737 fprintf( stderr
, " parent=%08x,", req
->parent
);
1738 fprintf( stderr
, " owner=%08x,", req
->owner
);
1739 fprintf( stderr
, " next_sibling=%08x,", req
->next_sibling
);
1740 fprintf( stderr
, " prev_sibling=%08x,", req
->prev_sibling
);
1741 fprintf( stderr
, " first_sibling=%08x,", req
->first_sibling
);
1742 fprintf( stderr
, " last_sibling=%08x,", req
->last_sibling
);
1743 fprintf( stderr
, " first_child=%08x,", req
->first_child
);
1744 fprintf( stderr
, " last_child=%08x", req
->last_child
);
1747 static const dump_func req_dumpers
[REQ_NB_REQUESTS
] = {
1748 (dump_func
)dump_new_process_request
,
1749 (dump_func
)dump_get_new_process_info_request
,
1750 (dump_func
)dump_new_thread_request
,
1751 (dump_func
)dump_boot_done_request
,
1752 (dump_func
)dump_init_process_request
,
1753 (dump_func
)dump_init_process_done_request
,
1754 (dump_func
)dump_init_thread_request
,
1755 (dump_func
)dump_set_thread_buffer_request
,
1756 (dump_func
)dump_terminate_process_request
,
1757 (dump_func
)dump_terminate_thread_request
,
1758 (dump_func
)dump_get_process_info_request
,
1759 (dump_func
)dump_set_process_info_request
,
1760 (dump_func
)dump_get_thread_info_request
,
1761 (dump_func
)dump_set_thread_info_request
,
1762 (dump_func
)dump_suspend_thread_request
,
1763 (dump_func
)dump_resume_thread_request
,
1764 (dump_func
)dump_load_dll_request
,
1765 (dump_func
)dump_unload_dll_request
,
1766 (dump_func
)dump_queue_apc_request
,
1767 (dump_func
)dump_get_apc_request
,
1768 (dump_func
)dump_close_handle_request
,
1769 (dump_func
)dump_set_handle_info_request
,
1770 (dump_func
)dump_dup_handle_request
,
1771 (dump_func
)dump_open_process_request
,
1772 (dump_func
)dump_select_request
,
1773 (dump_func
)dump_create_event_request
,
1774 (dump_func
)dump_event_op_request
,
1775 (dump_func
)dump_open_event_request
,
1776 (dump_func
)dump_create_mutex_request
,
1777 (dump_func
)dump_release_mutex_request
,
1778 (dump_func
)dump_open_mutex_request
,
1779 (dump_func
)dump_create_semaphore_request
,
1780 (dump_func
)dump_release_semaphore_request
,
1781 (dump_func
)dump_open_semaphore_request
,
1782 (dump_func
)dump_create_file_request
,
1783 (dump_func
)dump_alloc_file_handle_request
,
1784 (dump_func
)dump_get_handle_fd_request
,
1785 (dump_func
)dump_set_file_pointer_request
,
1786 (dump_func
)dump_truncate_file_request
,
1787 (dump_func
)dump_set_file_time_request
,
1788 (dump_func
)dump_flush_file_request
,
1789 (dump_func
)dump_get_file_info_request
,
1790 (dump_func
)dump_lock_file_request
,
1791 (dump_func
)dump_unlock_file_request
,
1792 (dump_func
)dump_create_pipe_request
,
1793 (dump_func
)dump_create_socket_request
,
1794 (dump_func
)dump_accept_socket_request
,
1795 (dump_func
)dump_set_socket_event_request
,
1796 (dump_func
)dump_get_socket_event_request
,
1797 (dump_func
)dump_enable_socket_event_request
,
1798 (dump_func
)dump_alloc_console_request
,
1799 (dump_func
)dump_free_console_request
,
1800 (dump_func
)dump_open_console_request
,
1801 (dump_func
)dump_set_console_fd_request
,
1802 (dump_func
)dump_get_console_mode_request
,
1803 (dump_func
)dump_set_console_mode_request
,
1804 (dump_func
)dump_set_console_info_request
,
1805 (dump_func
)dump_get_console_info_request
,
1806 (dump_func
)dump_write_console_input_request
,
1807 (dump_func
)dump_read_console_input_request
,
1808 (dump_func
)dump_create_change_notification_request
,
1809 (dump_func
)dump_create_mapping_request
,
1810 (dump_func
)dump_open_mapping_request
,
1811 (dump_func
)dump_get_mapping_info_request
,
1812 (dump_func
)dump_create_device_request
,
1813 (dump_func
)dump_create_snapshot_request
,
1814 (dump_func
)dump_next_process_request
,
1815 (dump_func
)dump_next_thread_request
,
1816 (dump_func
)dump_next_module_request
,
1817 (dump_func
)dump_wait_debug_event_request
,
1818 (dump_func
)dump_queue_exception_event_request
,
1819 (dump_func
)dump_get_exception_status_request
,
1820 (dump_func
)dump_output_debug_string_request
,
1821 (dump_func
)dump_continue_debug_event_request
,
1822 (dump_func
)dump_debug_process_request
,
1823 (dump_func
)dump_read_process_memory_request
,
1824 (dump_func
)dump_write_process_memory_request
,
1825 (dump_func
)dump_create_key_request
,
1826 (dump_func
)dump_open_key_request
,
1827 (dump_func
)dump_delete_key_request
,
1828 (dump_func
)dump_enum_key_request
,
1829 (dump_func
)dump_set_key_value_request
,
1830 (dump_func
)dump_get_key_value_request
,
1831 (dump_func
)dump_enum_key_value_request
,
1832 (dump_func
)dump_delete_key_value_request
,
1833 (dump_func
)dump_load_registry_request
,
1834 (dump_func
)dump_save_registry_request
,
1835 (dump_func
)dump_save_registry_atexit_request
,
1836 (dump_func
)dump_set_registry_levels_request
,
1837 (dump_func
)dump_create_timer_request
,
1838 (dump_func
)dump_open_timer_request
,
1839 (dump_func
)dump_set_timer_request
,
1840 (dump_func
)dump_cancel_timer_request
,
1841 (dump_func
)dump_get_thread_context_request
,
1842 (dump_func
)dump_set_thread_context_request
,
1843 (dump_func
)dump_get_selector_entry_request
,
1844 (dump_func
)dump_add_atom_request
,
1845 (dump_func
)dump_delete_atom_request
,
1846 (dump_func
)dump_find_atom_request
,
1847 (dump_func
)dump_get_atom_name_request
,
1848 (dump_func
)dump_init_atom_table_request
,
1849 (dump_func
)dump_get_msg_queue_request
,
1850 (dump_func
)dump_inc_queue_paint_count_request
,
1851 (dump_func
)dump_set_queue_mask_request
,
1852 (dump_func
)dump_get_queue_status_request
,
1853 (dump_func
)dump_wait_input_idle_request
,
1854 (dump_func
)dump_send_message_request
,
1855 (dump_func
)dump_get_message_request
,
1856 (dump_func
)dump_reply_message_request
,
1857 (dump_func
)dump_get_message_reply_request
,
1858 (dump_func
)dump_cleanup_window_queue_request
,
1859 (dump_func
)dump_set_win_timer_request
,
1860 (dump_func
)dump_kill_win_timer_request
,
1861 (dump_func
)dump_create_serial_request
,
1862 (dump_func
)dump_get_serial_info_request
,
1863 (dump_func
)dump_set_serial_info_request
,
1864 (dump_func
)dump_create_async_request
,
1865 (dump_func
)dump_create_named_pipe_request
,
1866 (dump_func
)dump_open_named_pipe_request
,
1867 (dump_func
)dump_connect_named_pipe_request
,
1868 (dump_func
)dump_wait_named_pipe_request
,
1869 (dump_func
)dump_disconnect_named_pipe_request
,
1870 (dump_func
)dump_get_named_pipe_info_request
,
1871 (dump_func
)dump_create_window_request
,
1872 (dump_func
)dump_link_window_request
,
1873 (dump_func
)dump_destroy_window_request
,
1874 (dump_func
)dump_get_window_info_request
,
1875 (dump_func
)dump_get_window_parents_request
,
1876 (dump_func
)dump_get_window_children_request
,
1877 (dump_func
)dump_get_window_tree_request
,
1880 static const dump_func reply_dumpers
[REQ_NB_REQUESTS
] = {
1881 (dump_func
)dump_new_process_reply
,
1882 (dump_func
)dump_get_new_process_info_reply
,
1883 (dump_func
)dump_new_thread_reply
,
1885 (dump_func
)dump_init_process_reply
,
1886 (dump_func
)dump_init_process_done_reply
,
1887 (dump_func
)dump_init_thread_reply
,
1888 (dump_func
)dump_set_thread_buffer_reply
,
1889 (dump_func
)dump_terminate_process_reply
,
1890 (dump_func
)dump_terminate_thread_reply
,
1891 (dump_func
)dump_get_process_info_reply
,
1893 (dump_func
)dump_get_thread_info_reply
,
1895 (dump_func
)dump_suspend_thread_reply
,
1896 (dump_func
)dump_resume_thread_reply
,
1900 (dump_func
)dump_get_apc_reply
,
1901 (dump_func
)dump_close_handle_reply
,
1902 (dump_func
)dump_set_handle_info_reply
,
1903 (dump_func
)dump_dup_handle_reply
,
1904 (dump_func
)dump_open_process_reply
,
1906 (dump_func
)dump_create_event_reply
,
1908 (dump_func
)dump_open_event_reply
,
1909 (dump_func
)dump_create_mutex_reply
,
1911 (dump_func
)dump_open_mutex_reply
,
1912 (dump_func
)dump_create_semaphore_reply
,
1913 (dump_func
)dump_release_semaphore_reply
,
1914 (dump_func
)dump_open_semaphore_reply
,
1915 (dump_func
)dump_create_file_reply
,
1916 (dump_func
)dump_alloc_file_handle_reply
,
1917 (dump_func
)dump_get_handle_fd_reply
,
1918 (dump_func
)dump_set_file_pointer_reply
,
1922 (dump_func
)dump_get_file_info_reply
,
1925 (dump_func
)dump_create_pipe_reply
,
1926 (dump_func
)dump_create_socket_reply
,
1927 (dump_func
)dump_accept_socket_reply
,
1929 (dump_func
)dump_get_socket_event_reply
,
1931 (dump_func
)dump_alloc_console_reply
,
1933 (dump_func
)dump_open_console_reply
,
1935 (dump_func
)dump_get_console_mode_reply
,
1938 (dump_func
)dump_get_console_info_reply
,
1939 (dump_func
)dump_write_console_input_reply
,
1940 (dump_func
)dump_read_console_input_reply
,
1941 (dump_func
)dump_create_change_notification_reply
,
1942 (dump_func
)dump_create_mapping_reply
,
1943 (dump_func
)dump_open_mapping_reply
,
1944 (dump_func
)dump_get_mapping_info_reply
,
1945 (dump_func
)dump_create_device_reply
,
1946 (dump_func
)dump_create_snapshot_reply
,
1947 (dump_func
)dump_next_process_reply
,
1948 (dump_func
)dump_next_thread_reply
,
1949 (dump_func
)dump_next_module_reply
,
1950 (dump_func
)dump_wait_debug_event_reply
,
1951 (dump_func
)dump_queue_exception_event_reply
,
1952 (dump_func
)dump_get_exception_status_reply
,
1956 (dump_func
)dump_read_process_memory_reply
,
1958 (dump_func
)dump_create_key_reply
,
1959 (dump_func
)dump_open_key_reply
,
1961 (dump_func
)dump_enum_key_reply
,
1963 (dump_func
)dump_get_key_value_reply
,
1964 (dump_func
)dump_enum_key_value_reply
,
1970 (dump_func
)dump_create_timer_reply
,
1971 (dump_func
)dump_open_timer_reply
,
1974 (dump_func
)dump_get_thread_context_reply
,
1976 (dump_func
)dump_get_selector_entry_reply
,
1977 (dump_func
)dump_add_atom_reply
,
1979 (dump_func
)dump_find_atom_reply
,
1980 (dump_func
)dump_get_atom_name_reply
,
1982 (dump_func
)dump_get_msg_queue_reply
,
1984 (dump_func
)dump_set_queue_mask_reply
,
1985 (dump_func
)dump_get_queue_status_reply
,
1986 (dump_func
)dump_wait_input_idle_reply
,
1988 (dump_func
)dump_get_message_reply
,
1990 (dump_func
)dump_get_message_reply_reply
,
1994 (dump_func
)dump_create_serial_reply
,
1995 (dump_func
)dump_get_serial_info_reply
,
1997 (dump_func
)dump_create_async_reply
,
1998 (dump_func
)dump_create_named_pipe_reply
,
1999 (dump_func
)dump_open_named_pipe_reply
,
2003 (dump_func
)dump_get_named_pipe_info_reply
,
2004 (dump_func
)dump_create_window_reply
,
2007 (dump_func
)dump_get_window_info_reply
,
2008 (dump_func
)dump_get_window_parents_reply
,
2009 (dump_func
)dump_get_window_children_reply
,
2010 (dump_func
)dump_get_window_tree_reply
,
2013 static const char * const req_names
[REQ_NB_REQUESTS
] = {
2015 "get_new_process_info",
2019 "init_process_done",
2021 "set_thread_buffer",
2022 "terminate_process",
2046 "release_semaphore",
2049 "alloc_file_handle",
2063 "enable_socket_event",
2072 "write_console_input",
2073 "read_console_input",
2074 "create_change_notification",
2084 "queue_exception_event",
2085 "get_exception_status",
2086 "output_debug_string",
2087 "continue_debug_event",
2089 "read_process_memory",
2090 "write_process_memory",
2101 "save_registry_atexit",
2102 "set_registry_levels",
2107 "get_thread_context",
2108 "set_thread_context",
2109 "get_selector_entry",
2116 "inc_queue_paint_count",
2123 "get_message_reply",
2124 "cleanup_window_queue",
2131 "create_named_pipe",
2133 "connect_named_pipe",
2135 "disconnect_named_pipe",
2136 "get_named_pipe_info",
2141 "get_window_parents",
2142 "get_window_children",
2146 /* ### make_requests end ### */
2147 /* Everything above this line is generated automatically by tools/make_requests */
2149 static const char *get_status_name( unsigned int status
)
2151 #define NAME(status) { #status, STATUS_##status }
2158 NAME(ACCESS_DENIED
),
2159 NAME(ACCESS_VIOLATION
),
2160 NAME(BUFFER_OVERFLOW
),
2161 NAME(CHILD_MUST_BE_VOLATILE
),
2162 NAME(DIRECTORY_NOT_EMPTY
),
2164 NAME(FILE_LOCK_CONFLICT
),
2165 NAME(INVALID_FILE_FOR_SECTION
),
2166 NAME(INVALID_HANDLE
),
2167 NAME(INVALID_PARAMETER
),
2169 NAME(MEDIA_WRITE_PROTECTED
),
2170 NAME(MUTANT_NOT_OWNED
),
2171 NAME(NOT_REGISTRY_FILE
),
2173 NAME(NO_MORE_ENTRIES
),
2174 NAME(NO_MORE_FILES
),
2176 NAME(OBJECT_NAME_COLLISION
),
2177 NAME(OBJECT_NAME_INVALID
),
2178 NAME(OBJECT_NAME_NOT_FOUND
),
2179 NAME(OBJECT_PATH_INVALID
),
2180 NAME(OBJECT_TYPE_MISMATCH
),
2183 NAME(SEMAPHORE_LIMIT_EXCEEDED
),
2184 NAME(SHARING_VIOLATION
),
2185 NAME(SUSPEND_COUNT_EXCEEDED
),
2187 NAME(TOO_MANY_OPENED_FILES
),
2190 { NULL
, 0 } /* terminator */
2195 static char buffer
[10];
2199 for (i
= 0; status_names
[i
].name
; i
++)
2200 if (status_names
[i
].value
== status
) return status_names
[i
].name
;
2202 sprintf( buffer
, "%x", status
);
2206 void trace_request( struct thread
*thread
, const union generic_request
*request
)
2208 enum request req
= request
->header
.req
;
2210 if (req
< REQ_NB_REQUESTS
)
2212 fprintf( stderr
, "%08x: %s(", (unsigned int)thread
, req_names
[req
] );
2214 req_dumpers
[req
]( request
);
2215 fprintf( stderr
, " )\n" );
2217 else fprintf( stderr
, "%08x: %d(?)\n", (unsigned int)thread
, req
);
2220 void trace_reply( struct thread
*thread
, const union generic_request
*request
)
2222 enum request req
= request
->header
.req
;
2223 if (req
< REQ_NB_REQUESTS
)
2225 fprintf( stderr
, "%08x: %s() = %s",
2226 (unsigned int)thread
, req_names
[req
], get_status_name(thread
->error
) );
2227 if (reply_dumpers
[req
])
2229 fprintf( stderr
, " {" );
2231 reply_dumpers
[req
]( request
);
2232 fprintf( stderr
, " }" );
2234 fputc( '\n', stderr
);
2236 else fprintf( stderr
, "%08x: %d() = %s\n",
2237 (unsigned int)thread
, req
, get_status_name(thread
->error
) );