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_bytes( const void *req
)
124 const unsigned char *data
= get_data(req
);
125 size_t len
= get_size(req
);
127 fputc( '{', stderr
);
130 fprintf( stderr
, "%02x", *data
++ );
131 if (--len
) fputc( ',', stderr
);
133 fputc( '}', stderr
);
134 return get_size(req
);
137 static size_t dump_varargs_string( const void *req
)
139 fprintf( stderr
, "\"%.*s\"", (int)get_size(req
), (char *)get_data(req
) );
140 return get_size(req
);
143 static size_t dump_varargs_unicode_len_str( const void *req
)
145 const WCHAR
*str
= get_data(req
);
146 int len
= *str
++ + sizeof(WCHAR
);
147 len
= min( len
, get_size(req
) );
148 fprintf( stderr
, "L\"" );
149 if (len
>= sizeof(WCHAR
)) dump_strW( str
, (len
/ sizeof(WCHAR
)) - 1, stderr
, "\"\"" );
150 fputc( '\"', stderr
);
154 static size_t dump_varargs_unicode_str( const void *req
)
156 fprintf( stderr
, "L\"" );
157 dump_strW( get_data(req
), get_size(req
) / sizeof(WCHAR
), stderr
, "\"\"" );
158 fputc( '\"', stderr
);
159 return get_size(req
);
162 static size_t dump_varargs_context( const void *req
)
164 dump_context( get_data(req
) );
165 return get_size(req
);
168 static size_t dump_varargs_exc_event( const void *req
)
170 const CONTEXT
*ptr
= get_data(req
);
171 fprintf( stderr
, "{context=" );
173 fprintf( stderr
, ",rec=" );
174 dump_exc_record( (EXCEPTION_RECORD
*)(ptr
+ 1) );
175 fputc( '}', stderr
);
176 return get_size(req
);
179 static size_t dump_varargs_debug_event( const void *req
)
181 const debug_event_t
*event
= get_data(req
);
185 fprintf( stderr
, "{}" );
190 case EXCEPTION_DEBUG_EVENT
:
191 fprintf( stderr
, "{exception," );
192 dump_exc_record( &event
->info
.exception
.record
);
193 fprintf( stderr
, ",first=%d}", event
->info
.exception
.first
);
195 case CREATE_THREAD_DEBUG_EVENT
:
196 fprintf( stderr
, "{create_thread,thread=%d,teb=%p,start=%p}",
197 event
->info
.create_thread
.handle
, event
->info
.create_thread
.teb
,
198 event
->info
.create_thread
.start
);
200 case CREATE_PROCESS_DEBUG_EVENT
:
201 fprintf( stderr
, "{create_process,file=%d,process=%d,thread=%d,base=%p,offset=%d,"
202 "size=%d,teb=%p,start=%p,name=%p,unicode=%d}",
203 event
->info
.create_process
.file
, event
->info
.create_process
.process
,
204 event
->info
.create_process
.thread
, event
->info
.create_process
.base
,
205 event
->info
.create_process
.dbg_offset
, event
->info
.create_process
.dbg_size
,
206 event
->info
.create_process
.teb
, event
->info
.create_process
.start
,
207 event
->info
.create_process
.name
, event
->info
.create_process
.unicode
);
209 case EXIT_THREAD_DEBUG_EVENT
:
210 fprintf( stderr
, "{exit_thread,code=%d}", event
->info
.exit
.exit_code
);
212 case EXIT_PROCESS_DEBUG_EVENT
:
213 fprintf( stderr
, "{exit_process,code=%d}", event
->info
.exit
.exit_code
);
215 case LOAD_DLL_DEBUG_EVENT
:
216 fprintf( stderr
, "{load_dll,file=%d,base=%p,offset=%d,size=%d,name=%p,unicode=%d}",
217 event
->info
.load_dll
.handle
, event
->info
.load_dll
.base
,
218 event
->info
.load_dll
.dbg_offset
, event
->info
.load_dll
.dbg_size
,
219 event
->info
.load_dll
.name
, event
->info
.load_dll
.unicode
);
221 case UNLOAD_DLL_DEBUG_EVENT
:
222 fprintf( stderr
, "{unload_dll,base=%p}", event
->info
.unload_dll
.base
);
224 case OUTPUT_DEBUG_STRING_EVENT
:
225 fprintf( stderr
, "{output_string,data=%p,unicode=%d,len=%d}",
226 event
->info
.output_string
.string
, event
->info
.output_string
.unicode
,
227 event
->info
.output_string
.length
);
230 fprintf( stderr
, "{rip,err=%d,type=%d}",
231 event
->info
.rip_info
.error
, event
->info
.rip_info
.type
);
233 case 0: /* zero is the code returned on timeouts */
234 fprintf( stderr
, "{}" );
237 fprintf( stderr
, "{code=??? (%d)}", event
->code
);
240 return get_size(req
);
243 static size_t dump_varargs_input_records( const void *req
)
245 const INPUT_RECORD
*rec
= get_data(req
);
246 size_t len
= get_size(req
) / sizeof(*rec
);
248 fputc( '{', stderr
);
251 fprintf( stderr
, "{%04x,...}", rec
->EventType
);
253 if (--len
) fputc( ',', stderr
);
255 fputc( '}', stderr
);
256 return get_size(req
);
259 typedef void (*dump_func
)( const void *req
);
261 /* Everything below this line is generated automatically by tools/make_requests */
262 /* ### make_requests begin ### */
264 static void dump_new_process_request( const struct new_process_request
*req
)
266 fprintf( stderr
, " inherit_all=%d,", req
->inherit_all
);
267 fprintf( stderr
, " create_flags=%d,", req
->create_flags
);
268 fprintf( stderr
, " start_flags=%d,", req
->start_flags
);
269 fprintf( stderr
, " exe_file=%d,", req
->exe_file
);
270 fprintf( stderr
, " hstdin=%d,", req
->hstdin
);
271 fprintf( stderr
, " hstdout=%d,", req
->hstdout
);
272 fprintf( stderr
, " hstderr=%d,", req
->hstderr
);
273 fprintf( stderr
, " cmd_show=%d,", req
->cmd_show
);
274 fprintf( stderr
, " filename=" );
275 cur_pos
+= dump_varargs_string( req
);
278 static void dump_new_process_reply( const struct new_process_request
*req
)
280 fprintf( stderr
, " info=%d", req
->info
);
283 static void dump_get_new_process_info_request( const struct get_new_process_info_request
*req
)
285 fprintf( stderr
, " info=%d,", req
->info
);
286 fprintf( stderr
, " pinherit=%d,", req
->pinherit
);
287 fprintf( stderr
, " tinherit=%d", req
->tinherit
);
290 static void dump_get_new_process_info_reply( const struct get_new_process_info_request
*req
)
292 fprintf( stderr
, " pid=%p,", req
->pid
);
293 fprintf( stderr
, " phandle=%d,", req
->phandle
);
294 fprintf( stderr
, " tid=%p,", req
->tid
);
295 fprintf( stderr
, " thandle=%d,", req
->thandle
);
296 fprintf( stderr
, " event=%d", req
->event
);
299 static void dump_new_thread_request( const struct new_thread_request
*req
)
301 fprintf( stderr
, " suspend=%d,", req
->suspend
);
302 fprintf( stderr
, " inherit=%d", req
->inherit
);
305 static void dump_new_thread_reply( const struct new_thread_request
*req
)
307 fprintf( stderr
, " tid=%p,", req
->tid
);
308 fprintf( stderr
, " handle=%d", req
->handle
);
311 static void dump_boot_done_request( const struct boot_done_request
*req
)
313 fprintf( stderr
, " debug_level=%d", req
->debug_level
);
316 static void dump_init_process_request( const struct init_process_request
*req
)
318 fprintf( stderr
, " ldt_copy=%p,", req
->ldt_copy
);
319 fprintf( stderr
, " ppid=%d", req
->ppid
);
322 static void dump_init_process_reply( const struct init_process_request
*req
)
324 fprintf( stderr
, " start_flags=%d,", req
->start_flags
);
325 fprintf( stderr
, " server_start=%08x,", req
->server_start
);
326 fprintf( stderr
, " exe_file=%d,", req
->exe_file
);
327 fprintf( stderr
, " hstdin=%d,", req
->hstdin
);
328 fprintf( stderr
, " hstdout=%d,", req
->hstdout
);
329 fprintf( stderr
, " hstderr=%d,", req
->hstderr
);
330 fprintf( stderr
, " cmd_show=%d,", req
->cmd_show
);
331 fprintf( stderr
, " filename=" );
332 cur_pos
+= dump_varargs_string( req
);
335 static void dump_init_process_done_request( const struct init_process_done_request
*req
)
337 fprintf( stderr
, " module=%p,", req
->module
);
338 fprintf( stderr
, " entry=%p,", req
->entry
);
339 fprintf( stderr
, " name=%p,", req
->name
);
340 fprintf( stderr
, " exe_file=%d,", req
->exe_file
);
341 fprintf( stderr
, " gui=%d", req
->gui
);
344 static void dump_init_process_done_reply( const struct init_process_done_request
*req
)
346 fprintf( stderr
, " debugged=%d", req
->debugged
);
349 static void dump_init_thread_request( const struct init_thread_request
*req
)
351 fprintf( stderr
, " unix_pid=%d,", req
->unix_pid
);
352 fprintf( stderr
, " teb=%p,", req
->teb
);
353 fprintf( stderr
, " entry=%p", req
->entry
);
356 static void dump_get_thread_buffer_request( const struct get_thread_buffer_request
*req
)
360 static void dump_get_thread_buffer_reply( const struct get_thread_buffer_request
*req
)
362 fprintf( stderr
, " pid=%p,", req
->pid
);
363 fprintf( stderr
, " tid=%p,", req
->tid
);
364 fprintf( stderr
, " boot=%d,", req
->boot
);
365 fprintf( stderr
, " version=%d", req
->version
);
368 static void dump_terminate_process_request( const struct terminate_process_request
*req
)
370 fprintf( stderr
, " handle=%d,", req
->handle
);
371 fprintf( stderr
, " exit_code=%d", req
->exit_code
);
374 static void dump_terminate_process_reply( const struct terminate_process_request
*req
)
376 fprintf( stderr
, " self=%d", req
->self
);
379 static void dump_terminate_thread_request( const struct terminate_thread_request
*req
)
381 fprintf( stderr
, " handle=%d,", req
->handle
);
382 fprintf( stderr
, " exit_code=%d", req
->exit_code
);
385 static void dump_terminate_thread_reply( const struct terminate_thread_request
*req
)
387 fprintf( stderr
, " self=%d,", req
->self
);
388 fprintf( stderr
, " last=%d", req
->last
);
391 static void dump_get_process_info_request( const struct get_process_info_request
*req
)
393 fprintf( stderr
, " handle=%d", req
->handle
);
396 static void dump_get_process_info_reply( const struct get_process_info_request
*req
)
398 fprintf( stderr
, " pid=%p,", req
->pid
);
399 fprintf( stderr
, " debugged=%d,", req
->debugged
);
400 fprintf( stderr
, " exit_code=%d,", req
->exit_code
);
401 fprintf( stderr
, " priority=%d,", req
->priority
);
402 fprintf( stderr
, " process_affinity=%d,", req
->process_affinity
);
403 fprintf( stderr
, " system_affinity=%d", req
->system_affinity
);
406 static void dump_set_process_info_request( const struct set_process_info_request
*req
)
408 fprintf( stderr
, " handle=%d,", req
->handle
);
409 fprintf( stderr
, " mask=%d,", req
->mask
);
410 fprintf( stderr
, " priority=%d,", req
->priority
);
411 fprintf( stderr
, " affinity=%d", req
->affinity
);
414 static void dump_get_thread_info_request( const struct get_thread_info_request
*req
)
416 fprintf( stderr
, " handle=%d,", req
->handle
);
417 fprintf( stderr
, " tid_in=%p", req
->tid_in
);
420 static void dump_get_thread_info_reply( const struct get_thread_info_request
*req
)
422 fprintf( stderr
, " tid=%p,", req
->tid
);
423 fprintf( stderr
, " teb=%p,", req
->teb
);
424 fprintf( stderr
, " exit_code=%d,", req
->exit_code
);
425 fprintf( stderr
, " priority=%d", req
->priority
);
428 static void dump_set_thread_info_request( const struct set_thread_info_request
*req
)
430 fprintf( stderr
, " handle=%d,", req
->handle
);
431 fprintf( stderr
, " mask=%d,", req
->mask
);
432 fprintf( stderr
, " priority=%d,", req
->priority
);
433 fprintf( stderr
, " affinity=%d", req
->affinity
);
436 static void dump_suspend_thread_request( const struct suspend_thread_request
*req
)
438 fprintf( stderr
, " handle=%d", req
->handle
);
441 static void dump_suspend_thread_reply( const struct suspend_thread_request
*req
)
443 fprintf( stderr
, " count=%d", req
->count
);
446 static void dump_resume_thread_request( const struct resume_thread_request
*req
)
448 fprintf( stderr
, " handle=%d", req
->handle
);
451 static void dump_resume_thread_reply( const struct resume_thread_request
*req
)
453 fprintf( stderr
, " count=%d", req
->count
);
456 static void dump_load_dll_request( const struct load_dll_request
*req
)
458 fprintf( stderr
, " handle=%d,", req
->handle
);
459 fprintf( stderr
, " base=%p,", req
->base
);
460 fprintf( stderr
, " dbg_offset=%d,", req
->dbg_offset
);
461 fprintf( stderr
, " dbg_size=%d,", req
->dbg_size
);
462 fprintf( stderr
, " name=%p", req
->name
);
465 static void dump_unload_dll_request( const struct unload_dll_request
*req
)
467 fprintf( stderr
, " base=%p", req
->base
);
470 static void dump_queue_apc_request( const struct queue_apc_request
*req
)
472 fprintf( stderr
, " handle=%d,", req
->handle
);
473 fprintf( stderr
, " user=%d,", req
->user
);
474 fprintf( stderr
, " func=%p,", req
->func
);
475 fprintf( stderr
, " param=%p", req
->param
);
478 static void dump_get_apc_request( const struct get_apc_request
*req
)
480 fprintf( stderr
, " alertable=%d", req
->alertable
);
483 static void dump_get_apc_reply( const struct get_apc_request
*req
)
485 fprintf( stderr
, " func=%p,", req
->func
);
486 fprintf( stderr
, " type=%d,", req
->type
);
487 fprintf( stderr
, " args=" );
488 cur_pos
+= dump_varargs_ptrs( req
);
491 static void dump_close_handle_request( const struct close_handle_request
*req
)
493 fprintf( stderr
, " handle=%d", req
->handle
);
496 static void dump_close_handle_reply( const struct close_handle_request
*req
)
498 fprintf( stderr
, " fd=%d", req
->fd
);
501 static void dump_set_handle_info_request( const struct set_handle_info_request
*req
)
503 fprintf( stderr
, " handle=%d,", req
->handle
);
504 fprintf( stderr
, " flags=%d,", req
->flags
);
505 fprintf( stderr
, " mask=%d,", req
->mask
);
506 fprintf( stderr
, " fd=%d", req
->fd
);
509 static void dump_set_handle_info_reply( const struct set_handle_info_request
*req
)
511 fprintf( stderr
, " old_flags=%d,", req
->old_flags
);
512 fprintf( stderr
, " cur_fd=%d", req
->cur_fd
);
515 static void dump_dup_handle_request( const struct dup_handle_request
*req
)
517 fprintf( stderr
, " src_process=%d,", req
->src_process
);
518 fprintf( stderr
, " src_handle=%d,", req
->src_handle
);
519 fprintf( stderr
, " dst_process=%d,", req
->dst_process
);
520 fprintf( stderr
, " access=%08x,", req
->access
);
521 fprintf( stderr
, " inherit=%d,", req
->inherit
);
522 fprintf( stderr
, " options=%d", req
->options
);
525 static void dump_dup_handle_reply( const struct dup_handle_request
*req
)
527 fprintf( stderr
, " handle=%d,", req
->handle
);
528 fprintf( stderr
, " fd=%d", req
->fd
);
531 static void dump_open_process_request( const struct open_process_request
*req
)
533 fprintf( stderr
, " pid=%p,", req
->pid
);
534 fprintf( stderr
, " access=%08x,", req
->access
);
535 fprintf( stderr
, " inherit=%d", req
->inherit
);
538 static void dump_open_process_reply( const struct open_process_request
*req
)
540 fprintf( stderr
, " handle=%d", req
->handle
);
543 static void dump_select_request( const struct select_request
*req
)
545 fprintf( stderr
, " flags=%d,", req
->flags
);
546 fprintf( stderr
, " sec=%d,", req
->sec
);
547 fprintf( stderr
, " usec=%d,", req
->usec
);
548 fprintf( stderr
, " handles=" );
549 cur_pos
+= dump_varargs_handles( req
);
552 static void dump_select_reply( const struct select_request
*req
)
554 fprintf( stderr
, " signaled=%d", req
->signaled
);
557 static void dump_create_event_request( const struct create_event_request
*req
)
559 fprintf( stderr
, " manual_reset=%d,", req
->manual_reset
);
560 fprintf( stderr
, " initial_state=%d,", req
->initial_state
);
561 fprintf( stderr
, " inherit=%d,", req
->inherit
);
562 fprintf( stderr
, " name=" );
563 cur_pos
+= dump_varargs_unicode_str( req
);
566 static void dump_create_event_reply( const struct create_event_request
*req
)
568 fprintf( stderr
, " handle=%d", req
->handle
);
571 static void dump_event_op_request( const struct event_op_request
*req
)
573 fprintf( stderr
, " handle=%d,", req
->handle
);
574 fprintf( stderr
, " op=%d", req
->op
);
577 static void dump_open_event_request( const struct open_event_request
*req
)
579 fprintf( stderr
, " access=%08x,", req
->access
);
580 fprintf( stderr
, " inherit=%d,", req
->inherit
);
581 fprintf( stderr
, " name=" );
582 cur_pos
+= dump_varargs_unicode_str( req
);
585 static void dump_open_event_reply( const struct open_event_request
*req
)
587 fprintf( stderr
, " handle=%d", req
->handle
);
590 static void dump_create_mutex_request( const struct create_mutex_request
*req
)
592 fprintf( stderr
, " owned=%d,", req
->owned
);
593 fprintf( stderr
, " inherit=%d,", req
->inherit
);
594 fprintf( stderr
, " name=" );
595 cur_pos
+= dump_varargs_unicode_str( req
);
598 static void dump_create_mutex_reply( const struct create_mutex_request
*req
)
600 fprintf( stderr
, " handle=%d", req
->handle
);
603 static void dump_release_mutex_request( const struct release_mutex_request
*req
)
605 fprintf( stderr
, " handle=%d", req
->handle
);
608 static void dump_open_mutex_request( const struct open_mutex_request
*req
)
610 fprintf( stderr
, " access=%08x,", req
->access
);
611 fprintf( stderr
, " inherit=%d,", req
->inherit
);
612 fprintf( stderr
, " name=" );
613 cur_pos
+= dump_varargs_unicode_str( req
);
616 static void dump_open_mutex_reply( const struct open_mutex_request
*req
)
618 fprintf( stderr
, " handle=%d", req
->handle
);
621 static void dump_create_semaphore_request( const struct create_semaphore_request
*req
)
623 fprintf( stderr
, " initial=%08x,", req
->initial
);
624 fprintf( stderr
, " max=%08x,", req
->max
);
625 fprintf( stderr
, " inherit=%d,", req
->inherit
);
626 fprintf( stderr
, " name=" );
627 cur_pos
+= dump_varargs_unicode_str( req
);
630 static void dump_create_semaphore_reply( const struct create_semaphore_request
*req
)
632 fprintf( stderr
, " handle=%d", req
->handle
);
635 static void dump_release_semaphore_request( const struct release_semaphore_request
*req
)
637 fprintf( stderr
, " handle=%d,", req
->handle
);
638 fprintf( stderr
, " count=%08x", req
->count
);
641 static void dump_release_semaphore_reply( const struct release_semaphore_request
*req
)
643 fprintf( stderr
, " prev_count=%08x", req
->prev_count
);
646 static void dump_open_semaphore_request( const struct open_semaphore_request
*req
)
648 fprintf( stderr
, " access=%08x,", req
->access
);
649 fprintf( stderr
, " inherit=%d,", req
->inherit
);
650 fprintf( stderr
, " name=" );
651 cur_pos
+= dump_varargs_unicode_str( req
);
654 static void dump_open_semaphore_reply( const struct open_semaphore_request
*req
)
656 fprintf( stderr
, " handle=%d", req
->handle
);
659 static void dump_create_file_request( const struct create_file_request
*req
)
661 fprintf( stderr
, " access=%08x,", req
->access
);
662 fprintf( stderr
, " inherit=%d,", req
->inherit
);
663 fprintf( stderr
, " sharing=%08x,", req
->sharing
);
664 fprintf( stderr
, " create=%d,", req
->create
);
665 fprintf( stderr
, " attrs=%08x,", req
->attrs
);
666 fprintf( stderr
, " filename=" );
667 cur_pos
+= dump_varargs_string( req
);
670 static void dump_create_file_reply( const struct create_file_request
*req
)
672 fprintf( stderr
, " handle=%d", req
->handle
);
675 static void dump_alloc_file_handle_request( const struct alloc_file_handle_request
*req
)
677 fprintf( stderr
, " access=%08x", req
->access
);
680 static void dump_alloc_file_handle_reply( const struct alloc_file_handle_request
*req
)
682 fprintf( stderr
, " handle=%d", req
->handle
);
685 static void dump_get_handle_fd_request( const struct get_handle_fd_request
*req
)
687 fprintf( stderr
, " handle=%d,", req
->handle
);
688 fprintf( stderr
, " access=%08x", req
->access
);
691 static void dump_get_handle_fd_reply( const struct get_handle_fd_request
*req
)
693 fprintf( stderr
, " fd=%d", req
->fd
);
696 static void dump_set_file_pointer_request( const struct set_file_pointer_request
*req
)
698 fprintf( stderr
, " handle=%d,", req
->handle
);
699 fprintf( stderr
, " low=%d,", req
->low
);
700 fprintf( stderr
, " high=%d,", req
->high
);
701 fprintf( stderr
, " whence=%d", req
->whence
);
704 static void dump_set_file_pointer_reply( const struct set_file_pointer_request
*req
)
706 fprintf( stderr
, " new_low=%d,", req
->new_low
);
707 fprintf( stderr
, " new_high=%d", req
->new_high
);
710 static void dump_truncate_file_request( const struct truncate_file_request
*req
)
712 fprintf( stderr
, " handle=%d", req
->handle
);
715 static void dump_set_file_time_request( const struct set_file_time_request
*req
)
717 fprintf( stderr
, " handle=%d,", req
->handle
);
718 fprintf( stderr
, " access_time=%ld,", req
->access_time
);
719 fprintf( stderr
, " write_time=%ld", req
->write_time
);
722 static void dump_flush_file_request( const struct flush_file_request
*req
)
724 fprintf( stderr
, " handle=%d", req
->handle
);
727 static void dump_get_file_info_request( const struct get_file_info_request
*req
)
729 fprintf( stderr
, " handle=%d", req
->handle
);
732 static void dump_get_file_info_reply( const struct get_file_info_request
*req
)
734 fprintf( stderr
, " type=%d,", req
->type
);
735 fprintf( stderr
, " attr=%d,", req
->attr
);
736 fprintf( stderr
, " access_time=%ld,", req
->access_time
);
737 fprintf( stderr
, " write_time=%ld,", req
->write_time
);
738 fprintf( stderr
, " size_high=%d,", req
->size_high
);
739 fprintf( stderr
, " size_low=%d,", req
->size_low
);
740 fprintf( stderr
, " links=%d,", req
->links
);
741 fprintf( stderr
, " index_high=%d,", req
->index_high
);
742 fprintf( stderr
, " index_low=%d,", req
->index_low
);
743 fprintf( stderr
, " serial=%08x", req
->serial
);
746 static void dump_lock_file_request( const struct lock_file_request
*req
)
748 fprintf( stderr
, " handle=%d,", req
->handle
);
749 fprintf( stderr
, " offset_low=%08x,", req
->offset_low
);
750 fprintf( stderr
, " offset_high=%08x,", req
->offset_high
);
751 fprintf( stderr
, " count_low=%08x,", req
->count_low
);
752 fprintf( stderr
, " count_high=%08x", req
->count_high
);
755 static void dump_unlock_file_request( const struct unlock_file_request
*req
)
757 fprintf( stderr
, " handle=%d,", req
->handle
);
758 fprintf( stderr
, " offset_low=%08x,", req
->offset_low
);
759 fprintf( stderr
, " offset_high=%08x,", req
->offset_high
);
760 fprintf( stderr
, " count_low=%08x,", req
->count_low
);
761 fprintf( stderr
, " count_high=%08x", req
->count_high
);
764 static void dump_create_pipe_request( const struct create_pipe_request
*req
)
766 fprintf( stderr
, " inherit=%d", req
->inherit
);
769 static void dump_create_pipe_reply( const struct create_pipe_request
*req
)
771 fprintf( stderr
, " handle_read=%d,", req
->handle_read
);
772 fprintf( stderr
, " handle_write=%d", req
->handle_write
);
775 static void dump_create_socket_request( const struct create_socket_request
*req
)
777 fprintf( stderr
, " access=%08x,", req
->access
);
778 fprintf( stderr
, " inherit=%d,", req
->inherit
);
779 fprintf( stderr
, " family=%d,", req
->family
);
780 fprintf( stderr
, " type=%d,", req
->type
);
781 fprintf( stderr
, " protocol=%d", req
->protocol
);
784 static void dump_create_socket_reply( const struct create_socket_request
*req
)
786 fprintf( stderr
, " handle=%d", req
->handle
);
789 static void dump_accept_socket_request( const struct accept_socket_request
*req
)
791 fprintf( stderr
, " lhandle=%d,", req
->lhandle
);
792 fprintf( stderr
, " access=%08x,", req
->access
);
793 fprintf( stderr
, " inherit=%d", req
->inherit
);
796 static void dump_accept_socket_reply( const struct accept_socket_request
*req
)
798 fprintf( stderr
, " handle=%d", req
->handle
);
801 static void dump_set_socket_event_request( const struct set_socket_event_request
*req
)
803 fprintf( stderr
, " handle=%d,", req
->handle
);
804 fprintf( stderr
, " mask=%08x,", req
->mask
);
805 fprintf( stderr
, " event=%d", req
->event
);
808 static void dump_get_socket_event_request( const struct get_socket_event_request
*req
)
810 fprintf( stderr
, " handle=%d,", req
->handle
);
811 fprintf( stderr
, " service=%d,", req
->service
);
812 fprintf( stderr
, " s_event=%d,", req
->s_event
);
813 fprintf( stderr
, " c_event=%d", req
->c_event
);
816 static void dump_get_socket_event_reply( const struct get_socket_event_request
*req
)
818 fprintf( stderr
, " mask=%08x,", req
->mask
);
819 fprintf( stderr
, " pmask=%08x,", req
->pmask
);
820 fprintf( stderr
, " state=%08x,", req
->state
);
821 fprintf( stderr
, " errors=" );
822 cur_pos
+= dump_varargs_ints( req
);
825 static void dump_enable_socket_event_request( const struct enable_socket_event_request
*req
)
827 fprintf( stderr
, " handle=%d,", req
->handle
);
828 fprintf( stderr
, " mask=%08x,", req
->mask
);
829 fprintf( stderr
, " sstate=%08x,", req
->sstate
);
830 fprintf( stderr
, " cstate=%08x", req
->cstate
);
833 static void dump_alloc_console_request( const struct alloc_console_request
*req
)
835 fprintf( stderr
, " access=%08x,", req
->access
);
836 fprintf( stderr
, " inherit=%d", req
->inherit
);
839 static void dump_alloc_console_reply( const struct alloc_console_request
*req
)
841 fprintf( stderr
, " handle_in=%d,", req
->handle_in
);
842 fprintf( stderr
, " handle_out=%d", req
->handle_out
);
845 static void dump_free_console_request( const struct free_console_request
*req
)
849 static void dump_open_console_request( const struct open_console_request
*req
)
851 fprintf( stderr
, " output=%d,", req
->output
);
852 fprintf( stderr
, " access=%08x,", req
->access
);
853 fprintf( stderr
, " inherit=%d", req
->inherit
);
856 static void dump_open_console_reply( const struct open_console_request
*req
)
858 fprintf( stderr
, " handle=%d", req
->handle
);
861 static void dump_set_console_fd_request( const struct set_console_fd_request
*req
)
863 fprintf( stderr
, " handle=%d,", req
->handle
);
864 fprintf( stderr
, " file_handle=%d,", req
->file_handle
);
865 fprintf( stderr
, " pid=%d", req
->pid
);
868 static void dump_get_console_mode_request( const struct get_console_mode_request
*req
)
870 fprintf( stderr
, " handle=%d", req
->handle
);
873 static void dump_get_console_mode_reply( const struct get_console_mode_request
*req
)
875 fprintf( stderr
, " mode=%d", req
->mode
);
878 static void dump_set_console_mode_request( const struct set_console_mode_request
*req
)
880 fprintf( stderr
, " handle=%d,", req
->handle
);
881 fprintf( stderr
, " mode=%d", req
->mode
);
884 static void dump_set_console_info_request( const struct set_console_info_request
*req
)
886 fprintf( stderr
, " handle=%d,", req
->handle
);
887 fprintf( stderr
, " mask=%d,", req
->mask
);
888 fprintf( stderr
, " cursor_size=%d,", req
->cursor_size
);
889 fprintf( stderr
, " cursor_visible=%d,", req
->cursor_visible
);
890 fprintf( stderr
, " title=" );
891 cur_pos
+= dump_varargs_string( req
);
894 static void dump_get_console_info_request( const struct get_console_info_request
*req
)
896 fprintf( stderr
, " handle=%d", req
->handle
);
899 static void dump_get_console_info_reply( const struct get_console_info_request
*req
)
901 fprintf( stderr
, " cursor_size=%d,", req
->cursor_size
);
902 fprintf( stderr
, " cursor_visible=%d,", req
->cursor_visible
);
903 fprintf( stderr
, " pid=%d,", req
->pid
);
904 fprintf( stderr
, " title=" );
905 cur_pos
+= dump_varargs_string( req
);
908 static void dump_write_console_input_request( const struct write_console_input_request
*req
)
910 fprintf( stderr
, " handle=%d,", req
->handle
);
911 fprintf( stderr
, " rec=" );
912 cur_pos
+= dump_varargs_input_records( req
);
915 static void dump_write_console_input_reply( const struct write_console_input_request
*req
)
917 fprintf( stderr
, " written=%d", req
->written
);
920 static void dump_read_console_input_request( const struct read_console_input_request
*req
)
922 fprintf( stderr
, " handle=%d,", req
->handle
);
923 fprintf( stderr
, " flush=%d", req
->flush
);
926 static void dump_read_console_input_reply( const struct read_console_input_request
*req
)
928 fprintf( stderr
, " read=%d,", req
->read
);
929 fprintf( stderr
, " rec=" );
930 cur_pos
+= dump_varargs_input_records( req
);
933 static void dump_create_change_notification_request( const struct create_change_notification_request
*req
)
935 fprintf( stderr
, " subtree=%d,", req
->subtree
);
936 fprintf( stderr
, " filter=%d", req
->filter
);
939 static void dump_create_change_notification_reply( const struct create_change_notification_request
*req
)
941 fprintf( stderr
, " handle=%d", req
->handle
);
944 static void dump_create_mapping_request( const struct create_mapping_request
*req
)
946 fprintf( stderr
, " size_high=%d,", req
->size_high
);
947 fprintf( stderr
, " size_low=%d,", req
->size_low
);
948 fprintf( stderr
, " protect=%d,", req
->protect
);
949 fprintf( stderr
, " inherit=%d,", req
->inherit
);
950 fprintf( stderr
, " file_handle=%d,", req
->file_handle
);
951 fprintf( stderr
, " name=" );
952 cur_pos
+= dump_varargs_unicode_str( req
);
955 static void dump_create_mapping_reply( const struct create_mapping_request
*req
)
957 fprintf( stderr
, " handle=%d", req
->handle
);
960 static void dump_open_mapping_request( const struct open_mapping_request
*req
)
962 fprintf( stderr
, " access=%08x,", req
->access
);
963 fprintf( stderr
, " inherit=%d,", req
->inherit
);
964 fprintf( stderr
, " name=" );
965 cur_pos
+= dump_varargs_unicode_str( req
);
968 static void dump_open_mapping_reply( const struct open_mapping_request
*req
)
970 fprintf( stderr
, " handle=%d", req
->handle
);
973 static void dump_get_mapping_info_request( const struct get_mapping_info_request
*req
)
975 fprintf( stderr
, " handle=%d", req
->handle
);
978 static void dump_get_mapping_info_reply( const struct get_mapping_info_request
*req
)
980 fprintf( stderr
, " size_high=%d,", req
->size_high
);
981 fprintf( stderr
, " size_low=%d,", req
->size_low
);
982 fprintf( stderr
, " protect=%d,", req
->protect
);
983 fprintf( stderr
, " header_size=%d,", req
->header_size
);
984 fprintf( stderr
, " base=%p,", req
->base
);
985 fprintf( stderr
, " shared_file=%d,", req
->shared_file
);
986 fprintf( stderr
, " shared_size=%d,", req
->shared_size
);
987 fprintf( stderr
, " anonymous=%d", req
->anonymous
);
990 static void dump_create_device_request( const struct create_device_request
*req
)
992 fprintf( stderr
, " access=%08x,", req
->access
);
993 fprintf( stderr
, " inherit=%d,", req
->inherit
);
994 fprintf( stderr
, " id=%d", req
->id
);
997 static void dump_create_device_reply( const struct create_device_request
*req
)
999 fprintf( stderr
, " handle=%d", req
->handle
);
1002 static void dump_create_snapshot_request( const struct create_snapshot_request
*req
)
1004 fprintf( stderr
, " inherit=%d,", req
->inherit
);
1005 fprintf( stderr
, " flags=%d,", req
->flags
);
1006 fprintf( stderr
, " pid=%p", req
->pid
);
1009 static void dump_create_snapshot_reply( const struct create_snapshot_request
*req
)
1011 fprintf( stderr
, " handle=%d", req
->handle
);
1014 static void dump_next_process_request( const struct next_process_request
*req
)
1016 fprintf( stderr
, " handle=%d,", req
->handle
);
1017 fprintf( stderr
, " reset=%d", req
->reset
);
1020 static void dump_next_process_reply( const struct next_process_request
*req
)
1022 fprintf( stderr
, " count=%d,", req
->count
);
1023 fprintf( stderr
, " pid=%p,", req
->pid
);
1024 fprintf( stderr
, " threads=%d,", req
->threads
);
1025 fprintf( stderr
, " priority=%d", req
->priority
);
1028 static void dump_next_thread_request( const struct next_thread_request
*req
)
1030 fprintf( stderr
, " handle=%d,", req
->handle
);
1031 fprintf( stderr
, " reset=%d", req
->reset
);
1034 static void dump_next_thread_reply( const struct next_thread_request
*req
)
1036 fprintf( stderr
, " count=%d,", req
->count
);
1037 fprintf( stderr
, " pid=%p,", req
->pid
);
1038 fprintf( stderr
, " tid=%p,", req
->tid
);
1039 fprintf( stderr
, " base_pri=%d,", req
->base_pri
);
1040 fprintf( stderr
, " delta_pri=%d", req
->delta_pri
);
1043 static void dump_next_module_request( const struct next_module_request
*req
)
1045 fprintf( stderr
, " handle=%d,", req
->handle
);
1046 fprintf( stderr
, " reset=%d", req
->reset
);
1049 static void dump_next_module_reply( const struct next_module_request
*req
)
1051 fprintf( stderr
, " pid=%p,", req
->pid
);
1052 fprintf( stderr
, " base=%p", req
->base
);
1055 static void dump_wait_debug_event_request( const struct wait_debug_event_request
*req
)
1057 fprintf( stderr
, " get_handle=%d", req
->get_handle
);
1060 static void dump_wait_debug_event_reply( const struct wait_debug_event_request
*req
)
1062 fprintf( stderr
, " pid=%p,", req
->pid
);
1063 fprintf( stderr
, " tid=%p,", req
->tid
);
1064 fprintf( stderr
, " wait=%d,", req
->wait
);
1065 fprintf( stderr
, " event=" );
1066 cur_pos
+= dump_varargs_debug_event( req
);
1069 static void dump_exception_event_request( const struct exception_event_request
*req
)
1071 fprintf( stderr
, " first=%d,", req
->first
);
1072 fprintf( stderr
, " record=" );
1073 cur_pos
+= dump_varargs_exc_event( req
);
1076 static void dump_exception_event_reply( const struct exception_event_request
*req
)
1078 fprintf( stderr
, " status=%d,", req
->status
);
1079 fprintf( stderr
, " context=" );
1080 cur_pos
+= dump_varargs_context( req
);
1083 static void dump_output_debug_string_request( const struct output_debug_string_request
*req
)
1085 fprintf( stderr
, " string=%p,", req
->string
);
1086 fprintf( stderr
, " unicode=%d,", req
->unicode
);
1087 fprintf( stderr
, " length=%d", req
->length
);
1090 static void dump_continue_debug_event_request( const struct continue_debug_event_request
*req
)
1092 fprintf( stderr
, " pid=%p,", req
->pid
);
1093 fprintf( stderr
, " tid=%p,", req
->tid
);
1094 fprintf( stderr
, " status=%d", req
->status
);
1097 static void dump_debug_process_request( const struct debug_process_request
*req
)
1099 fprintf( stderr
, " pid=%p", req
->pid
);
1102 static void dump_read_process_memory_request( const struct read_process_memory_request
*req
)
1104 fprintf( stderr
, " handle=%d,", req
->handle
);
1105 fprintf( stderr
, " addr=%p,", req
->addr
);
1106 fprintf( stderr
, " len=%d", req
->len
);
1109 static void dump_read_process_memory_reply( const struct read_process_memory_request
*req
)
1111 fprintf( stderr
, " data=" );
1112 cur_pos
+= dump_varargs_bytes( req
);
1115 static void dump_write_process_memory_request( const struct write_process_memory_request
*req
)
1117 fprintf( stderr
, " handle=%d,", req
->handle
);
1118 fprintf( stderr
, " addr=%p,", req
->addr
);
1119 fprintf( stderr
, " len=%d,", req
->len
);
1120 fprintf( stderr
, " first_mask=%08x,", req
->first_mask
);
1121 fprintf( stderr
, " last_mask=%08x,", req
->last_mask
);
1122 fprintf( stderr
, " data=" );
1123 cur_pos
+= dump_varargs_bytes( req
);
1126 static void dump_create_key_request( const struct create_key_request
*req
)
1128 fprintf( stderr
, " parent=%d,", req
->parent
);
1129 fprintf( stderr
, " access=%08x,", req
->access
);
1130 fprintf( stderr
, " options=%08x,", req
->options
);
1131 fprintf( stderr
, " modif=%ld,", req
->modif
);
1132 fprintf( stderr
, " name=" );
1133 cur_pos
+= dump_varargs_unicode_len_str( req
);
1134 fputc( ',', stderr
);
1135 fprintf( stderr
, " class=" );
1136 cur_pos
+= dump_varargs_unicode_str( req
);
1139 static void dump_create_key_reply( const struct create_key_request
*req
)
1141 fprintf( stderr
, " hkey=%d,", req
->hkey
);
1142 fprintf( stderr
, " created=%d", req
->created
);
1145 static void dump_open_key_request( const struct open_key_request
*req
)
1147 fprintf( stderr
, " parent=%d,", req
->parent
);
1148 fprintf( stderr
, " access=%08x,", req
->access
);
1149 fprintf( stderr
, " name=" );
1150 cur_pos
+= dump_varargs_unicode_str( req
);
1153 static void dump_open_key_reply( const struct open_key_request
*req
)
1155 fprintf( stderr
, " hkey=%d", req
->hkey
);
1158 static void dump_delete_key_request( const struct delete_key_request
*req
)
1160 fprintf( stderr
, " hkey=%d", req
->hkey
);
1163 static void dump_enum_key_request( const struct enum_key_request
*req
)
1165 fprintf( stderr
, " hkey=%d,", req
->hkey
);
1166 fprintf( stderr
, " index=%d,", req
->index
);
1167 fprintf( stderr
, " full=%d", req
->full
);
1170 static void dump_enum_key_reply( const struct enum_key_request
*req
)
1172 fprintf( stderr
, " subkeys=%d,", req
->subkeys
);
1173 fprintf( stderr
, " max_subkey=%d,", req
->max_subkey
);
1174 fprintf( stderr
, " max_class=%d,", req
->max_class
);
1175 fprintf( stderr
, " values=%d,", req
->values
);
1176 fprintf( stderr
, " max_value=%d,", req
->max_value
);
1177 fprintf( stderr
, " max_data=%d,", req
->max_data
);
1178 fprintf( stderr
, " modif=%ld,", req
->modif
);
1179 fprintf( stderr
, " name=" );
1180 cur_pos
+= dump_varargs_unicode_len_str( req
);
1181 fputc( ',', stderr
);
1182 fprintf( stderr
, " class=" );
1183 cur_pos
+= dump_varargs_unicode_str( req
);
1186 static void dump_set_key_value_request( const struct set_key_value_request
*req
)
1188 fprintf( stderr
, " hkey=%d,", req
->hkey
);
1189 fprintf( stderr
, " type=%d,", req
->type
);
1190 fprintf( stderr
, " total=%08x,", req
->total
);
1191 fprintf( stderr
, " offset=%08x,", req
->offset
);
1192 fprintf( stderr
, " name=" );
1193 cur_pos
+= dump_varargs_unicode_len_str( req
);
1194 fputc( ',', stderr
);
1195 fprintf( stderr
, " data=" );
1196 cur_pos
+= dump_varargs_bytes( req
);
1199 static void dump_get_key_value_request( const struct get_key_value_request
*req
)
1201 fprintf( stderr
, " hkey=%d,", req
->hkey
);
1202 fprintf( stderr
, " offset=%08x,", req
->offset
);
1203 fprintf( stderr
, " name=" );
1204 cur_pos
+= dump_varargs_unicode_len_str( req
);
1207 static void dump_get_key_value_reply( const struct get_key_value_request
*req
)
1209 fprintf( stderr
, " type=%d,", req
->type
);
1210 fprintf( stderr
, " len=%d,", req
->len
);
1211 fprintf( stderr
, " data=" );
1212 cur_pos
+= dump_varargs_bytes( req
);
1215 static void dump_enum_key_value_request( const struct enum_key_value_request
*req
)
1217 fprintf( stderr
, " hkey=%d,", req
->hkey
);
1218 fprintf( stderr
, " index=%d,", req
->index
);
1219 fprintf( stderr
, " offset=%08x", req
->offset
);
1222 static void dump_enum_key_value_reply( const struct enum_key_value_request
*req
)
1224 fprintf( stderr
, " type=%d,", req
->type
);
1225 fprintf( stderr
, " len=%d,", req
->len
);
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_delete_key_value_request( const struct delete_key_value_request
*req
)
1235 fprintf( stderr
, " hkey=%d,", req
->hkey
);
1236 fprintf( stderr
, " name=" );
1237 cur_pos
+= dump_varargs_unicode_str( req
);
1240 static void dump_load_registry_request( const struct load_registry_request
*req
)
1242 fprintf( stderr
, " hkey=%d,", req
->hkey
);
1243 fprintf( stderr
, " file=%d,", req
->file
);
1244 fprintf( stderr
, " name=" );
1245 cur_pos
+= dump_varargs_unicode_str( req
);
1248 static void dump_save_registry_request( const struct save_registry_request
*req
)
1250 fprintf( stderr
, " hkey=%d,", req
->hkey
);
1251 fprintf( stderr
, " file=%d", req
->file
);
1254 static void dump_save_registry_atexit_request( const struct save_registry_atexit_request
*req
)
1256 fprintf( stderr
, " hkey=%d,", req
->hkey
);
1257 fprintf( stderr
, " file=" );
1258 cur_pos
+= dump_varargs_string( req
);
1261 static void dump_set_registry_levels_request( const struct set_registry_levels_request
*req
)
1263 fprintf( stderr
, " current=%d,", req
->current
);
1264 fprintf( stderr
, " saving=%d,", req
->saving
);
1265 fprintf( stderr
, " period=%d", req
->period
);
1268 static void dump_create_timer_request( const struct create_timer_request
*req
)
1270 fprintf( stderr
, " inherit=%d,", req
->inherit
);
1271 fprintf( stderr
, " manual=%d,", req
->manual
);
1272 fprintf( stderr
, " name=" );
1273 cur_pos
+= dump_varargs_unicode_str( req
);
1276 static void dump_create_timer_reply( const struct create_timer_request
*req
)
1278 fprintf( stderr
, " handle=%d", req
->handle
);
1281 static void dump_open_timer_request( const struct open_timer_request
*req
)
1283 fprintf( stderr
, " access=%08x,", req
->access
);
1284 fprintf( stderr
, " inherit=%d,", req
->inherit
);
1285 fprintf( stderr
, " name=" );
1286 cur_pos
+= dump_varargs_unicode_str( req
);
1289 static void dump_open_timer_reply( const struct open_timer_request
*req
)
1291 fprintf( stderr
, " handle=%d", req
->handle
);
1294 static void dump_set_timer_request( const struct set_timer_request
*req
)
1296 fprintf( stderr
, " handle=%d,", req
->handle
);
1297 fprintf( stderr
, " sec=%d,", req
->sec
);
1298 fprintf( stderr
, " usec=%d,", req
->usec
);
1299 fprintf( stderr
, " period=%d,", req
->period
);
1300 fprintf( stderr
, " callback=%p,", req
->callback
);
1301 fprintf( stderr
, " arg=%p", req
->arg
);
1304 static void dump_cancel_timer_request( const struct cancel_timer_request
*req
)
1306 fprintf( stderr
, " handle=%d", req
->handle
);
1309 static void dump_get_thread_context_request( const struct get_thread_context_request
*req
)
1311 fprintf( stderr
, " handle=%d,", req
->handle
);
1312 fprintf( stderr
, " flags=%08x", req
->flags
);
1315 static void dump_get_thread_context_reply( const struct get_thread_context_request
*req
)
1317 fprintf( stderr
, " context=" );
1318 cur_pos
+= dump_varargs_context( req
);
1321 static void dump_set_thread_context_request( const struct set_thread_context_request
*req
)
1323 fprintf( stderr
, " handle=%d,", req
->handle
);
1324 fprintf( stderr
, " flags=%08x,", req
->flags
);
1325 fprintf( stderr
, " context=" );
1326 cur_pos
+= dump_varargs_context( req
);
1329 static void dump_get_selector_entry_request( const struct get_selector_entry_request
*req
)
1331 fprintf( stderr
, " handle=%d,", req
->handle
);
1332 fprintf( stderr
, " entry=%d", req
->entry
);
1335 static void dump_get_selector_entry_reply( const struct get_selector_entry_request
*req
)
1337 fprintf( stderr
, " base=%08x,", req
->base
);
1338 fprintf( stderr
, " limit=%08x,", req
->limit
);
1339 fprintf( stderr
, " flags=%02x", req
->flags
);
1342 static void dump_add_atom_request( const struct add_atom_request
*req
)
1344 fprintf( stderr
, " local=%d,", req
->local
);
1345 fprintf( stderr
, " name=" );
1346 cur_pos
+= dump_varargs_unicode_str( req
);
1349 static void dump_add_atom_reply( const struct add_atom_request
*req
)
1351 fprintf( stderr
, " atom=%d", req
->atom
);
1354 static void dump_delete_atom_request( const struct delete_atom_request
*req
)
1356 fprintf( stderr
, " atom=%d,", req
->atom
);
1357 fprintf( stderr
, " local=%d", req
->local
);
1360 static void dump_find_atom_request( const struct find_atom_request
*req
)
1362 fprintf( stderr
, " local=%d,", req
->local
);
1363 fprintf( stderr
, " name=" );
1364 cur_pos
+= dump_varargs_unicode_str( req
);
1367 static void dump_find_atom_reply( const struct find_atom_request
*req
)
1369 fprintf( stderr
, " atom=%d", req
->atom
);
1372 static void dump_get_atom_name_request( const struct get_atom_name_request
*req
)
1374 fprintf( stderr
, " atom=%d,", req
->atom
);
1375 fprintf( stderr
, " local=%d", req
->local
);
1378 static void dump_get_atom_name_reply( const struct get_atom_name_request
*req
)
1380 fprintf( stderr
, " count=%d,", req
->count
);
1381 fprintf( stderr
, " name=" );
1382 cur_pos
+= dump_varargs_unicode_str( req
);
1385 static void dump_init_atom_table_request( const struct init_atom_table_request
*req
)
1387 fprintf( stderr
, " entries=%d", req
->entries
);
1390 static void dump_get_msg_queue_request( const struct get_msg_queue_request
*req
)
1394 static void dump_get_msg_queue_reply( const struct get_msg_queue_request
*req
)
1396 fprintf( stderr
, " handle=%d", req
->handle
);
1399 static void dump_wake_queue_request( const struct wake_queue_request
*req
)
1401 fprintf( stderr
, " handle=%d,", req
->handle
);
1402 fprintf( stderr
, " bits=%08x", req
->bits
);
1405 static void dump_wait_input_idle_request( const struct wait_input_idle_request
*req
)
1407 fprintf( stderr
, " handle=%d,", req
->handle
);
1408 fprintf( stderr
, " timeout=%d", req
->timeout
);
1411 static void dump_wait_input_idle_reply( const struct wait_input_idle_request
*req
)
1413 fprintf( stderr
, " event=%d", req
->event
);
1416 static void dump_create_serial_request( const struct create_serial_request
*req
)
1418 fprintf( stderr
, " access=%08x,", req
->access
);
1419 fprintf( stderr
, " inherit=%d,", req
->inherit
);
1420 fprintf( stderr
, " sharing=%08x,", req
->sharing
);
1421 fprintf( stderr
, " name=" );
1422 cur_pos
+= dump_varargs_string( req
);
1425 static void dump_create_serial_reply( const struct create_serial_request
*req
)
1427 fprintf( stderr
, " handle=%d", req
->handle
);
1430 static void dump_get_serial_info_request( const struct get_serial_info_request
*req
)
1432 fprintf( stderr
, " handle=%d", req
->handle
);
1435 static void dump_get_serial_info_reply( const struct get_serial_info_request
*req
)
1437 fprintf( stderr
, " readinterval=%08x,", req
->readinterval
);
1438 fprintf( stderr
, " readconst=%08x,", req
->readconst
);
1439 fprintf( stderr
, " readmult=%08x,", req
->readmult
);
1440 fprintf( stderr
, " writeconst=%08x,", req
->writeconst
);
1441 fprintf( stderr
, " writemult=%08x,", req
->writemult
);
1442 fprintf( stderr
, " eventmask=%08x,", req
->eventmask
);
1443 fprintf( stderr
, " commerror=%08x", req
->commerror
);
1446 static void dump_set_serial_info_request( const struct set_serial_info_request
*req
)
1448 fprintf( stderr
, " handle=%d,", req
->handle
);
1449 fprintf( stderr
, " flags=%d,", req
->flags
);
1450 fprintf( stderr
, " readinterval=%08x,", req
->readinterval
);
1451 fprintf( stderr
, " readconst=%08x,", req
->readconst
);
1452 fprintf( stderr
, " readmult=%08x,", req
->readmult
);
1453 fprintf( stderr
, " writeconst=%08x,", req
->writeconst
);
1454 fprintf( stderr
, " writemult=%08x,", req
->writemult
);
1455 fprintf( stderr
, " eventmask=%08x,", req
->eventmask
);
1456 fprintf( stderr
, " commerror=%08x", req
->commerror
);
1459 static void dump_create_async_request( const struct create_async_request
*req
)
1461 fprintf( stderr
, " file_handle=%d,", req
->file_handle
);
1462 fprintf( stderr
, " overlapped=%p,", req
->overlapped
);
1463 fprintf( stderr
, " buffer=%p,", req
->buffer
);
1464 fprintf( stderr
, " count=%d,", req
->count
);
1465 fprintf( stderr
, " func=%p,", req
->func
);
1466 fprintf( stderr
, " type=%d", req
->type
);
1469 static void dump_create_async_reply( const struct create_async_request
*req
)
1471 fprintf( stderr
, " ov_handle=%d", req
->ov_handle
);
1474 static void dump_async_result_request( const struct async_result_request
*req
)
1476 fprintf( stderr
, " ov_handle=%d,", req
->ov_handle
);
1477 fprintf( stderr
, " result=%d", req
->result
);
1480 static const dump_func req_dumpers
[REQ_NB_REQUESTS
] = {
1481 (dump_func
)dump_new_process_request
,
1482 (dump_func
)dump_get_new_process_info_request
,
1483 (dump_func
)dump_new_thread_request
,
1484 (dump_func
)dump_boot_done_request
,
1485 (dump_func
)dump_init_process_request
,
1486 (dump_func
)dump_init_process_done_request
,
1487 (dump_func
)dump_init_thread_request
,
1488 (dump_func
)dump_get_thread_buffer_request
,
1489 (dump_func
)dump_terminate_process_request
,
1490 (dump_func
)dump_terminate_thread_request
,
1491 (dump_func
)dump_get_process_info_request
,
1492 (dump_func
)dump_set_process_info_request
,
1493 (dump_func
)dump_get_thread_info_request
,
1494 (dump_func
)dump_set_thread_info_request
,
1495 (dump_func
)dump_suspend_thread_request
,
1496 (dump_func
)dump_resume_thread_request
,
1497 (dump_func
)dump_load_dll_request
,
1498 (dump_func
)dump_unload_dll_request
,
1499 (dump_func
)dump_queue_apc_request
,
1500 (dump_func
)dump_get_apc_request
,
1501 (dump_func
)dump_close_handle_request
,
1502 (dump_func
)dump_set_handle_info_request
,
1503 (dump_func
)dump_dup_handle_request
,
1504 (dump_func
)dump_open_process_request
,
1505 (dump_func
)dump_select_request
,
1506 (dump_func
)dump_create_event_request
,
1507 (dump_func
)dump_event_op_request
,
1508 (dump_func
)dump_open_event_request
,
1509 (dump_func
)dump_create_mutex_request
,
1510 (dump_func
)dump_release_mutex_request
,
1511 (dump_func
)dump_open_mutex_request
,
1512 (dump_func
)dump_create_semaphore_request
,
1513 (dump_func
)dump_release_semaphore_request
,
1514 (dump_func
)dump_open_semaphore_request
,
1515 (dump_func
)dump_create_file_request
,
1516 (dump_func
)dump_alloc_file_handle_request
,
1517 (dump_func
)dump_get_handle_fd_request
,
1518 (dump_func
)dump_set_file_pointer_request
,
1519 (dump_func
)dump_truncate_file_request
,
1520 (dump_func
)dump_set_file_time_request
,
1521 (dump_func
)dump_flush_file_request
,
1522 (dump_func
)dump_get_file_info_request
,
1523 (dump_func
)dump_lock_file_request
,
1524 (dump_func
)dump_unlock_file_request
,
1525 (dump_func
)dump_create_pipe_request
,
1526 (dump_func
)dump_create_socket_request
,
1527 (dump_func
)dump_accept_socket_request
,
1528 (dump_func
)dump_set_socket_event_request
,
1529 (dump_func
)dump_get_socket_event_request
,
1530 (dump_func
)dump_enable_socket_event_request
,
1531 (dump_func
)dump_alloc_console_request
,
1532 (dump_func
)dump_free_console_request
,
1533 (dump_func
)dump_open_console_request
,
1534 (dump_func
)dump_set_console_fd_request
,
1535 (dump_func
)dump_get_console_mode_request
,
1536 (dump_func
)dump_set_console_mode_request
,
1537 (dump_func
)dump_set_console_info_request
,
1538 (dump_func
)dump_get_console_info_request
,
1539 (dump_func
)dump_write_console_input_request
,
1540 (dump_func
)dump_read_console_input_request
,
1541 (dump_func
)dump_create_change_notification_request
,
1542 (dump_func
)dump_create_mapping_request
,
1543 (dump_func
)dump_open_mapping_request
,
1544 (dump_func
)dump_get_mapping_info_request
,
1545 (dump_func
)dump_create_device_request
,
1546 (dump_func
)dump_create_snapshot_request
,
1547 (dump_func
)dump_next_process_request
,
1548 (dump_func
)dump_next_thread_request
,
1549 (dump_func
)dump_next_module_request
,
1550 (dump_func
)dump_wait_debug_event_request
,
1551 (dump_func
)dump_exception_event_request
,
1552 (dump_func
)dump_output_debug_string_request
,
1553 (dump_func
)dump_continue_debug_event_request
,
1554 (dump_func
)dump_debug_process_request
,
1555 (dump_func
)dump_read_process_memory_request
,
1556 (dump_func
)dump_write_process_memory_request
,
1557 (dump_func
)dump_create_key_request
,
1558 (dump_func
)dump_open_key_request
,
1559 (dump_func
)dump_delete_key_request
,
1560 (dump_func
)dump_enum_key_request
,
1561 (dump_func
)dump_set_key_value_request
,
1562 (dump_func
)dump_get_key_value_request
,
1563 (dump_func
)dump_enum_key_value_request
,
1564 (dump_func
)dump_delete_key_value_request
,
1565 (dump_func
)dump_load_registry_request
,
1566 (dump_func
)dump_save_registry_request
,
1567 (dump_func
)dump_save_registry_atexit_request
,
1568 (dump_func
)dump_set_registry_levels_request
,
1569 (dump_func
)dump_create_timer_request
,
1570 (dump_func
)dump_open_timer_request
,
1571 (dump_func
)dump_set_timer_request
,
1572 (dump_func
)dump_cancel_timer_request
,
1573 (dump_func
)dump_get_thread_context_request
,
1574 (dump_func
)dump_set_thread_context_request
,
1575 (dump_func
)dump_get_selector_entry_request
,
1576 (dump_func
)dump_add_atom_request
,
1577 (dump_func
)dump_delete_atom_request
,
1578 (dump_func
)dump_find_atom_request
,
1579 (dump_func
)dump_get_atom_name_request
,
1580 (dump_func
)dump_init_atom_table_request
,
1581 (dump_func
)dump_get_msg_queue_request
,
1582 (dump_func
)dump_wake_queue_request
,
1583 (dump_func
)dump_wait_input_idle_request
,
1584 (dump_func
)dump_create_serial_request
,
1585 (dump_func
)dump_get_serial_info_request
,
1586 (dump_func
)dump_set_serial_info_request
,
1587 (dump_func
)dump_create_async_request
,
1588 (dump_func
)dump_async_result_request
,
1591 static const dump_func reply_dumpers
[REQ_NB_REQUESTS
] = {
1592 (dump_func
)dump_new_process_reply
,
1593 (dump_func
)dump_get_new_process_info_reply
,
1594 (dump_func
)dump_new_thread_reply
,
1596 (dump_func
)dump_init_process_reply
,
1597 (dump_func
)dump_init_process_done_reply
,
1599 (dump_func
)dump_get_thread_buffer_reply
,
1600 (dump_func
)dump_terminate_process_reply
,
1601 (dump_func
)dump_terminate_thread_reply
,
1602 (dump_func
)dump_get_process_info_reply
,
1604 (dump_func
)dump_get_thread_info_reply
,
1606 (dump_func
)dump_suspend_thread_reply
,
1607 (dump_func
)dump_resume_thread_reply
,
1611 (dump_func
)dump_get_apc_reply
,
1612 (dump_func
)dump_close_handle_reply
,
1613 (dump_func
)dump_set_handle_info_reply
,
1614 (dump_func
)dump_dup_handle_reply
,
1615 (dump_func
)dump_open_process_reply
,
1616 (dump_func
)dump_select_reply
,
1617 (dump_func
)dump_create_event_reply
,
1619 (dump_func
)dump_open_event_reply
,
1620 (dump_func
)dump_create_mutex_reply
,
1622 (dump_func
)dump_open_mutex_reply
,
1623 (dump_func
)dump_create_semaphore_reply
,
1624 (dump_func
)dump_release_semaphore_reply
,
1625 (dump_func
)dump_open_semaphore_reply
,
1626 (dump_func
)dump_create_file_reply
,
1627 (dump_func
)dump_alloc_file_handle_reply
,
1628 (dump_func
)dump_get_handle_fd_reply
,
1629 (dump_func
)dump_set_file_pointer_reply
,
1633 (dump_func
)dump_get_file_info_reply
,
1636 (dump_func
)dump_create_pipe_reply
,
1637 (dump_func
)dump_create_socket_reply
,
1638 (dump_func
)dump_accept_socket_reply
,
1640 (dump_func
)dump_get_socket_event_reply
,
1642 (dump_func
)dump_alloc_console_reply
,
1644 (dump_func
)dump_open_console_reply
,
1646 (dump_func
)dump_get_console_mode_reply
,
1649 (dump_func
)dump_get_console_info_reply
,
1650 (dump_func
)dump_write_console_input_reply
,
1651 (dump_func
)dump_read_console_input_reply
,
1652 (dump_func
)dump_create_change_notification_reply
,
1653 (dump_func
)dump_create_mapping_reply
,
1654 (dump_func
)dump_open_mapping_reply
,
1655 (dump_func
)dump_get_mapping_info_reply
,
1656 (dump_func
)dump_create_device_reply
,
1657 (dump_func
)dump_create_snapshot_reply
,
1658 (dump_func
)dump_next_process_reply
,
1659 (dump_func
)dump_next_thread_reply
,
1660 (dump_func
)dump_next_module_reply
,
1661 (dump_func
)dump_wait_debug_event_reply
,
1662 (dump_func
)dump_exception_event_reply
,
1666 (dump_func
)dump_read_process_memory_reply
,
1668 (dump_func
)dump_create_key_reply
,
1669 (dump_func
)dump_open_key_reply
,
1671 (dump_func
)dump_enum_key_reply
,
1673 (dump_func
)dump_get_key_value_reply
,
1674 (dump_func
)dump_enum_key_value_reply
,
1680 (dump_func
)dump_create_timer_reply
,
1681 (dump_func
)dump_open_timer_reply
,
1684 (dump_func
)dump_get_thread_context_reply
,
1686 (dump_func
)dump_get_selector_entry_reply
,
1687 (dump_func
)dump_add_atom_reply
,
1689 (dump_func
)dump_find_atom_reply
,
1690 (dump_func
)dump_get_atom_name_reply
,
1692 (dump_func
)dump_get_msg_queue_reply
,
1694 (dump_func
)dump_wait_input_idle_reply
,
1695 (dump_func
)dump_create_serial_reply
,
1696 (dump_func
)dump_get_serial_info_reply
,
1698 (dump_func
)dump_create_async_reply
,
1702 static const char * const req_names
[REQ_NB_REQUESTS
] = {
1704 "get_new_process_info",
1708 "init_process_done",
1710 "get_thread_buffer",
1711 "terminate_process",
1735 "release_semaphore",
1738 "alloc_file_handle",
1752 "enable_socket_event",
1761 "write_console_input",
1762 "read_console_input",
1763 "create_change_notification",
1774 "output_debug_string",
1775 "continue_debug_event",
1777 "read_process_memory",
1778 "write_process_memory",
1789 "save_registry_atexit",
1790 "set_registry_levels",
1795 "get_thread_context",
1796 "set_thread_context",
1797 "get_selector_entry",
1813 /* ### make_requests end ### */
1814 /* Everything above this line is generated automatically by tools/make_requests */
1816 void trace_request( enum request req
)
1819 current
->last_req
= req
;
1820 if (req
< REQ_NB_REQUESTS
)
1822 fprintf( stderr
, "%08x: %s(", (unsigned int)current
, req_names
[req
] );
1824 req_dumpers
[req
]( current
->buffer
);
1827 fprintf( stderr
, "%08x: %d(", (unsigned int)current
, req
);
1828 if (current
->pass_fd
!= -1) fprintf( stderr
, " ) fd=%d\n", current
->pass_fd
);
1829 else fprintf( stderr
, " )\n" );
1832 void trace_reply( struct thread
*thread
)
1834 fprintf( stderr
, "%08x: %s() = %x",
1835 (unsigned int)thread
, req_names
[thread
->last_req
], thread
->error
);
1836 if (reply_dumpers
[thread
->last_req
])
1838 fprintf( stderr
, " {" );
1840 reply_dumpers
[thread
->last_req
]( thread
->buffer
);
1841 fprintf( stderr
, " }" );
1843 if (thread
->pass_fd
!= -1) fprintf( stderr
, " fd=%d\n", thread
->pass_fd
);
1844 else fprintf( stderr
, "\n" );