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_bytes( const unsigned char *ptr
, int len
)
50 fprintf( stderr
, "%02x", *ptr
++ );
51 if (--len
) fputc( ',', stderr
);
56 static void dump_path_t( const void *req
, const path_t
*path
)
58 const WCHAR
*str
= *path
;
59 size_t len
= get_req_strlenW( req
, str
);
60 fprintf( stderr
, "L\"" );
61 dump_strW( str
, len
, stderr
, "\"\"" );
62 fputc( '\"', stderr
);
65 static void dump_context( const CONTEXT
*context
)
68 fprintf( stderr
, "{flags=%08lx,eax=%08lx,ebx=%08lx,ecx=%08lx,edx=%08lx,esi=%08lx,edi=%08lx,"
69 "ebp=%08lx,eip=%08lx,esp=%08lx,eflags=%08lx,cs=%04lx,ds=%04lx,es=%04lx,"
70 "fs=%04lx,gs=%04lx,dr0=%08lx,dr1=%08lx,dr2=%08lx,dr3=%08lx,dr6=%08lx,dr7=%08lx,",
71 context
->ContextFlags
, context
->Eax
, context
->Ebx
, context
->Ecx
, context
->Edx
,
72 context
->Esi
, context
->Edi
, context
->Ebp
, context
->Eip
, context
->Esp
, context
->EFlags
,
73 context
->SegCs
, context
->SegDs
, context
->SegEs
, context
->SegFs
, context
->SegGs
,
74 context
->Dr0
, context
->Dr1
, context
->Dr2
, context
->Dr3
, context
->Dr6
, context
->Dr7
);
75 fprintf( stderr
, "float=" );
76 dump_uints( (int *)&context
->FloatSave
, sizeof(context
->FloatSave
) / sizeof(int) );
77 fprintf( stderr
, "}" );
79 dump_uints( (int *)context
, sizeof(*context
) / sizeof(int) );
83 static void dump_exc_record( const EXCEPTION_RECORD
*rec
)
86 fprintf( stderr
, "{code=%lx,flags=%lx,rec=%p,addr=%p,params={",
87 rec
->ExceptionCode
, rec
->ExceptionFlags
, rec
->ExceptionRecord
,
88 rec
->ExceptionAddress
);
89 for (i
= 0; i
< min(rec
->NumberParameters
,EXCEPTION_MAXIMUM_PARAMETERS
); i
++)
91 if (i
) fputc( ',', stderr
);
92 fprintf( stderr
, "%lx", rec
->ExceptionInformation
[i
] );
97 static size_t dump_varargs_ints( const void *req
)
99 const int *data
= get_data(req
);
100 size_t len
= get_size(req
) / sizeof(*data
);
102 fputc( '{', stderr
);
105 fprintf( stderr
, "%d", *data
++ );
106 if (--len
) fputc( ',', stderr
);
108 fputc( '}', stderr
);
109 return get_size(req
);
112 static size_t dump_varargs_ptrs( const void *req
)
114 void * const *data
= get_data(req
);
115 size_t len
= get_size(req
) / sizeof(*data
);
117 fputc( '{', stderr
);
120 fprintf( stderr
, "%p", *data
++ );
121 if (--len
) fputc( ',', stderr
);
123 fputc( '}', stderr
);
124 return get_size(req
);
127 static size_t dump_varargs_bytes( const void *req
)
129 const unsigned char *data
= get_data(req
);
130 size_t len
= get_size(req
);
132 fputc( '{', stderr
);
135 fprintf( stderr
, "%02x", *data
++ );
136 if (--len
) fputc( ',', stderr
);
138 fputc( '}', stderr
);
139 return get_size(req
);
142 static size_t dump_varargs_string( const void *req
)
144 fprintf( stderr
, "\"%.*s\"", (int)get_size(req
), (char *)get_data(req
) );
145 return get_size(req
);
148 static size_t dump_varargs_unicode_len_str( const void *req
)
150 const WCHAR
*str
= get_data(req
);
151 int len
= *str
++ + sizeof(WCHAR
);
152 len
= min( len
, get_size(req
) );
153 fprintf( stderr
, "L\"" );
154 if (len
>= sizeof(WCHAR
)) dump_strW( str
, (len
/ sizeof(WCHAR
)) - 1, stderr
, "\"\"" );
155 fputc( '\"', stderr
);
159 static size_t dump_varargs_unicode_str( const void *req
)
161 fprintf( stderr
, "L\"" );
162 dump_strW( get_data(req
), get_size(req
) / sizeof(WCHAR
), stderr
, "\"\"" );
163 fputc( '\"', stderr
);
164 return get_size(req
);
167 static size_t dump_varargs_context( const void *req
)
169 dump_context( get_data(req
) );
170 return get_size(req
);
173 static size_t dump_varargs_exc_event( const void *req
)
175 const CONTEXT
*ptr
= get_data(req
);
176 fprintf( stderr
, "{context=" );
178 fprintf( stderr
, ",rec=" );
179 dump_exc_record( (EXCEPTION_RECORD
*)(ptr
+ 1) );
180 fputc( '}', stderr
);
181 return get_size(req
);
184 static size_t dump_varargs_debug_event( const void *req
)
186 const debug_event_t
*event
= get_data(req
);
190 fprintf( stderr
, "{}" );
195 case EXCEPTION_DEBUG_EVENT
:
196 fprintf( stderr
, "{exception," );
197 dump_exc_record( &event
->info
.exception
.record
);
198 fprintf( stderr
, ",first=%d}", event
->info
.exception
.first
);
200 case CREATE_THREAD_DEBUG_EVENT
:
201 fprintf( stderr
, "{create_thread,thread=%d,teb=%p,start=%p}",
202 event
->info
.create_thread
.handle
, event
->info
.create_thread
.teb
,
203 event
->info
.create_thread
.start
);
205 case CREATE_PROCESS_DEBUG_EVENT
:
206 fprintf( stderr
, "{create_process,file=%d,process=%d,thread=%d,base=%p,offset=%d,"
207 "size=%d,teb=%p,start=%p,name=%p,unicode=%d}",
208 event
->info
.create_process
.file
, event
->info
.create_process
.process
,
209 event
->info
.create_process
.thread
, event
->info
.create_process
.base
,
210 event
->info
.create_process
.dbg_offset
, event
->info
.create_process
.dbg_size
,
211 event
->info
.create_process
.teb
, event
->info
.create_process
.start
,
212 event
->info
.create_process
.name
, event
->info
.create_process
.unicode
);
214 case EXIT_THREAD_DEBUG_EVENT
:
215 fprintf( stderr
, "{exit_thread,code=%d}", event
->info
.exit
.exit_code
);
217 case EXIT_PROCESS_DEBUG_EVENT
:
218 fprintf( stderr
, "{exit_process,code=%d}", event
->info
.exit
.exit_code
);
220 case LOAD_DLL_DEBUG_EVENT
:
221 fprintf( stderr
, "{load_dll,file=%d,base=%p,offset=%d,size=%d,name=%p,unicode=%d}",
222 event
->info
.load_dll
.handle
, event
->info
.load_dll
.base
,
223 event
->info
.load_dll
.dbg_offset
, event
->info
.load_dll
.dbg_size
,
224 event
->info
.load_dll
.name
, event
->info
.load_dll
.unicode
);
226 case UNLOAD_DLL_DEBUG_EVENT
:
227 fprintf( stderr
, "{unload_dll,base=%p}", event
->info
.unload_dll
.base
);
229 case OUTPUT_DEBUG_STRING_EVENT
:
230 fprintf( stderr
, "{output_string,data=%p,unicode=%d,len=%d}",
231 event
->info
.output_string
.string
, event
->info
.output_string
.unicode
,
232 event
->info
.output_string
.length
);
235 fprintf( stderr
, "{rip,err=%d,type=%d}",
236 event
->info
.rip_info
.error
, event
->info
.rip_info
.type
);
238 case 0: /* zero is the code returned on timeouts */
239 fprintf( stderr
, "{}" );
242 fprintf( stderr
, "{code=??? (%d)}", event
->code
);
245 return get_size(req
);
248 static size_t dump_varargs_input_records( const void *req
)
250 const INPUT_RECORD
*rec
= get_data(req
);
251 size_t len
= get_size(req
) / sizeof(*rec
);
253 fputc( '{', stderr
);
256 fprintf( stderr
, "{%04x,...}", rec
->EventType
);
258 if (--len
) fputc( ',', stderr
);
260 fputc( '}', stderr
);
261 return get_size(req
);
264 /* dumping for functions for requests that have a variable part */
266 static void dump_varargs_enum_key_value_reply( const struct enum_key_value_request
*req
)
268 int count
= min( req
->len
- req
->offset
, get_req_size( req
, req
->data
, 1 ));
269 dump_bytes( req
->data
, count
);
272 typedef void (*dump_func
)( const void *req
);
274 /* Everything below this line is generated automatically by tools/make_requests */
275 /* ### make_requests begin ### */
277 static void dump_new_process_request( const struct new_process_request
*req
)
279 fprintf( stderr
, " inherit_all=%d,", req
->inherit_all
);
280 fprintf( stderr
, " create_flags=%d,", req
->create_flags
);
281 fprintf( stderr
, " start_flags=%d,", req
->start_flags
);
282 fprintf( stderr
, " exe_file=%d,", req
->exe_file
);
283 fprintf( stderr
, " hstdin=%d,", req
->hstdin
);
284 fprintf( stderr
, " hstdout=%d,", req
->hstdout
);
285 fprintf( stderr
, " hstderr=%d,", req
->hstderr
);
286 fprintf( stderr
, " cmd_show=%d,", req
->cmd_show
);
287 fprintf( stderr
, " alloc_fd=%d,", req
->alloc_fd
);
288 fprintf( stderr
, " filename=" );
289 cur_pos
+= dump_varargs_string( req
);
292 static void dump_wait_process_request( const struct wait_process_request
*req
)
294 fprintf( stderr
, " pinherit=%d,", req
->pinherit
);
295 fprintf( stderr
, " tinherit=%d,", req
->tinherit
);
296 fprintf( stderr
, " timeout=%d,", req
->timeout
);
297 fprintf( stderr
, " cancel=%d", req
->cancel
);
300 static void dump_wait_process_reply( const struct wait_process_request
*req
)
302 fprintf( stderr
, " pid=%p,", req
->pid
);
303 fprintf( stderr
, " phandle=%d,", req
->phandle
);
304 fprintf( stderr
, " tid=%p,", req
->tid
);
305 fprintf( stderr
, " thandle=%d,", req
->thandle
);
306 fprintf( stderr
, " event=%d", req
->event
);
309 static void dump_new_thread_request( const struct new_thread_request
*req
)
311 fprintf( stderr
, " suspend=%d,", req
->suspend
);
312 fprintf( stderr
, " inherit=%d", req
->inherit
);
315 static void dump_new_thread_reply( const struct new_thread_request
*req
)
317 fprintf( stderr
, " tid=%p,", req
->tid
);
318 fprintf( stderr
, " handle=%d", req
->handle
);
321 static void dump_boot_done_request( const struct boot_done_request
*req
)
323 fprintf( stderr
, " debug_level=%d", req
->debug_level
);
326 static void dump_init_process_request( const struct init_process_request
*req
)
328 fprintf( stderr
, " ldt_copy=%p,", req
->ldt_copy
);
329 fprintf( stderr
, " ppid=%d", req
->ppid
);
332 static void dump_init_process_reply( const struct init_process_request
*req
)
334 fprintf( stderr
, " start_flags=%d,", req
->start_flags
);
335 fprintf( stderr
, " server_start=%08x,", req
->server_start
);
336 fprintf( stderr
, " exe_file=%d,", req
->exe_file
);
337 fprintf( stderr
, " hstdin=%d,", req
->hstdin
);
338 fprintf( stderr
, " hstdout=%d,", req
->hstdout
);
339 fprintf( stderr
, " hstderr=%d,", req
->hstderr
);
340 fprintf( stderr
, " cmd_show=%d,", req
->cmd_show
);
341 fprintf( stderr
, " filename=" );
342 cur_pos
+= dump_varargs_string( req
);
345 static void dump_init_process_done_request( const struct init_process_done_request
*req
)
347 fprintf( stderr
, " module=%p,", req
->module
);
348 fprintf( stderr
, " entry=%p,", req
->entry
);
349 fprintf( stderr
, " name=%p,", req
->name
);
350 fprintf( stderr
, " gui=%d", req
->gui
);
353 static void dump_init_process_done_reply( const struct init_process_done_request
*req
)
355 fprintf( stderr
, " debugged=%d", req
->debugged
);
358 static void dump_init_thread_request( const struct init_thread_request
*req
)
360 fprintf( stderr
, " unix_pid=%d,", req
->unix_pid
);
361 fprintf( stderr
, " teb=%p,", req
->teb
);
362 fprintf( stderr
, " entry=%p", req
->entry
);
365 static void dump_get_thread_buffer_request( const struct get_thread_buffer_request
*req
)
369 static void dump_get_thread_buffer_reply( const struct get_thread_buffer_request
*req
)
371 fprintf( stderr
, " pid=%p,", req
->pid
);
372 fprintf( stderr
, " tid=%p,", req
->tid
);
373 fprintf( stderr
, " boot=%d,", req
->boot
);
374 fprintf( stderr
, " version=%d", req
->version
);
377 static void dump_terminate_process_request( const struct terminate_process_request
*req
)
379 fprintf( stderr
, " handle=%d,", req
->handle
);
380 fprintf( stderr
, " exit_code=%d", req
->exit_code
);
383 static void dump_terminate_process_reply( const struct terminate_process_request
*req
)
385 fprintf( stderr
, " self=%d", req
->self
);
388 static void dump_terminate_thread_request( const struct terminate_thread_request
*req
)
390 fprintf( stderr
, " handle=%d,", req
->handle
);
391 fprintf( stderr
, " exit_code=%d", req
->exit_code
);
394 static void dump_terminate_thread_reply( const struct terminate_thread_request
*req
)
396 fprintf( stderr
, " self=%d,", req
->self
);
397 fprintf( stderr
, " last=%d", req
->last
);
400 static void dump_get_process_info_request( const struct get_process_info_request
*req
)
402 fprintf( stderr
, " handle=%d", req
->handle
);
405 static void dump_get_process_info_reply( const struct get_process_info_request
*req
)
407 fprintf( stderr
, " pid=%p,", req
->pid
);
408 fprintf( stderr
, " debugged=%d,", req
->debugged
);
409 fprintf( stderr
, " exit_code=%d,", req
->exit_code
);
410 fprintf( stderr
, " priority=%d,", req
->priority
);
411 fprintf( stderr
, " process_affinity=%d,", req
->process_affinity
);
412 fprintf( stderr
, " system_affinity=%d", req
->system_affinity
);
415 static void dump_set_process_info_request( const struct set_process_info_request
*req
)
417 fprintf( stderr
, " handle=%d,", req
->handle
);
418 fprintf( stderr
, " mask=%d,", req
->mask
);
419 fprintf( stderr
, " priority=%d,", req
->priority
);
420 fprintf( stderr
, " affinity=%d", req
->affinity
);
423 static void dump_get_thread_info_request( const struct get_thread_info_request
*req
)
425 fprintf( stderr
, " handle=%d,", req
->handle
);
426 fprintf( stderr
, " tid_in=%p", req
->tid_in
);
429 static void dump_get_thread_info_reply( const struct get_thread_info_request
*req
)
431 fprintf( stderr
, " tid=%p,", req
->tid
);
432 fprintf( stderr
, " teb=%p,", req
->teb
);
433 fprintf( stderr
, " exit_code=%d,", req
->exit_code
);
434 fprintf( stderr
, " priority=%d", req
->priority
);
437 static void dump_set_thread_info_request( const struct set_thread_info_request
*req
)
439 fprintf( stderr
, " handle=%d,", req
->handle
);
440 fprintf( stderr
, " mask=%d,", req
->mask
);
441 fprintf( stderr
, " priority=%d,", req
->priority
);
442 fprintf( stderr
, " affinity=%d", req
->affinity
);
445 static void dump_suspend_thread_request( const struct suspend_thread_request
*req
)
447 fprintf( stderr
, " handle=%d", req
->handle
);
450 static void dump_suspend_thread_reply( const struct suspend_thread_request
*req
)
452 fprintf( stderr
, " count=%d", req
->count
);
455 static void dump_resume_thread_request( const struct resume_thread_request
*req
)
457 fprintf( stderr
, " handle=%d", req
->handle
);
460 static void dump_resume_thread_reply( const struct resume_thread_request
*req
)
462 fprintf( stderr
, " count=%d", req
->count
);
465 static void dump_load_dll_request( const struct load_dll_request
*req
)
467 fprintf( stderr
, " handle=%d,", req
->handle
);
468 fprintf( stderr
, " base=%p,", req
->base
);
469 fprintf( stderr
, " dbg_offset=%d,", req
->dbg_offset
);
470 fprintf( stderr
, " dbg_size=%d,", req
->dbg_size
);
471 fprintf( stderr
, " name=%p", req
->name
);
474 static void dump_unload_dll_request( const struct unload_dll_request
*req
)
476 fprintf( stderr
, " base=%p", req
->base
);
479 static void dump_queue_apc_request( const struct queue_apc_request
*req
)
481 fprintf( stderr
, " handle=%d,", req
->handle
);
482 fprintf( stderr
, " func=%p,", req
->func
);
483 fprintf( stderr
, " param=%p", req
->param
);
486 static void dump_get_apc_request( const struct get_apc_request
*req
)
490 static void dump_get_apc_reply( const struct get_apc_request
*req
)
492 fprintf( stderr
, " func=%p,", req
->func
);
493 fprintf( stderr
, " type=%d,", req
->type
);
494 fprintf( stderr
, " args=" );
495 cur_pos
+= dump_varargs_ptrs( req
);
498 static void dump_close_handle_request( const struct close_handle_request
*req
)
500 fprintf( stderr
, " handle=%d", req
->handle
);
503 static void dump_get_handle_info_request( const struct get_handle_info_request
*req
)
505 fprintf( stderr
, " handle=%d", req
->handle
);
508 static void dump_get_handle_info_reply( const struct get_handle_info_request
*req
)
510 fprintf( stderr
, " flags=%d", req
->flags
);
513 static void dump_set_handle_info_request( const struct set_handle_info_request
*req
)
515 fprintf( stderr
, " handle=%d,", req
->handle
);
516 fprintf( stderr
, " flags=%d,", req
->flags
);
517 fprintf( stderr
, " mask=%d", req
->mask
);
520 static void dump_dup_handle_request( const struct dup_handle_request
*req
)
522 fprintf( stderr
, " src_process=%d,", req
->src_process
);
523 fprintf( stderr
, " src_handle=%d,", req
->src_handle
);
524 fprintf( stderr
, " dst_process=%d,", req
->dst_process
);
525 fprintf( stderr
, " access=%08x,", req
->access
);
526 fprintf( stderr
, " inherit=%d,", req
->inherit
);
527 fprintf( stderr
, " options=%d", req
->options
);
530 static void dump_dup_handle_reply( const struct dup_handle_request
*req
)
532 fprintf( stderr
, " handle=%d", req
->handle
);
535 static void dump_open_process_request( const struct open_process_request
*req
)
537 fprintf( stderr
, " pid=%p,", req
->pid
);
538 fprintf( stderr
, " access=%08x,", req
->access
);
539 fprintf( stderr
, " inherit=%d", req
->inherit
);
542 static void dump_open_process_reply( const struct open_process_request
*req
)
544 fprintf( stderr
, " handle=%d", req
->handle
);
547 static void dump_select_request( const struct select_request
*req
)
549 fprintf( stderr
, " flags=%d,", req
->flags
);
550 fprintf( stderr
, " timeout=%d,", req
->timeout
);
551 fprintf( stderr
, " handles=" );
552 cur_pos
+= dump_varargs_ints( req
);
555 static void dump_select_reply( const struct select_request
*req
)
557 fprintf( stderr
, " signaled=%d", req
->signaled
);
560 static void dump_create_event_request( const struct create_event_request
*req
)
562 fprintf( stderr
, " manual_reset=%d,", req
->manual_reset
);
563 fprintf( stderr
, " initial_state=%d,", req
->initial_state
);
564 fprintf( stderr
, " inherit=%d,", req
->inherit
);
565 fprintf( stderr
, " name=" );
566 cur_pos
+= dump_varargs_unicode_str( req
);
569 static void dump_create_event_reply( const struct create_event_request
*req
)
571 fprintf( stderr
, " handle=%d", req
->handle
);
574 static void dump_event_op_request( const struct event_op_request
*req
)
576 fprintf( stderr
, " handle=%d,", req
->handle
);
577 fprintf( stderr
, " op=%d", req
->op
);
580 static void dump_open_event_request( const struct open_event_request
*req
)
582 fprintf( stderr
, " access=%08x,", req
->access
);
583 fprintf( stderr
, " inherit=%d,", req
->inherit
);
584 fprintf( stderr
, " name=" );
585 cur_pos
+= dump_varargs_unicode_str( req
);
588 static void dump_open_event_reply( const struct open_event_request
*req
)
590 fprintf( stderr
, " handle=%d", req
->handle
);
593 static void dump_create_mutex_request( const struct create_mutex_request
*req
)
595 fprintf( stderr
, " owned=%d,", req
->owned
);
596 fprintf( stderr
, " inherit=%d,", req
->inherit
);
597 fprintf( stderr
, " name=" );
598 cur_pos
+= dump_varargs_unicode_str( req
);
601 static void dump_create_mutex_reply( const struct create_mutex_request
*req
)
603 fprintf( stderr
, " handle=%d", req
->handle
);
606 static void dump_release_mutex_request( const struct release_mutex_request
*req
)
608 fprintf( stderr
, " handle=%d", req
->handle
);
611 static void dump_open_mutex_request( const struct open_mutex_request
*req
)
613 fprintf( stderr
, " access=%08x,", req
->access
);
614 fprintf( stderr
, " inherit=%d,", req
->inherit
);
615 fprintf( stderr
, " name=" );
616 cur_pos
+= dump_varargs_unicode_str( req
);
619 static void dump_open_mutex_reply( const struct open_mutex_request
*req
)
621 fprintf( stderr
, " handle=%d", req
->handle
);
624 static void dump_create_semaphore_request( const struct create_semaphore_request
*req
)
626 fprintf( stderr
, " initial=%08x,", req
->initial
);
627 fprintf( stderr
, " max=%08x,", req
->max
);
628 fprintf( stderr
, " inherit=%d,", req
->inherit
);
629 fprintf( stderr
, " name=" );
630 cur_pos
+= dump_varargs_unicode_str( req
);
633 static void dump_create_semaphore_reply( const struct create_semaphore_request
*req
)
635 fprintf( stderr
, " handle=%d", req
->handle
);
638 static void dump_release_semaphore_request( const struct release_semaphore_request
*req
)
640 fprintf( stderr
, " handle=%d,", req
->handle
);
641 fprintf( stderr
, " count=%08x", req
->count
);
644 static void dump_release_semaphore_reply( const struct release_semaphore_request
*req
)
646 fprintf( stderr
, " prev_count=%08x", req
->prev_count
);
649 static void dump_open_semaphore_request( const struct open_semaphore_request
*req
)
651 fprintf( stderr
, " access=%08x,", req
->access
);
652 fprintf( stderr
, " inherit=%d,", req
->inherit
);
653 fprintf( stderr
, " name=" );
654 cur_pos
+= dump_varargs_unicode_str( req
);
657 static void dump_open_semaphore_reply( const struct open_semaphore_request
*req
)
659 fprintf( stderr
, " handle=%d", req
->handle
);
662 static void dump_create_file_request( const struct create_file_request
*req
)
664 fprintf( stderr
, " access=%08x,", req
->access
);
665 fprintf( stderr
, " inherit=%d,", req
->inherit
);
666 fprintf( stderr
, " sharing=%08x,", req
->sharing
);
667 fprintf( stderr
, " create=%d,", req
->create
);
668 fprintf( stderr
, " attrs=%08x,", req
->attrs
);
669 fprintf( stderr
, " filename=" );
670 cur_pos
+= dump_varargs_string( req
);
673 static void dump_create_file_reply( const struct create_file_request
*req
)
675 fprintf( stderr
, " handle=%d", req
->handle
);
678 static void dump_alloc_file_handle_request( const struct alloc_file_handle_request
*req
)
680 fprintf( stderr
, " access=%08x", req
->access
);
683 static void dump_alloc_file_handle_reply( const struct alloc_file_handle_request
*req
)
685 fprintf( stderr
, " handle=%d", req
->handle
);
688 static void dump_get_read_fd_request( const struct get_read_fd_request
*req
)
690 fprintf( stderr
, " handle=%d", req
->handle
);
693 static void dump_get_write_fd_request( const struct get_write_fd_request
*req
)
695 fprintf( stderr
, " handle=%d", req
->handle
);
698 static void dump_set_file_pointer_request( const struct set_file_pointer_request
*req
)
700 fprintf( stderr
, " handle=%d,", req
->handle
);
701 fprintf( stderr
, " low=%d,", req
->low
);
702 fprintf( stderr
, " high=%d,", req
->high
);
703 fprintf( stderr
, " whence=%d", req
->whence
);
706 static void dump_set_file_pointer_reply( const struct set_file_pointer_request
*req
)
708 fprintf( stderr
, " new_low=%d,", req
->new_low
);
709 fprintf( stderr
, " new_high=%d", req
->new_high
);
712 static void dump_truncate_file_request( const struct truncate_file_request
*req
)
714 fprintf( stderr
, " handle=%d", req
->handle
);
717 static void dump_set_file_time_request( const struct set_file_time_request
*req
)
719 fprintf( stderr
, " handle=%d,", req
->handle
);
720 fprintf( stderr
, " access_time=%ld,", req
->access_time
);
721 fprintf( stderr
, " write_time=%ld", req
->write_time
);
724 static void dump_flush_file_request( const struct flush_file_request
*req
)
726 fprintf( stderr
, " handle=%d", req
->handle
);
729 static void dump_get_file_info_request( const struct get_file_info_request
*req
)
731 fprintf( stderr
, " handle=%d", req
->handle
);
734 static void dump_get_file_info_reply( const struct get_file_info_request
*req
)
736 fprintf( stderr
, " type=%d,", req
->type
);
737 fprintf( stderr
, " attr=%d,", req
->attr
);
738 fprintf( stderr
, " access_time=%ld,", req
->access_time
);
739 fprintf( stderr
, " write_time=%ld,", req
->write_time
);
740 fprintf( stderr
, " size_high=%d,", req
->size_high
);
741 fprintf( stderr
, " size_low=%d,", req
->size_low
);
742 fprintf( stderr
, " links=%d,", req
->links
);
743 fprintf( stderr
, " index_high=%d,", req
->index_high
);
744 fprintf( stderr
, " index_low=%d,", req
->index_low
);
745 fprintf( stderr
, " serial=%08x", req
->serial
);
748 static void dump_lock_file_request( const struct lock_file_request
*req
)
750 fprintf( stderr
, " handle=%d,", req
->handle
);
751 fprintf( stderr
, " offset_low=%08x,", req
->offset_low
);
752 fprintf( stderr
, " offset_high=%08x,", req
->offset_high
);
753 fprintf( stderr
, " count_low=%08x,", req
->count_low
);
754 fprintf( stderr
, " count_high=%08x", req
->count_high
);
757 static void dump_unlock_file_request( const struct unlock_file_request
*req
)
759 fprintf( stderr
, " handle=%d,", req
->handle
);
760 fprintf( stderr
, " offset_low=%08x,", req
->offset_low
);
761 fprintf( stderr
, " offset_high=%08x,", req
->offset_high
);
762 fprintf( stderr
, " count_low=%08x,", req
->count_low
);
763 fprintf( stderr
, " count_high=%08x", req
->count_high
);
766 static void dump_create_pipe_request( const struct create_pipe_request
*req
)
768 fprintf( stderr
, " inherit=%d", req
->inherit
);
771 static void dump_create_pipe_reply( const struct create_pipe_request
*req
)
773 fprintf( stderr
, " handle_read=%d,", req
->handle_read
);
774 fprintf( stderr
, " handle_write=%d", req
->handle_write
);
777 static void dump_create_socket_request( const struct create_socket_request
*req
)
779 fprintf( stderr
, " access=%08x,", req
->access
);
780 fprintf( stderr
, " inherit=%d,", req
->inherit
);
781 fprintf( stderr
, " family=%d,", req
->family
);
782 fprintf( stderr
, " type=%d,", req
->type
);
783 fprintf( stderr
, " protocol=%d", req
->protocol
);
786 static void dump_create_socket_reply( const struct create_socket_request
*req
)
788 fprintf( stderr
, " handle=%d", req
->handle
);
791 static void dump_accept_socket_request( const struct accept_socket_request
*req
)
793 fprintf( stderr
, " lhandle=%d,", req
->lhandle
);
794 fprintf( stderr
, " access=%08x,", req
->access
);
795 fprintf( stderr
, " inherit=%d", req
->inherit
);
798 static void dump_accept_socket_reply( const struct accept_socket_request
*req
)
800 fprintf( stderr
, " handle=%d", req
->handle
);
803 static void dump_set_socket_event_request( const struct set_socket_event_request
*req
)
805 fprintf( stderr
, " handle=%d,", req
->handle
);
806 fprintf( stderr
, " mask=%08x,", req
->mask
);
807 fprintf( stderr
, " event=%d", req
->event
);
810 static void dump_get_socket_event_request( const struct get_socket_event_request
*req
)
812 fprintf( stderr
, " handle=%d,", req
->handle
);
813 fprintf( stderr
, " service=%d,", req
->service
);
814 fprintf( stderr
, " s_event=%d,", req
->s_event
);
815 fprintf( stderr
, " c_event=%d", req
->c_event
);
818 static void dump_get_socket_event_reply( const struct get_socket_event_request
*req
)
820 fprintf( stderr
, " mask=%08x,", req
->mask
);
821 fprintf( stderr
, " pmask=%08x,", req
->pmask
);
822 fprintf( stderr
, " state=%08x,", req
->state
);
823 fprintf( stderr
, " errors=" );
824 cur_pos
+= dump_varargs_ints( req
);
827 static void dump_enable_socket_event_request( const struct enable_socket_event_request
*req
)
829 fprintf( stderr
, " handle=%d,", req
->handle
);
830 fprintf( stderr
, " mask=%08x,", req
->mask
);
831 fprintf( stderr
, " sstate=%08x,", req
->sstate
);
832 fprintf( stderr
, " cstate=%08x", req
->cstate
);
835 static void dump_alloc_console_request( const struct alloc_console_request
*req
)
837 fprintf( stderr
, " access=%08x,", req
->access
);
838 fprintf( stderr
, " inherit=%d", req
->inherit
);
841 static void dump_alloc_console_reply( const struct alloc_console_request
*req
)
843 fprintf( stderr
, " handle_in=%d,", req
->handle_in
);
844 fprintf( stderr
, " handle_out=%d", req
->handle_out
);
847 static void dump_free_console_request( const struct free_console_request
*req
)
851 static void dump_open_console_request( const struct open_console_request
*req
)
853 fprintf( stderr
, " output=%d,", req
->output
);
854 fprintf( stderr
, " access=%08x,", req
->access
);
855 fprintf( stderr
, " inherit=%d", req
->inherit
);
858 static void dump_open_console_reply( const struct open_console_request
*req
)
860 fprintf( stderr
, " handle=%d", req
->handle
);
863 static void dump_set_console_fd_request( const struct set_console_fd_request
*req
)
865 fprintf( stderr
, " handle=%d,", req
->handle
);
866 fprintf( stderr
, " file_handle=%d,", req
->file_handle
);
867 fprintf( stderr
, " pid=%d", req
->pid
);
870 static void dump_get_console_mode_request( const struct get_console_mode_request
*req
)
872 fprintf( stderr
, " handle=%d", req
->handle
);
875 static void dump_get_console_mode_reply( const struct get_console_mode_request
*req
)
877 fprintf( stderr
, " mode=%d", req
->mode
);
880 static void dump_set_console_mode_request( const struct set_console_mode_request
*req
)
882 fprintf( stderr
, " handle=%d,", req
->handle
);
883 fprintf( stderr
, " mode=%d", req
->mode
);
886 static void dump_set_console_info_request( const struct set_console_info_request
*req
)
888 fprintf( stderr
, " handle=%d,", req
->handle
);
889 fprintf( stderr
, " mask=%d,", req
->mask
);
890 fprintf( stderr
, " cursor_size=%d,", req
->cursor_size
);
891 fprintf( stderr
, " cursor_visible=%d,", req
->cursor_visible
);
892 fprintf( stderr
, " title=" );
893 cur_pos
+= dump_varargs_string( req
);
896 static void dump_get_console_info_request( const struct get_console_info_request
*req
)
898 fprintf( stderr
, " handle=%d", req
->handle
);
901 static void dump_get_console_info_reply( const struct get_console_info_request
*req
)
903 fprintf( stderr
, " cursor_size=%d,", req
->cursor_size
);
904 fprintf( stderr
, " cursor_visible=%d,", req
->cursor_visible
);
905 fprintf( stderr
, " pid=%d,", req
->pid
);
906 fprintf( stderr
, " title=" );
907 cur_pos
+= dump_varargs_string( req
);
910 static void dump_write_console_input_request( const struct write_console_input_request
*req
)
912 fprintf( stderr
, " handle=%d,", req
->handle
);
913 fprintf( stderr
, " rec=" );
914 cur_pos
+= dump_varargs_input_records( req
);
917 static void dump_write_console_input_reply( const struct write_console_input_request
*req
)
919 fprintf( stderr
, " written=%d", req
->written
);
922 static void dump_read_console_input_request( const struct read_console_input_request
*req
)
924 fprintf( stderr
, " handle=%d,", req
->handle
);
925 fprintf( stderr
, " flush=%d", req
->flush
);
928 static void dump_read_console_input_reply( const struct read_console_input_request
*req
)
930 fprintf( stderr
, " read=%d,", req
->read
);
931 fprintf( stderr
, " rec=" );
932 cur_pos
+= dump_varargs_input_records( req
);
935 static void dump_create_change_notification_request( const struct create_change_notification_request
*req
)
937 fprintf( stderr
, " subtree=%d,", req
->subtree
);
938 fprintf( stderr
, " filter=%d", req
->filter
);
941 static void dump_create_change_notification_reply( const struct create_change_notification_request
*req
)
943 fprintf( stderr
, " handle=%d", req
->handle
);
946 static void dump_create_mapping_request( const struct create_mapping_request
*req
)
948 fprintf( stderr
, " size_high=%d,", req
->size_high
);
949 fprintf( stderr
, " size_low=%d,", req
->size_low
);
950 fprintf( stderr
, " protect=%d,", req
->protect
);
951 fprintf( stderr
, " inherit=%d,", req
->inherit
);
952 fprintf( stderr
, " file_handle=%d,", req
->file_handle
);
953 fprintf( stderr
, " name=" );
954 cur_pos
+= dump_varargs_unicode_str( req
);
957 static void dump_create_mapping_reply( const struct create_mapping_request
*req
)
959 fprintf( stderr
, " handle=%d", req
->handle
);
962 static void dump_open_mapping_request( const struct open_mapping_request
*req
)
964 fprintf( stderr
, " access=%08x,", req
->access
);
965 fprintf( stderr
, " inherit=%d,", req
->inherit
);
966 fprintf( stderr
, " name=" );
967 cur_pos
+= dump_varargs_unicode_str( req
);
970 static void dump_open_mapping_reply( const struct open_mapping_request
*req
)
972 fprintf( stderr
, " handle=%d", req
->handle
);
975 static void dump_get_mapping_info_request( const struct get_mapping_info_request
*req
)
977 fprintf( stderr
, " handle=%d", req
->handle
);
980 static void dump_get_mapping_info_reply( const struct get_mapping_info_request
*req
)
982 fprintf( stderr
, " size_high=%d,", req
->size_high
);
983 fprintf( stderr
, " size_low=%d,", req
->size_low
);
984 fprintf( stderr
, " protect=%d,", req
->protect
);
985 fprintf( stderr
, " header_size=%d,", req
->header_size
);
986 fprintf( stderr
, " base=%p,", req
->base
);
987 fprintf( stderr
, " shared_file=%d,", req
->shared_file
);
988 fprintf( stderr
, " shared_size=%d", req
->shared_size
);
991 static void dump_create_device_request( const struct create_device_request
*req
)
993 fprintf( stderr
, " access=%08x,", req
->access
);
994 fprintf( stderr
, " inherit=%d,", req
->inherit
);
995 fprintf( stderr
, " id=%d", req
->id
);
998 static void dump_create_device_reply( const struct create_device_request
*req
)
1000 fprintf( stderr
, " handle=%d", req
->handle
);
1003 static void dump_create_snapshot_request( const struct create_snapshot_request
*req
)
1005 fprintf( stderr
, " inherit=%d,", req
->inherit
);
1006 fprintf( stderr
, " flags=%d,", req
->flags
);
1007 fprintf( stderr
, " pid=%p", req
->pid
);
1010 static void dump_create_snapshot_reply( const struct create_snapshot_request
*req
)
1012 fprintf( stderr
, " handle=%d", req
->handle
);
1015 static void dump_next_process_request( const struct next_process_request
*req
)
1017 fprintf( stderr
, " handle=%d,", req
->handle
);
1018 fprintf( stderr
, " reset=%d", req
->reset
);
1021 static void dump_next_process_reply( const struct next_process_request
*req
)
1023 fprintf( stderr
, " count=%d,", req
->count
);
1024 fprintf( stderr
, " pid=%p,", req
->pid
);
1025 fprintf( stderr
, " threads=%d,", req
->threads
);
1026 fprintf( stderr
, " priority=%d", req
->priority
);
1029 static void dump_next_thread_request( const struct next_thread_request
*req
)
1031 fprintf( stderr
, " handle=%d,", req
->handle
);
1032 fprintf( stderr
, " reset=%d", req
->reset
);
1035 static void dump_next_thread_reply( const struct next_thread_request
*req
)
1037 fprintf( stderr
, " count=%d,", req
->count
);
1038 fprintf( stderr
, " pid=%p,", req
->pid
);
1039 fprintf( stderr
, " tid=%p,", req
->tid
);
1040 fprintf( stderr
, " base_pri=%d,", req
->base_pri
);
1041 fprintf( stderr
, " delta_pri=%d", req
->delta_pri
);
1044 static void dump_next_module_request( const struct next_module_request
*req
)
1046 fprintf( stderr
, " handle=%d,", req
->handle
);
1047 fprintf( stderr
, " reset=%d", req
->reset
);
1050 static void dump_next_module_reply( const struct next_module_request
*req
)
1052 fprintf( stderr
, " pid=%p,", req
->pid
);
1053 fprintf( stderr
, " base=%p", req
->base
);
1056 static void dump_wait_debug_event_request( const struct wait_debug_event_request
*req
)
1058 fprintf( stderr
, " timeout=%d", req
->timeout
);
1061 static void dump_wait_debug_event_reply( const struct wait_debug_event_request
*req
)
1063 fprintf( stderr
, " pid=%p,", req
->pid
);
1064 fprintf( stderr
, " tid=%p,", req
->tid
);
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 dump_path_t( req
, &req
->name
);
1228 fprintf( stderr
, "," );
1229 fprintf( stderr
, " data=" );
1230 dump_varargs_enum_key_value_reply( 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_wait_process_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_get_handle_info_request
,
1503 (dump_func
)dump_set_handle_info_request
,
1504 (dump_func
)dump_dup_handle_request
,
1505 (dump_func
)dump_open_process_request
,
1506 (dump_func
)dump_select_request
,
1507 (dump_func
)dump_create_event_request
,
1508 (dump_func
)dump_event_op_request
,
1509 (dump_func
)dump_open_event_request
,
1510 (dump_func
)dump_create_mutex_request
,
1511 (dump_func
)dump_release_mutex_request
,
1512 (dump_func
)dump_open_mutex_request
,
1513 (dump_func
)dump_create_semaphore_request
,
1514 (dump_func
)dump_release_semaphore_request
,
1515 (dump_func
)dump_open_semaphore_request
,
1516 (dump_func
)dump_create_file_request
,
1517 (dump_func
)dump_alloc_file_handle_request
,
1518 (dump_func
)dump_get_read_fd_request
,
1519 (dump_func
)dump_get_write_fd_request
,
1520 (dump_func
)dump_set_file_pointer_request
,
1521 (dump_func
)dump_truncate_file_request
,
1522 (dump_func
)dump_set_file_time_request
,
1523 (dump_func
)dump_flush_file_request
,
1524 (dump_func
)dump_get_file_info_request
,
1525 (dump_func
)dump_lock_file_request
,
1526 (dump_func
)dump_unlock_file_request
,
1527 (dump_func
)dump_create_pipe_request
,
1528 (dump_func
)dump_create_socket_request
,
1529 (dump_func
)dump_accept_socket_request
,
1530 (dump_func
)dump_set_socket_event_request
,
1531 (dump_func
)dump_get_socket_event_request
,
1532 (dump_func
)dump_enable_socket_event_request
,
1533 (dump_func
)dump_alloc_console_request
,
1534 (dump_func
)dump_free_console_request
,
1535 (dump_func
)dump_open_console_request
,
1536 (dump_func
)dump_set_console_fd_request
,
1537 (dump_func
)dump_get_console_mode_request
,
1538 (dump_func
)dump_set_console_mode_request
,
1539 (dump_func
)dump_set_console_info_request
,
1540 (dump_func
)dump_get_console_info_request
,
1541 (dump_func
)dump_write_console_input_request
,
1542 (dump_func
)dump_read_console_input_request
,
1543 (dump_func
)dump_create_change_notification_request
,
1544 (dump_func
)dump_create_mapping_request
,
1545 (dump_func
)dump_open_mapping_request
,
1546 (dump_func
)dump_get_mapping_info_request
,
1547 (dump_func
)dump_create_device_request
,
1548 (dump_func
)dump_create_snapshot_request
,
1549 (dump_func
)dump_next_process_request
,
1550 (dump_func
)dump_next_thread_request
,
1551 (dump_func
)dump_next_module_request
,
1552 (dump_func
)dump_wait_debug_event_request
,
1553 (dump_func
)dump_exception_event_request
,
1554 (dump_func
)dump_output_debug_string_request
,
1555 (dump_func
)dump_continue_debug_event_request
,
1556 (dump_func
)dump_debug_process_request
,
1557 (dump_func
)dump_read_process_memory_request
,
1558 (dump_func
)dump_write_process_memory_request
,
1559 (dump_func
)dump_create_key_request
,
1560 (dump_func
)dump_open_key_request
,
1561 (dump_func
)dump_delete_key_request
,
1562 (dump_func
)dump_enum_key_request
,
1563 (dump_func
)dump_set_key_value_request
,
1564 (dump_func
)dump_get_key_value_request
,
1565 (dump_func
)dump_enum_key_value_request
,
1566 (dump_func
)dump_delete_key_value_request
,
1567 (dump_func
)dump_load_registry_request
,
1568 (dump_func
)dump_save_registry_request
,
1569 (dump_func
)dump_save_registry_atexit_request
,
1570 (dump_func
)dump_set_registry_levels_request
,
1571 (dump_func
)dump_create_timer_request
,
1572 (dump_func
)dump_open_timer_request
,
1573 (dump_func
)dump_set_timer_request
,
1574 (dump_func
)dump_cancel_timer_request
,
1575 (dump_func
)dump_get_thread_context_request
,
1576 (dump_func
)dump_set_thread_context_request
,
1577 (dump_func
)dump_get_selector_entry_request
,
1578 (dump_func
)dump_add_atom_request
,
1579 (dump_func
)dump_delete_atom_request
,
1580 (dump_func
)dump_find_atom_request
,
1581 (dump_func
)dump_get_atom_name_request
,
1582 (dump_func
)dump_init_atom_table_request
,
1583 (dump_func
)dump_get_msg_queue_request
,
1584 (dump_func
)dump_wake_queue_request
,
1585 (dump_func
)dump_wait_input_idle_request
,
1586 (dump_func
)dump_create_serial_request
,
1587 (dump_func
)dump_get_serial_info_request
,
1588 (dump_func
)dump_set_serial_info_request
,
1589 (dump_func
)dump_create_async_request
,
1590 (dump_func
)dump_async_result_request
,
1593 static const dump_func reply_dumpers
[REQ_NB_REQUESTS
] = {
1595 (dump_func
)dump_wait_process_reply
,
1596 (dump_func
)dump_new_thread_reply
,
1598 (dump_func
)dump_init_process_reply
,
1599 (dump_func
)dump_init_process_done_reply
,
1601 (dump_func
)dump_get_thread_buffer_reply
,
1602 (dump_func
)dump_terminate_process_reply
,
1603 (dump_func
)dump_terminate_thread_reply
,
1604 (dump_func
)dump_get_process_info_reply
,
1606 (dump_func
)dump_get_thread_info_reply
,
1608 (dump_func
)dump_suspend_thread_reply
,
1609 (dump_func
)dump_resume_thread_reply
,
1613 (dump_func
)dump_get_apc_reply
,
1615 (dump_func
)dump_get_handle_info_reply
,
1617 (dump_func
)dump_dup_handle_reply
,
1618 (dump_func
)dump_open_process_reply
,
1619 (dump_func
)dump_select_reply
,
1620 (dump_func
)dump_create_event_reply
,
1622 (dump_func
)dump_open_event_reply
,
1623 (dump_func
)dump_create_mutex_reply
,
1625 (dump_func
)dump_open_mutex_reply
,
1626 (dump_func
)dump_create_semaphore_reply
,
1627 (dump_func
)dump_release_semaphore_reply
,
1628 (dump_func
)dump_open_semaphore_reply
,
1629 (dump_func
)dump_create_file_reply
,
1630 (dump_func
)dump_alloc_file_handle_reply
,
1633 (dump_func
)dump_set_file_pointer_reply
,
1637 (dump_func
)dump_get_file_info_reply
,
1640 (dump_func
)dump_create_pipe_reply
,
1641 (dump_func
)dump_create_socket_reply
,
1642 (dump_func
)dump_accept_socket_reply
,
1644 (dump_func
)dump_get_socket_event_reply
,
1646 (dump_func
)dump_alloc_console_reply
,
1648 (dump_func
)dump_open_console_reply
,
1650 (dump_func
)dump_get_console_mode_reply
,
1653 (dump_func
)dump_get_console_info_reply
,
1654 (dump_func
)dump_write_console_input_reply
,
1655 (dump_func
)dump_read_console_input_reply
,
1656 (dump_func
)dump_create_change_notification_reply
,
1657 (dump_func
)dump_create_mapping_reply
,
1658 (dump_func
)dump_open_mapping_reply
,
1659 (dump_func
)dump_get_mapping_info_reply
,
1660 (dump_func
)dump_create_device_reply
,
1661 (dump_func
)dump_create_snapshot_reply
,
1662 (dump_func
)dump_next_process_reply
,
1663 (dump_func
)dump_next_thread_reply
,
1664 (dump_func
)dump_next_module_reply
,
1665 (dump_func
)dump_wait_debug_event_reply
,
1666 (dump_func
)dump_exception_event_reply
,
1670 (dump_func
)dump_read_process_memory_reply
,
1672 (dump_func
)dump_create_key_reply
,
1673 (dump_func
)dump_open_key_reply
,
1675 (dump_func
)dump_enum_key_reply
,
1677 (dump_func
)dump_get_key_value_reply
,
1678 (dump_func
)dump_enum_key_value_reply
,
1684 (dump_func
)dump_create_timer_reply
,
1685 (dump_func
)dump_open_timer_reply
,
1688 (dump_func
)dump_get_thread_context_reply
,
1690 (dump_func
)dump_get_selector_entry_reply
,
1691 (dump_func
)dump_add_atom_reply
,
1693 (dump_func
)dump_find_atom_reply
,
1694 (dump_func
)dump_get_atom_name_reply
,
1696 (dump_func
)dump_get_msg_queue_reply
,
1698 (dump_func
)dump_wait_input_idle_reply
,
1699 (dump_func
)dump_create_serial_reply
,
1700 (dump_func
)dump_get_serial_info_reply
,
1702 (dump_func
)dump_create_async_reply
,
1706 static const char * const req_names
[REQ_NB_REQUESTS
] = {
1712 "init_process_done",
1714 "get_thread_buffer",
1715 "terminate_process",
1740 "release_semaphore",
1743 "alloc_file_handle",
1758 "enable_socket_event",
1767 "write_console_input",
1768 "read_console_input",
1769 "create_change_notification",
1780 "output_debug_string",
1781 "continue_debug_event",
1783 "read_process_memory",
1784 "write_process_memory",
1795 "save_registry_atexit",
1796 "set_registry_levels",
1801 "get_thread_context",
1802 "set_thread_context",
1803 "get_selector_entry",
1819 /* ### make_requests end ### */
1820 /* Everything above this line is generated automatically by tools/make_requests */
1822 void trace_request( enum request req
)
1825 current
->last_req
= req
;
1826 if (req
< REQ_NB_REQUESTS
)
1828 fprintf( stderr
, "%08x: %s(", (unsigned int)current
, req_names
[req
] );
1830 req_dumpers
[req
]( current
->buffer
);
1833 fprintf( stderr
, "%08x: %d(", (unsigned int)current
, req
);
1834 if (current
->pass_fd
!= -1) fprintf( stderr
, " ) fd=%d\n", current
->pass_fd
);
1835 else fprintf( stderr
, " )\n" );
1838 void trace_reply( struct thread
*thread
)
1840 fprintf( stderr
, "%08x: %s() = %x",
1841 (unsigned int)thread
, req_names
[thread
->last_req
], thread
->error
);
1842 if (reply_dumpers
[thread
->last_req
])
1844 fprintf( stderr
, " {" );
1846 reply_dumpers
[thread
->last_req
]( thread
->buffer
);
1847 fprintf( stderr
, " }" );
1849 if (thread
->pass_fd
!= -1) fprintf( stderr
, " fd=%d\n", thread
->pass_fd
);
1850 else fprintf( stderr
, "\n" );