2 * Server request tracing
4 * Copyright (C) 1999 Alexandre Julliard
17 /* utility functions */
19 static void dump_ints( const int *ptr
, int len
)
24 fprintf( stderr
, "%d", *ptr
++ );
25 if (--len
) fputc( ',', stderr
);
30 static void dump_uints( const int *ptr
, int len
)
35 fprintf( stderr
, "%08x", *ptr
++ );
36 if (--len
) fputc( ',', stderr
);
41 static void dump_bytes( const unsigned char *ptr
, int len
)
46 fprintf( stderr
, "%02x", *ptr
++ );
47 if (--len
) fputc( ',', stderr
);
52 static void dump_unicode_string( const WCHAR
*str
)
54 fprintf( stderr
, "L\"" );
55 dump_strW( str
, strlenW(str
), stderr
, "\"\"" );
56 fputc( '\"', stderr
);
59 static void dump_path_t( const path_t
*path
)
61 dump_unicode_string( *path
);
64 static void dump_context( const CONTEXT
*context
)
67 fprintf( stderr
, "{flags=%08lx,eax=%08lx,ebx=%08lx,ecx=%08lx,edx=%08lx,esi=%08lx,edi=%08lx,"
68 "ebp=%08lx,eip=%08lx,esp=%08lx,eflags=%08lx,cs=%04lx,ds=%04lx,es=%04lx,"
69 "fs=%04lx,gs=%04lx,dr0=%08lx,dr1=%08lx,dr2=%08lx,dr3=%08lx,dr6=%08lx,dr7=%08lx,",
70 context
->ContextFlags
, context
->Eax
, context
->Ebx
, context
->Ecx
, context
->Edx
,
71 context
->Esi
, context
->Edi
, context
->Ebp
, context
->Eip
, context
->Esp
, context
->EFlags
,
72 context
->SegCs
, context
->SegDs
, context
->SegEs
, context
->SegFs
, context
->SegGs
,
73 context
->Dr0
, context
->Dr1
, context
->Dr2
, context
->Dr3
, context
->Dr6
, context
->Dr7
);
74 fprintf( stderr
, "float=" );
75 dump_uints( (int *)&context
->FloatSave
, sizeof(context
->FloatSave
) / sizeof(int) );
76 fprintf( stderr
, "}" );
78 dump_uints( (int *)context
, sizeof(*context
) / sizeof(int) );
82 static void dump_exc_record( const EXCEPTION_RECORD
*rec
)
85 fprintf( stderr
, "{code=%lx,flags=%lx,rec=%p,addr=%p,params={",
86 rec
->ExceptionCode
, rec
->ExceptionFlags
, rec
->ExceptionRecord
,
87 rec
->ExceptionAddress
);
88 for (i
= 0; i
< rec
->NumberParameters
; i
++)
90 if (i
) fputc( ',', stderr
);
91 fprintf( stderr
, "%lx", rec
->ExceptionInformation
[i
] );
96 static void dump_debug_event_t( const debug_event_t
*event
)
100 case EXCEPTION_DEBUG_EVENT
:
101 fprintf( stderr
, "{exception," );
102 dump_exc_record( &event
->info
.exception
.record
);
103 fprintf( stderr
, ",first=%d}", event
->info
.exception
.first
);
105 case CREATE_THREAD_DEBUG_EVENT
:
106 fprintf( stderr
, "{create_thread,thread=%d,teb=%p,start=%p}",
107 event
->info
.create_thread
.handle
, event
->info
.create_thread
.teb
,
108 event
->info
.create_thread
.start
);
110 case CREATE_PROCESS_DEBUG_EVENT
:
111 fprintf( stderr
, "{create_process,file=%d,process=%d,thread=%d,base=%p,offset=%d,"
112 "size=%d,teb=%p,start=%p,name=%p,unicode=%d}",
113 event
->info
.create_process
.file
, event
->info
.create_process
.process
,
114 event
->info
.create_process
.thread
, event
->info
.create_process
.base
,
115 event
->info
.create_process
.dbg_offset
, event
->info
.create_process
.dbg_size
,
116 event
->info
.create_process
.teb
, event
->info
.create_process
.start
,
117 event
->info
.create_process
.name
, event
->info
.create_process
.unicode
);
119 case EXIT_THREAD_DEBUG_EVENT
:
120 fprintf( stderr
, "{exit_thread,code=%d}", event
->info
.exit
.exit_code
);
122 case EXIT_PROCESS_DEBUG_EVENT
:
123 fprintf( stderr
, "{exit_process,code=%d}", event
->info
.exit
.exit_code
);
125 case LOAD_DLL_DEBUG_EVENT
:
126 fprintf( stderr
, "{load_dll,file=%d,base=%p,offset=%d,size=%d,name=%p,unicode=%d}",
127 event
->info
.load_dll
.handle
, event
->info
.load_dll
.base
,
128 event
->info
.load_dll
.dbg_offset
, event
->info
.load_dll
.dbg_size
,
129 event
->info
.load_dll
.name
, event
->info
.load_dll
.unicode
);
131 case UNLOAD_DLL_DEBUG_EVENT
:
132 fprintf( stderr
, "{unload_dll,base=%p}", event
->info
.unload_dll
.base
);
134 case OUTPUT_DEBUG_STRING_EVENT
:
135 fprintf( stderr
, "{output_string,data=%p,unicode=%d,len=%d}",
136 event
->info
.output_string
.string
, event
->info
.output_string
.unicode
,
137 event
->info
.output_string
.length
);
140 fprintf( stderr
, "{rip,err=%d,type=%d}",
141 event
->info
.rip_info
.error
, event
->info
.rip_info
.type
);
143 case 0: /* zero is the code returned on timeouts */
144 fprintf( stderr
, "{}" );
147 fprintf( stderr
, "{code=??? (%d)}", event
->code
);
153 /* dumping for functions for requests that have a variable part */
155 static void dump_varargs_select_request( const struct select_request
*req
)
157 dump_ints( req
->handles
, req
->count
);
160 static void dump_varargs_get_apcs_reply( const struct get_apcs_request
*req
)
163 for (i
= 0; i
< 2 * req
->count
; i
++)
164 fprintf( stderr
, "%c%p", i
? ',' : '{', req
->apcs
[i
] );
165 fprintf( stderr
, "}" );
168 static void dump_varargs_get_socket_event_reply( const struct get_socket_event_request
*req
)
170 dump_ints( req
->errors
, FD_MAX_EVENTS
);
173 static void dump_varargs_read_process_memory_reply( const struct read_process_memory_request
*req
)
175 int count
= min( req
->len
, get_req_size( req
->data
, sizeof(int) ) );
176 dump_bytes( (unsigned char *)req
->data
, count
* sizeof(int) );
179 static void dump_varargs_write_process_memory_request( const struct write_process_memory_request
*req
)
181 int count
= min( req
->len
, get_req_size( req
->data
, sizeof(int) ) );
182 dump_bytes( (unsigned char *)req
->data
, count
* sizeof(int) );
185 static void dump_varargs_set_key_value_request( const struct set_key_value_request
*req
)
187 dump_bytes( req
->data
, req
->len
);
190 static void dump_varargs_get_key_value_reply( const struct get_key_value_request
*req
)
192 dump_bytes( req
->data
, req
->len
);
195 static void dump_varargs_enum_key_value_reply( const struct enum_key_value_request
*req
)
197 dump_bytes( req
->data
, req
->len
);
200 typedef void (*dump_func
)( const void *req
);
202 /* Everything below this line is generated automatically by tools/make_requests */
203 /* ### make_requests begin ### */
205 static void dump_new_process_request( const struct new_process_request
*req
)
207 fprintf( stderr
, " pinherit=%d,", req
->pinherit
);
208 fprintf( stderr
, " tinherit=%d,", req
->tinherit
);
209 fprintf( stderr
, " inherit_all=%d,", req
->inherit_all
);
210 fprintf( stderr
, " create_flags=%d,", req
->create_flags
);
211 fprintf( stderr
, " start_flags=%d,", req
->start_flags
);
212 fprintf( stderr
, " exe_file=%d,", req
->exe_file
);
213 fprintf( stderr
, " hstdin=%d,", req
->hstdin
);
214 fprintf( stderr
, " hstdout=%d,", req
->hstdout
);
215 fprintf( stderr
, " hstderr=%d,", req
->hstderr
);
216 fprintf( stderr
, " event=%d,", req
->event
);
217 fprintf( stderr
, " cmd_show=%d,", req
->cmd_show
);
218 fprintf( stderr
, " env_ptr=%p,", req
->env_ptr
);
219 fprintf( stderr
, " cmdline=\"%s\"", req
->cmdline
);
222 static void dump_new_process_reply( const struct new_process_request
*req
)
224 fprintf( stderr
, " pid=%p,", req
->pid
);
225 fprintf( stderr
, " phandle=%d,", req
->phandle
);
226 fprintf( stderr
, " tid=%p,", req
->tid
);
227 fprintf( stderr
, " thandle=%d", req
->thandle
);
230 static void dump_new_thread_request( const struct new_thread_request
*req
)
232 fprintf( stderr
, " suspend=%d,", req
->suspend
);
233 fprintf( stderr
, " inherit=%d", req
->inherit
);
236 static void dump_new_thread_reply( const struct new_thread_request
*req
)
238 fprintf( stderr
, " tid=%p,", req
->tid
);
239 fprintf( stderr
, " handle=%d", req
->handle
);
242 static void dump_boot_done_request( const struct boot_done_request
*req
)
244 fprintf( stderr
, " debug_level=%d", req
->debug_level
);
247 static void dump_init_process_request( const struct init_process_request
*req
)
249 fprintf( stderr
, " ldt_copy=%p,", req
->ldt_copy
);
250 fprintf( stderr
, " ldt_flags=%p", req
->ldt_flags
);
253 static void dump_init_process_reply( const struct init_process_request
*req
)
255 fprintf( stderr
, " start_flags=%d,", req
->start_flags
);
256 fprintf( stderr
, " exe_file=%d,", req
->exe_file
);
257 fprintf( stderr
, " hstdin=%d,", req
->hstdin
);
258 fprintf( stderr
, " hstdout=%d,", req
->hstdout
);
259 fprintf( stderr
, " hstderr=%d,", req
->hstderr
);
260 fprintf( stderr
, " cmd_show=%d,", req
->cmd_show
);
261 fprintf( stderr
, " env_ptr=%p,", req
->env_ptr
);
262 fprintf( stderr
, " cmdline=\"%s\"", req
->cmdline
);
265 static void dump_init_process_done_request( const struct init_process_done_request
*req
)
267 fprintf( stderr
, " module=%p,", req
->module
);
268 fprintf( stderr
, " entry=%p", req
->entry
);
271 static void dump_init_process_done_reply( const struct init_process_done_request
*req
)
273 fprintf( stderr
, " debugged=%d", req
->debugged
);
276 static void dump_init_thread_request( const struct init_thread_request
*req
)
278 fprintf( stderr
, " unix_pid=%d,", req
->unix_pid
);
279 fprintf( stderr
, " teb=%p,", req
->teb
);
280 fprintf( stderr
, " entry=%p", req
->entry
);
283 static void dump_get_thread_buffer_request( const struct get_thread_buffer_request
*req
)
287 static void dump_get_thread_buffer_reply( const struct get_thread_buffer_request
*req
)
289 fprintf( stderr
, " pid=%p,", req
->pid
);
290 fprintf( stderr
, " tid=%p,", req
->tid
);
291 fprintf( stderr
, " boot=%d,", req
->boot
);
292 fprintf( stderr
, " version=%d", req
->version
);
295 static void dump_terminate_process_request( const struct terminate_process_request
*req
)
297 fprintf( stderr
, " handle=%d,", req
->handle
);
298 fprintf( stderr
, " exit_code=%d", req
->exit_code
);
301 static void dump_terminate_process_reply( const struct terminate_process_request
*req
)
303 fprintf( stderr
, " self=%d", req
->self
);
306 static void dump_terminate_thread_request( const struct terminate_thread_request
*req
)
308 fprintf( stderr
, " handle=%d,", req
->handle
);
309 fprintf( stderr
, " exit_code=%d", req
->exit_code
);
312 static void dump_terminate_thread_reply( const struct terminate_thread_request
*req
)
314 fprintf( stderr
, " self=%d,", req
->self
);
315 fprintf( stderr
, " last=%d", req
->last
);
318 static void dump_get_process_info_request( const struct get_process_info_request
*req
)
320 fprintf( stderr
, " handle=%d", req
->handle
);
323 static void dump_get_process_info_reply( const struct get_process_info_request
*req
)
325 fprintf( stderr
, " pid=%p,", req
->pid
);
326 fprintf( stderr
, " debugged=%d,", req
->debugged
);
327 fprintf( stderr
, " exit_code=%d,", req
->exit_code
);
328 fprintf( stderr
, " priority=%d,", req
->priority
);
329 fprintf( stderr
, " process_affinity=%d,", req
->process_affinity
);
330 fprintf( stderr
, " system_affinity=%d", req
->system_affinity
);
333 static void dump_set_process_info_request( const struct set_process_info_request
*req
)
335 fprintf( stderr
, " handle=%d,", req
->handle
);
336 fprintf( stderr
, " mask=%d,", req
->mask
);
337 fprintf( stderr
, " priority=%d,", req
->priority
);
338 fprintf( stderr
, " affinity=%d", req
->affinity
);
341 static void dump_get_thread_info_request( const struct get_thread_info_request
*req
)
343 fprintf( stderr
, " handle=%d,", req
->handle
);
344 fprintf( stderr
, " tid_in=%p", req
->tid_in
);
347 static void dump_get_thread_info_reply( const struct get_thread_info_request
*req
)
349 fprintf( stderr
, " tid=%p,", req
->tid
);
350 fprintf( stderr
, " teb=%p,", req
->teb
);
351 fprintf( stderr
, " exit_code=%d,", req
->exit_code
);
352 fprintf( stderr
, " priority=%d", req
->priority
);
355 static void dump_set_thread_info_request( const struct set_thread_info_request
*req
)
357 fprintf( stderr
, " handle=%d,", req
->handle
);
358 fprintf( stderr
, " mask=%d,", req
->mask
);
359 fprintf( stderr
, " priority=%d,", req
->priority
);
360 fprintf( stderr
, " affinity=%d", req
->affinity
);
363 static void dump_suspend_thread_request( const struct suspend_thread_request
*req
)
365 fprintf( stderr
, " handle=%d", req
->handle
);
368 static void dump_suspend_thread_reply( const struct suspend_thread_request
*req
)
370 fprintf( stderr
, " count=%d", req
->count
);
373 static void dump_resume_thread_request( const struct resume_thread_request
*req
)
375 fprintf( stderr
, " handle=%d", req
->handle
);
378 static void dump_resume_thread_reply( const struct resume_thread_request
*req
)
380 fprintf( stderr
, " count=%d", req
->count
);
383 static void dump_load_dll_request( const struct load_dll_request
*req
)
385 fprintf( stderr
, " handle=%d,", req
->handle
);
386 fprintf( stderr
, " base=%p,", req
->base
);
387 fprintf( stderr
, " dbg_offset=%d,", req
->dbg_offset
);
388 fprintf( stderr
, " dbg_size=%d,", req
->dbg_size
);
389 fprintf( stderr
, " name=%p", req
->name
);
392 static void dump_unload_dll_request( const struct unload_dll_request
*req
)
394 fprintf( stderr
, " base=%p", req
->base
);
397 static void dump_queue_apc_request( const struct queue_apc_request
*req
)
399 fprintf( stderr
, " handle=%d,", req
->handle
);
400 fprintf( stderr
, " func=%p,", req
->func
);
401 fprintf( stderr
, " param=%p", req
->param
);
404 static void dump_get_apcs_request( const struct get_apcs_request
*req
)
408 static void dump_get_apcs_reply( const struct get_apcs_request
*req
)
410 fprintf( stderr
, " count=%d,", req
->count
);
411 fprintf( stderr
, " apcs=" );
412 dump_varargs_get_apcs_reply( req
);
415 static void dump_close_handle_request( const struct close_handle_request
*req
)
417 fprintf( stderr
, " handle=%d", req
->handle
);
420 static void dump_get_handle_info_request( const struct get_handle_info_request
*req
)
422 fprintf( stderr
, " handle=%d", req
->handle
);
425 static void dump_get_handle_info_reply( const struct get_handle_info_request
*req
)
427 fprintf( stderr
, " flags=%d", req
->flags
);
430 static void dump_set_handle_info_request( const struct set_handle_info_request
*req
)
432 fprintf( stderr
, " handle=%d,", req
->handle
);
433 fprintf( stderr
, " flags=%d,", req
->flags
);
434 fprintf( stderr
, " mask=%d", req
->mask
);
437 static void dump_dup_handle_request( const struct dup_handle_request
*req
)
439 fprintf( stderr
, " src_process=%d,", req
->src_process
);
440 fprintf( stderr
, " src_handle=%d,", req
->src_handle
);
441 fprintf( stderr
, " dst_process=%d,", req
->dst_process
);
442 fprintf( stderr
, " access=%08x,", req
->access
);
443 fprintf( stderr
, " inherit=%d,", req
->inherit
);
444 fprintf( stderr
, " options=%d", req
->options
);
447 static void dump_dup_handle_reply( const struct dup_handle_request
*req
)
449 fprintf( stderr
, " handle=%d", req
->handle
);
452 static void dump_open_process_request( const struct open_process_request
*req
)
454 fprintf( stderr
, " pid=%p,", req
->pid
);
455 fprintf( stderr
, " access=%08x,", req
->access
);
456 fprintf( stderr
, " inherit=%d", req
->inherit
);
459 static void dump_open_process_reply( const struct open_process_request
*req
)
461 fprintf( stderr
, " handle=%d", req
->handle
);
464 static void dump_select_request( const struct select_request
*req
)
466 fprintf( stderr
, " count=%d,", req
->count
);
467 fprintf( stderr
, " flags=%d,", req
->flags
);
468 fprintf( stderr
, " timeout=%d,", req
->timeout
);
469 fprintf( stderr
, " handles=" );
470 dump_varargs_select_request( req
);
473 static void dump_select_reply( const struct select_request
*req
)
475 fprintf( stderr
, " signaled=%d", req
->signaled
);
478 static void dump_create_event_request( const struct create_event_request
*req
)
480 fprintf( stderr
, " manual_reset=%d,", req
->manual_reset
);
481 fprintf( stderr
, " initial_state=%d,", req
->initial_state
);
482 fprintf( stderr
, " inherit=%d,", req
->inherit
);
483 fprintf( stderr
, " name=" );
484 dump_unicode_string( req
->name
);
487 static void dump_create_event_reply( const struct create_event_request
*req
)
489 fprintf( stderr
, " handle=%d", req
->handle
);
492 static void dump_event_op_request( const struct event_op_request
*req
)
494 fprintf( stderr
, " handle=%d,", req
->handle
);
495 fprintf( stderr
, " op=%d", req
->op
);
498 static void dump_open_event_request( const struct open_event_request
*req
)
500 fprintf( stderr
, " access=%08x,", req
->access
);
501 fprintf( stderr
, " inherit=%d,", req
->inherit
);
502 fprintf( stderr
, " name=" );
503 dump_unicode_string( req
->name
);
506 static void dump_open_event_reply( const struct open_event_request
*req
)
508 fprintf( stderr
, " handle=%d", req
->handle
);
511 static void dump_create_mutex_request( const struct create_mutex_request
*req
)
513 fprintf( stderr
, " owned=%d,", req
->owned
);
514 fprintf( stderr
, " inherit=%d,", req
->inherit
);
515 fprintf( stderr
, " name=" );
516 dump_unicode_string( req
->name
);
519 static void dump_create_mutex_reply( const struct create_mutex_request
*req
)
521 fprintf( stderr
, " handle=%d", req
->handle
);
524 static void dump_release_mutex_request( const struct release_mutex_request
*req
)
526 fprintf( stderr
, " handle=%d", req
->handle
);
529 static void dump_open_mutex_request( const struct open_mutex_request
*req
)
531 fprintf( stderr
, " access=%08x,", req
->access
);
532 fprintf( stderr
, " inherit=%d,", req
->inherit
);
533 fprintf( stderr
, " name=" );
534 dump_unicode_string( req
->name
);
537 static void dump_open_mutex_reply( const struct open_mutex_request
*req
)
539 fprintf( stderr
, " handle=%d", req
->handle
);
542 static void dump_create_semaphore_request( const struct create_semaphore_request
*req
)
544 fprintf( stderr
, " initial=%08x,", req
->initial
);
545 fprintf( stderr
, " max=%08x,", req
->max
);
546 fprintf( stderr
, " inherit=%d,", req
->inherit
);
547 fprintf( stderr
, " name=" );
548 dump_unicode_string( req
->name
);
551 static void dump_create_semaphore_reply( const struct create_semaphore_request
*req
)
553 fprintf( stderr
, " handle=%d", req
->handle
);
556 static void dump_release_semaphore_request( const struct release_semaphore_request
*req
)
558 fprintf( stderr
, " handle=%d,", req
->handle
);
559 fprintf( stderr
, " count=%08x", req
->count
);
562 static void dump_release_semaphore_reply( const struct release_semaphore_request
*req
)
564 fprintf( stderr
, " prev_count=%08x", req
->prev_count
);
567 static void dump_open_semaphore_request( const struct open_semaphore_request
*req
)
569 fprintf( stderr
, " access=%08x,", req
->access
);
570 fprintf( stderr
, " inherit=%d,", req
->inherit
);
571 fprintf( stderr
, " name=" );
572 dump_unicode_string( req
->name
);
575 static void dump_open_semaphore_reply( const struct open_semaphore_request
*req
)
577 fprintf( stderr
, " handle=%d", req
->handle
);
580 static void dump_create_file_request( const struct create_file_request
*req
)
582 fprintf( stderr
, " access=%08x,", req
->access
);
583 fprintf( stderr
, " inherit=%d,", req
->inherit
);
584 fprintf( stderr
, " sharing=%08x,", req
->sharing
);
585 fprintf( stderr
, " create=%d,", req
->create
);
586 fprintf( stderr
, " attrs=%08x,", req
->attrs
);
587 fprintf( stderr
, " name=\"%s\"", req
->name
);
590 static void dump_create_file_reply( const struct create_file_request
*req
)
592 fprintf( stderr
, " handle=%d", req
->handle
);
595 static void dump_alloc_file_handle_request( const struct alloc_file_handle_request
*req
)
597 fprintf( stderr
, " access=%08x", req
->access
);
600 static void dump_alloc_file_handle_reply( const struct alloc_file_handle_request
*req
)
602 fprintf( stderr
, " handle=%d", req
->handle
);
605 static void dump_get_read_fd_request( const struct get_read_fd_request
*req
)
607 fprintf( stderr
, " handle=%d", req
->handle
);
610 static void dump_get_write_fd_request( const struct get_write_fd_request
*req
)
612 fprintf( stderr
, " handle=%d", req
->handle
);
615 static void dump_set_file_pointer_request( const struct set_file_pointer_request
*req
)
617 fprintf( stderr
, " handle=%d,", req
->handle
);
618 fprintf( stderr
, " low=%d,", req
->low
);
619 fprintf( stderr
, " high=%d,", req
->high
);
620 fprintf( stderr
, " whence=%d", req
->whence
);
623 static void dump_set_file_pointer_reply( const struct set_file_pointer_request
*req
)
625 fprintf( stderr
, " new_low=%d,", req
->new_low
);
626 fprintf( stderr
, " new_high=%d", req
->new_high
);
629 static void dump_truncate_file_request( const struct truncate_file_request
*req
)
631 fprintf( stderr
, " handle=%d", req
->handle
);
634 static void dump_set_file_time_request( const struct set_file_time_request
*req
)
636 fprintf( stderr
, " handle=%d,", req
->handle
);
637 fprintf( stderr
, " access_time=%ld,", req
->access_time
);
638 fprintf( stderr
, " write_time=%ld", req
->write_time
);
641 static void dump_flush_file_request( const struct flush_file_request
*req
)
643 fprintf( stderr
, " handle=%d", req
->handle
);
646 static void dump_get_file_info_request( const struct get_file_info_request
*req
)
648 fprintf( stderr
, " handle=%d", req
->handle
);
651 static void dump_get_file_info_reply( const struct get_file_info_request
*req
)
653 fprintf( stderr
, " type=%d,", req
->type
);
654 fprintf( stderr
, " attr=%d,", req
->attr
);
655 fprintf( stderr
, " access_time=%ld,", req
->access_time
);
656 fprintf( stderr
, " write_time=%ld,", req
->write_time
);
657 fprintf( stderr
, " size_high=%d,", req
->size_high
);
658 fprintf( stderr
, " size_low=%d,", req
->size_low
);
659 fprintf( stderr
, " links=%d,", req
->links
);
660 fprintf( stderr
, " index_high=%d,", req
->index_high
);
661 fprintf( stderr
, " index_low=%d,", req
->index_low
);
662 fprintf( stderr
, " serial=%08x", req
->serial
);
665 static void dump_lock_file_request( const struct lock_file_request
*req
)
667 fprintf( stderr
, " handle=%d,", req
->handle
);
668 fprintf( stderr
, " offset_low=%08x,", req
->offset_low
);
669 fprintf( stderr
, " offset_high=%08x,", req
->offset_high
);
670 fprintf( stderr
, " count_low=%08x,", req
->count_low
);
671 fprintf( stderr
, " count_high=%08x", req
->count_high
);
674 static void dump_unlock_file_request( const struct unlock_file_request
*req
)
676 fprintf( stderr
, " handle=%d,", req
->handle
);
677 fprintf( stderr
, " offset_low=%08x,", req
->offset_low
);
678 fprintf( stderr
, " offset_high=%08x,", req
->offset_high
);
679 fprintf( stderr
, " count_low=%08x,", req
->count_low
);
680 fprintf( stderr
, " count_high=%08x", req
->count_high
);
683 static void dump_create_pipe_request( const struct create_pipe_request
*req
)
685 fprintf( stderr
, " inherit=%d", req
->inherit
);
688 static void dump_create_pipe_reply( const struct create_pipe_request
*req
)
690 fprintf( stderr
, " handle_read=%d,", req
->handle_read
);
691 fprintf( stderr
, " handle_write=%d", req
->handle_write
);
694 static void dump_create_socket_request( const struct create_socket_request
*req
)
696 fprintf( stderr
, " access=%08x,", req
->access
);
697 fprintf( stderr
, " inherit=%d,", req
->inherit
);
698 fprintf( stderr
, " family=%d,", req
->family
);
699 fprintf( stderr
, " type=%d,", req
->type
);
700 fprintf( stderr
, " protocol=%d", req
->protocol
);
703 static void dump_create_socket_reply( const struct create_socket_request
*req
)
705 fprintf( stderr
, " handle=%d", req
->handle
);
708 static void dump_accept_socket_request( const struct accept_socket_request
*req
)
710 fprintf( stderr
, " lhandle=%d,", req
->lhandle
);
711 fprintf( stderr
, " access=%08x,", req
->access
);
712 fprintf( stderr
, " inherit=%d", req
->inherit
);
715 static void dump_accept_socket_reply( const struct accept_socket_request
*req
)
717 fprintf( stderr
, " handle=%d", req
->handle
);
720 static void dump_set_socket_event_request( const struct set_socket_event_request
*req
)
722 fprintf( stderr
, " handle=%d,", req
->handle
);
723 fprintf( stderr
, " mask=%08x,", req
->mask
);
724 fprintf( stderr
, " event=%d", req
->event
);
727 static void dump_get_socket_event_request( const struct get_socket_event_request
*req
)
729 fprintf( stderr
, " handle=%d,", req
->handle
);
730 fprintf( stderr
, " service=%d,", req
->service
);
731 fprintf( stderr
, " s_event=%d,", req
->s_event
);
732 fprintf( stderr
, " c_event=%d", req
->c_event
);
735 static void dump_get_socket_event_reply( const struct get_socket_event_request
*req
)
737 fprintf( stderr
, " mask=%08x,", req
->mask
);
738 fprintf( stderr
, " pmask=%08x,", req
->pmask
);
739 fprintf( stderr
, " state=%08x,", req
->state
);
740 fprintf( stderr
, " errors=" );
741 dump_varargs_get_socket_event_reply( req
);
744 static void dump_enable_socket_event_request( const struct enable_socket_event_request
*req
)
746 fprintf( stderr
, " handle=%d,", req
->handle
);
747 fprintf( stderr
, " mask=%08x,", req
->mask
);
748 fprintf( stderr
, " sstate=%08x,", req
->sstate
);
749 fprintf( stderr
, " cstate=%08x", req
->cstate
);
752 static void dump_alloc_console_request( const struct alloc_console_request
*req
)
754 fprintf( stderr
, " access=%08x,", req
->access
);
755 fprintf( stderr
, " inherit=%d", req
->inherit
);
758 static void dump_alloc_console_reply( const struct alloc_console_request
*req
)
760 fprintf( stderr
, " handle_in=%d,", req
->handle_in
);
761 fprintf( stderr
, " handle_out=%d", req
->handle_out
);
764 static void dump_free_console_request( const struct free_console_request
*req
)
766 fprintf( stderr
, " dummy=%d", req
->dummy
);
769 static void dump_open_console_request( const struct open_console_request
*req
)
771 fprintf( stderr
, " output=%d,", req
->output
);
772 fprintf( stderr
, " access=%08x,", req
->access
);
773 fprintf( stderr
, " inherit=%d", req
->inherit
);
776 static void dump_open_console_reply( const struct open_console_request
*req
)
778 fprintf( stderr
, " handle=%d", req
->handle
);
781 static void dump_set_console_fd_request( const struct set_console_fd_request
*req
)
783 fprintf( stderr
, " handle=%d,", req
->handle
);
784 fprintf( stderr
, " file_handle=%d,", req
->file_handle
);
785 fprintf( stderr
, " pid=%d", req
->pid
);
788 static void dump_get_console_mode_request( const struct get_console_mode_request
*req
)
790 fprintf( stderr
, " handle=%d", req
->handle
);
793 static void dump_get_console_mode_reply( const struct get_console_mode_request
*req
)
795 fprintf( stderr
, " mode=%d", req
->mode
);
798 static void dump_set_console_mode_request( const struct set_console_mode_request
*req
)
800 fprintf( stderr
, " handle=%d,", req
->handle
);
801 fprintf( stderr
, " mode=%d", req
->mode
);
804 static void dump_set_console_info_request( const struct set_console_info_request
*req
)
806 fprintf( stderr
, " handle=%d,", req
->handle
);
807 fprintf( stderr
, " mask=%d,", req
->mask
);
808 fprintf( stderr
, " cursor_size=%d,", req
->cursor_size
);
809 fprintf( stderr
, " cursor_visible=%d,", req
->cursor_visible
);
810 fprintf( stderr
, " title=\"%s\"", req
->title
);
813 static void dump_get_console_info_request( const struct get_console_info_request
*req
)
815 fprintf( stderr
, " handle=%d", req
->handle
);
818 static void dump_get_console_info_reply( const struct get_console_info_request
*req
)
820 fprintf( stderr
, " cursor_size=%d,", req
->cursor_size
);
821 fprintf( stderr
, " cursor_visible=%d,", req
->cursor_visible
);
822 fprintf( stderr
, " pid=%d,", req
->pid
);
823 fprintf( stderr
, " title=\"%s\"", req
->title
);
826 static void dump_write_console_input_request( const struct write_console_input_request
*req
)
828 fprintf( stderr
, " handle=%d,", req
->handle
);
829 fprintf( stderr
, " count=%d", req
->count
);
832 static void dump_write_console_input_reply( const struct write_console_input_request
*req
)
834 fprintf( stderr
, " written=%d", req
->written
);
837 static void dump_read_console_input_request( const struct read_console_input_request
*req
)
839 fprintf( stderr
, " handle=%d,", req
->handle
);
840 fprintf( stderr
, " count=%d,", req
->count
);
841 fprintf( stderr
, " flush=%d", req
->flush
);
844 static void dump_read_console_input_reply( const struct read_console_input_request
*req
)
846 fprintf( stderr
, " read=%d", req
->read
);
849 static void dump_create_change_notification_request( const struct create_change_notification_request
*req
)
851 fprintf( stderr
, " subtree=%d,", req
->subtree
);
852 fprintf( stderr
, " filter=%d", req
->filter
);
855 static void dump_create_change_notification_reply( const struct create_change_notification_request
*req
)
857 fprintf( stderr
, " handle=%d", req
->handle
);
860 static void dump_create_mapping_request( const struct create_mapping_request
*req
)
862 fprintf( stderr
, " size_high=%d,", req
->size_high
);
863 fprintf( stderr
, " size_low=%d,", req
->size_low
);
864 fprintf( stderr
, " protect=%d,", req
->protect
);
865 fprintf( stderr
, " inherit=%d,", req
->inherit
);
866 fprintf( stderr
, " file_handle=%d,", req
->file_handle
);
867 fprintf( stderr
, " name=" );
868 dump_unicode_string( req
->name
);
871 static void dump_create_mapping_reply( const struct create_mapping_request
*req
)
873 fprintf( stderr
, " handle=%d", req
->handle
);
876 static void dump_open_mapping_request( const struct open_mapping_request
*req
)
878 fprintf( stderr
, " access=%08x,", req
->access
);
879 fprintf( stderr
, " inherit=%d,", req
->inherit
);
880 fprintf( stderr
, " name=" );
881 dump_unicode_string( req
->name
);
884 static void dump_open_mapping_reply( const struct open_mapping_request
*req
)
886 fprintf( stderr
, " handle=%d", req
->handle
);
889 static void dump_get_mapping_info_request( const struct get_mapping_info_request
*req
)
891 fprintf( stderr
, " handle=%d", req
->handle
);
894 static void dump_get_mapping_info_reply( const struct get_mapping_info_request
*req
)
896 fprintf( stderr
, " size_high=%d,", req
->size_high
);
897 fprintf( stderr
, " size_low=%d,", req
->size_low
);
898 fprintf( stderr
, " protect=%d", req
->protect
);
901 static void dump_create_device_request( const struct create_device_request
*req
)
903 fprintf( stderr
, " access=%08x,", req
->access
);
904 fprintf( stderr
, " inherit=%d,", req
->inherit
);
905 fprintf( stderr
, " id=%d", req
->id
);
908 static void dump_create_device_reply( const struct create_device_request
*req
)
910 fprintf( stderr
, " handle=%d", req
->handle
);
913 static void dump_create_snapshot_request( const struct create_snapshot_request
*req
)
915 fprintf( stderr
, " inherit=%d,", req
->inherit
);
916 fprintf( stderr
, " flags=%d", req
->flags
);
919 static void dump_create_snapshot_reply( const struct create_snapshot_request
*req
)
921 fprintf( stderr
, " handle=%d", req
->handle
);
924 static void dump_next_process_request( const struct next_process_request
*req
)
926 fprintf( stderr
, " handle=%d,", req
->handle
);
927 fprintf( stderr
, " reset=%d", req
->reset
);
930 static void dump_next_process_reply( const struct next_process_request
*req
)
932 fprintf( stderr
, " pid=%p,", req
->pid
);
933 fprintf( stderr
, " threads=%d,", req
->threads
);
934 fprintf( stderr
, " priority=%d", req
->priority
);
937 static void dump_wait_debug_event_request( const struct wait_debug_event_request
*req
)
939 fprintf( stderr
, " timeout=%d", req
->timeout
);
942 static void dump_wait_debug_event_reply( const struct wait_debug_event_request
*req
)
944 fprintf( stderr
, " pid=%p,", req
->pid
);
945 fprintf( stderr
, " tid=%p,", req
->tid
);
946 fprintf( stderr
, " event=" );
947 dump_debug_event_t( &req
->event
);
950 static void dump_exception_event_request( const struct exception_event_request
*req
)
952 fprintf( stderr
, " record=" );
953 dump_exc_record( &req
->record
);
954 fprintf( stderr
, "," );
955 fprintf( stderr
, " first=%d,", req
->first
);
956 fprintf( stderr
, " context=" );
957 dump_context( &req
->context
);
960 static void dump_exception_event_reply( const struct exception_event_request
*req
)
962 fprintf( stderr
, " status=%d", req
->status
);
965 static void dump_output_debug_string_request( const struct output_debug_string_request
*req
)
967 fprintf( stderr
, " string=%p,", req
->string
);
968 fprintf( stderr
, " unicode=%d,", req
->unicode
);
969 fprintf( stderr
, " length=%d", req
->length
);
972 static void dump_continue_debug_event_request( const struct continue_debug_event_request
*req
)
974 fprintf( stderr
, " pid=%p,", req
->pid
);
975 fprintf( stderr
, " tid=%p,", req
->tid
);
976 fprintf( stderr
, " status=%d", req
->status
);
979 static void dump_debug_process_request( const struct debug_process_request
*req
)
981 fprintf( stderr
, " pid=%p", req
->pid
);
984 static void dump_read_process_memory_request( const struct read_process_memory_request
*req
)
986 fprintf( stderr
, " handle=%d,", req
->handle
);
987 fprintf( stderr
, " addr=%p,", req
->addr
);
988 fprintf( stderr
, " len=%d", req
->len
);
991 static void dump_read_process_memory_reply( const struct read_process_memory_request
*req
)
993 fprintf( stderr
, " data=" );
994 dump_varargs_read_process_memory_reply( req
);
997 static void dump_write_process_memory_request( const struct write_process_memory_request
*req
)
999 fprintf( stderr
, " handle=%d,", req
->handle
);
1000 fprintf( stderr
, " addr=%p,", req
->addr
);
1001 fprintf( stderr
, " len=%d,", req
->len
);
1002 fprintf( stderr
, " first_mask=%08x,", req
->first_mask
);
1003 fprintf( stderr
, " last_mask=%08x,", req
->last_mask
);
1004 fprintf( stderr
, " data=" );
1005 dump_varargs_write_process_memory_request( req
);
1008 static void dump_create_key_request( const struct create_key_request
*req
)
1010 fprintf( stderr
, " parent=%d,", req
->parent
);
1011 fprintf( stderr
, " access=%08x,", req
->access
);
1012 fprintf( stderr
, " options=%08x,", req
->options
);
1013 fprintf( stderr
, " modif=%ld,", req
->modif
);
1014 fprintf( stderr
, " name=" );
1015 dump_path_t( &req
->name
);
1016 fprintf( stderr
, "," );
1017 fprintf( stderr
, " class=" );
1018 dump_unicode_string( req
->class );
1021 static void dump_create_key_reply( const struct create_key_request
*req
)
1023 fprintf( stderr
, " hkey=%d,", req
->hkey
);
1024 fprintf( stderr
, " created=%d", req
->created
);
1027 static void dump_open_key_request( const struct open_key_request
*req
)
1029 fprintf( stderr
, " parent=%d,", req
->parent
);
1030 fprintf( stderr
, " access=%08x,", req
->access
);
1031 fprintf( stderr
, " name=" );
1032 dump_path_t( &req
->name
);
1035 static void dump_open_key_reply( const struct open_key_request
*req
)
1037 fprintf( stderr
, " hkey=%d", req
->hkey
);
1040 static void dump_delete_key_request( const struct delete_key_request
*req
)
1042 fprintf( stderr
, " hkey=%d,", req
->hkey
);
1043 fprintf( stderr
, " name=" );
1044 dump_path_t( &req
->name
);
1047 static void dump_close_key_request( const struct close_key_request
*req
)
1049 fprintf( stderr
, " hkey=%d", req
->hkey
);
1052 static void dump_enum_key_request( const struct enum_key_request
*req
)
1054 fprintf( stderr
, " hkey=%d,", req
->hkey
);
1055 fprintf( stderr
, " index=%d", req
->index
);
1058 static void dump_enum_key_reply( const struct enum_key_request
*req
)
1060 fprintf( stderr
, " modif=%ld,", req
->modif
);
1061 fprintf( stderr
, " name=" );
1062 dump_path_t( &req
->name
);
1063 fprintf( stderr
, "," );
1064 fprintf( stderr
, " class=" );
1065 dump_unicode_string( req
->class );
1068 static void dump_query_key_info_request( const struct query_key_info_request
*req
)
1070 fprintf( stderr
, " hkey=%d", req
->hkey
);
1073 static void dump_query_key_info_reply( const struct query_key_info_request
*req
)
1075 fprintf( stderr
, " subkeys=%d,", req
->subkeys
);
1076 fprintf( stderr
, " max_subkey=%d,", req
->max_subkey
);
1077 fprintf( stderr
, " max_class=%d,", req
->max_class
);
1078 fprintf( stderr
, " values=%d,", req
->values
);
1079 fprintf( stderr
, " max_value=%d,", req
->max_value
);
1080 fprintf( stderr
, " max_data=%d,", req
->max_data
);
1081 fprintf( stderr
, " modif=%ld,", req
->modif
);
1082 fprintf( stderr
, " name=" );
1083 dump_path_t( &req
->name
);
1084 fprintf( stderr
, "," );
1085 fprintf( stderr
, " class=" );
1086 dump_unicode_string( req
->class );
1089 static void dump_set_key_value_request( const struct set_key_value_request
*req
)
1091 fprintf( stderr
, " hkey=%d,", req
->hkey
);
1092 fprintf( stderr
, " type=%d,", req
->type
);
1093 fprintf( stderr
, " len=%d,", req
->len
);
1094 fprintf( stderr
, " name=" );
1095 dump_path_t( &req
->name
);
1096 fprintf( stderr
, "," );
1097 fprintf( stderr
, " data=" );
1098 dump_varargs_set_key_value_request( req
);
1101 static void dump_get_key_value_request( const struct get_key_value_request
*req
)
1103 fprintf( stderr
, " hkey=%d,", req
->hkey
);
1104 fprintf( stderr
, " name=" );
1105 dump_unicode_string( req
->name
);
1108 static void dump_get_key_value_reply( const struct get_key_value_request
*req
)
1110 fprintf( stderr
, " type=%d,", req
->type
);
1111 fprintf( stderr
, " len=%d,", req
->len
);
1112 fprintf( stderr
, " data=" );
1113 dump_varargs_get_key_value_reply( req
);
1116 static void dump_enum_key_value_request( const struct enum_key_value_request
*req
)
1118 fprintf( stderr
, " hkey=%d,", req
->hkey
);
1119 fprintf( stderr
, " index=%d", req
->index
);
1122 static void dump_enum_key_value_reply( const struct enum_key_value_request
*req
)
1124 fprintf( stderr
, " type=%d,", req
->type
);
1125 fprintf( stderr
, " len=%d,", req
->len
);
1126 fprintf( stderr
, " name=" );
1127 dump_path_t( &req
->name
);
1128 fprintf( stderr
, "," );
1129 fprintf( stderr
, " data=" );
1130 dump_varargs_enum_key_value_reply( req
);
1133 static void dump_delete_key_value_request( const struct delete_key_value_request
*req
)
1135 fprintf( stderr
, " hkey=%d,", req
->hkey
);
1136 fprintf( stderr
, " name=" );
1137 dump_path_t( &req
->name
);
1140 static void dump_load_registry_request( const struct load_registry_request
*req
)
1142 fprintf( stderr
, " hkey=%d,", req
->hkey
);
1143 fprintf( stderr
, " file=%d,", req
->file
);
1144 fprintf( stderr
, " name=" );
1145 dump_path_t( &req
->name
);
1148 static void dump_save_registry_request( const struct save_registry_request
*req
)
1150 fprintf( stderr
, " hkey=%d,", req
->hkey
);
1151 fprintf( stderr
, " file=%d", req
->file
);
1154 static void dump_set_registry_levels_request( const struct set_registry_levels_request
*req
)
1156 fprintf( stderr
, " current=%d,", req
->current
);
1157 fprintf( stderr
, " saving=%d,", req
->saving
);
1158 fprintf( stderr
, " version=%d", req
->version
);
1161 static void dump_create_timer_request( const struct create_timer_request
*req
)
1163 fprintf( stderr
, " inherit=%d,", req
->inherit
);
1164 fprintf( stderr
, " manual=%d,", req
->manual
);
1165 fprintf( stderr
, " name=" );
1166 dump_unicode_string( req
->name
);
1169 static void dump_create_timer_reply( const struct create_timer_request
*req
)
1171 fprintf( stderr
, " handle=%d", req
->handle
);
1174 static void dump_open_timer_request( const struct open_timer_request
*req
)
1176 fprintf( stderr
, " access=%08x,", req
->access
);
1177 fprintf( stderr
, " inherit=%d,", req
->inherit
);
1178 fprintf( stderr
, " name=" );
1179 dump_unicode_string( req
->name
);
1182 static void dump_open_timer_reply( const struct open_timer_request
*req
)
1184 fprintf( stderr
, " handle=%d", req
->handle
);
1187 static void dump_set_timer_request( const struct set_timer_request
*req
)
1189 fprintf( stderr
, " handle=%d,", req
->handle
);
1190 fprintf( stderr
, " sec=%d,", req
->sec
);
1191 fprintf( stderr
, " usec=%d,", req
->usec
);
1192 fprintf( stderr
, " period=%d,", req
->period
);
1193 fprintf( stderr
, " callback=%p,", req
->callback
);
1194 fprintf( stderr
, " arg=%p", req
->arg
);
1197 static void dump_cancel_timer_request( const struct cancel_timer_request
*req
)
1199 fprintf( stderr
, " handle=%d", req
->handle
);
1202 static void dump_get_thread_context_request( const struct get_thread_context_request
*req
)
1204 fprintf( stderr
, " handle=%d,", req
->handle
);
1205 fprintf( stderr
, " flags=%08x", req
->flags
);
1208 static void dump_get_thread_context_reply( const struct get_thread_context_request
*req
)
1210 fprintf( stderr
, " context=" );
1211 dump_context( &req
->context
);
1214 static void dump_set_thread_context_request( const struct set_thread_context_request
*req
)
1216 fprintf( stderr
, " handle=%d,", req
->handle
);
1217 fprintf( stderr
, " flags=%08x,", req
->flags
);
1218 fprintf( stderr
, " context=" );
1219 dump_context( &req
->context
);
1222 static void dump_get_selector_entry_request( const struct get_selector_entry_request
*req
)
1224 fprintf( stderr
, " handle=%d,", req
->handle
);
1225 fprintf( stderr
, " entry=%d", req
->entry
);
1228 static void dump_get_selector_entry_reply( const struct get_selector_entry_request
*req
)
1230 fprintf( stderr
, " base=%08x,", req
->base
);
1231 fprintf( stderr
, " limit=%08x,", req
->limit
);
1232 fprintf( stderr
, " flags=%02x", req
->flags
);
1235 static void dump_add_atom_request( const struct add_atom_request
*req
)
1237 fprintf( stderr
, " name=" );
1238 dump_unicode_string( req
->name
);
1241 static void dump_add_atom_reply( const struct add_atom_request
*req
)
1243 fprintf( stderr
, " atom=%d", req
->atom
);
1246 static void dump_delete_atom_request( const struct delete_atom_request
*req
)
1248 fprintf( stderr
, " atom=%d", req
->atom
);
1251 static void dump_find_atom_request( const struct find_atom_request
*req
)
1253 fprintf( stderr
, " name=" );
1254 dump_unicode_string( req
->name
);
1257 static void dump_find_atom_reply( const struct find_atom_request
*req
)
1259 fprintf( stderr
, " atom=%d", req
->atom
);
1262 static void dump_get_atom_name_request( const struct get_atom_name_request
*req
)
1264 fprintf( stderr
, " atom=%d", req
->atom
);
1267 static void dump_get_atom_name_reply( const struct get_atom_name_request
*req
)
1269 fprintf( stderr
, " count=%d,", req
->count
);
1270 fprintf( stderr
, " name=" );
1271 dump_unicode_string( req
->name
);
1274 static const dump_func req_dumpers
[REQ_NB_REQUESTS
] = {
1275 (dump_func
)dump_new_process_request
,
1276 (dump_func
)dump_new_thread_request
,
1277 (dump_func
)dump_boot_done_request
,
1278 (dump_func
)dump_init_process_request
,
1279 (dump_func
)dump_init_process_done_request
,
1280 (dump_func
)dump_init_thread_request
,
1281 (dump_func
)dump_get_thread_buffer_request
,
1282 (dump_func
)dump_terminate_process_request
,
1283 (dump_func
)dump_terminate_thread_request
,
1284 (dump_func
)dump_get_process_info_request
,
1285 (dump_func
)dump_set_process_info_request
,
1286 (dump_func
)dump_get_thread_info_request
,
1287 (dump_func
)dump_set_thread_info_request
,
1288 (dump_func
)dump_suspend_thread_request
,
1289 (dump_func
)dump_resume_thread_request
,
1290 (dump_func
)dump_load_dll_request
,
1291 (dump_func
)dump_unload_dll_request
,
1292 (dump_func
)dump_queue_apc_request
,
1293 (dump_func
)dump_get_apcs_request
,
1294 (dump_func
)dump_close_handle_request
,
1295 (dump_func
)dump_get_handle_info_request
,
1296 (dump_func
)dump_set_handle_info_request
,
1297 (dump_func
)dump_dup_handle_request
,
1298 (dump_func
)dump_open_process_request
,
1299 (dump_func
)dump_select_request
,
1300 (dump_func
)dump_create_event_request
,
1301 (dump_func
)dump_event_op_request
,
1302 (dump_func
)dump_open_event_request
,
1303 (dump_func
)dump_create_mutex_request
,
1304 (dump_func
)dump_release_mutex_request
,
1305 (dump_func
)dump_open_mutex_request
,
1306 (dump_func
)dump_create_semaphore_request
,
1307 (dump_func
)dump_release_semaphore_request
,
1308 (dump_func
)dump_open_semaphore_request
,
1309 (dump_func
)dump_create_file_request
,
1310 (dump_func
)dump_alloc_file_handle_request
,
1311 (dump_func
)dump_get_read_fd_request
,
1312 (dump_func
)dump_get_write_fd_request
,
1313 (dump_func
)dump_set_file_pointer_request
,
1314 (dump_func
)dump_truncate_file_request
,
1315 (dump_func
)dump_set_file_time_request
,
1316 (dump_func
)dump_flush_file_request
,
1317 (dump_func
)dump_get_file_info_request
,
1318 (dump_func
)dump_lock_file_request
,
1319 (dump_func
)dump_unlock_file_request
,
1320 (dump_func
)dump_create_pipe_request
,
1321 (dump_func
)dump_create_socket_request
,
1322 (dump_func
)dump_accept_socket_request
,
1323 (dump_func
)dump_set_socket_event_request
,
1324 (dump_func
)dump_get_socket_event_request
,
1325 (dump_func
)dump_enable_socket_event_request
,
1326 (dump_func
)dump_alloc_console_request
,
1327 (dump_func
)dump_free_console_request
,
1328 (dump_func
)dump_open_console_request
,
1329 (dump_func
)dump_set_console_fd_request
,
1330 (dump_func
)dump_get_console_mode_request
,
1331 (dump_func
)dump_set_console_mode_request
,
1332 (dump_func
)dump_set_console_info_request
,
1333 (dump_func
)dump_get_console_info_request
,
1334 (dump_func
)dump_write_console_input_request
,
1335 (dump_func
)dump_read_console_input_request
,
1336 (dump_func
)dump_create_change_notification_request
,
1337 (dump_func
)dump_create_mapping_request
,
1338 (dump_func
)dump_open_mapping_request
,
1339 (dump_func
)dump_get_mapping_info_request
,
1340 (dump_func
)dump_create_device_request
,
1341 (dump_func
)dump_create_snapshot_request
,
1342 (dump_func
)dump_next_process_request
,
1343 (dump_func
)dump_wait_debug_event_request
,
1344 (dump_func
)dump_exception_event_request
,
1345 (dump_func
)dump_output_debug_string_request
,
1346 (dump_func
)dump_continue_debug_event_request
,
1347 (dump_func
)dump_debug_process_request
,
1348 (dump_func
)dump_read_process_memory_request
,
1349 (dump_func
)dump_write_process_memory_request
,
1350 (dump_func
)dump_create_key_request
,
1351 (dump_func
)dump_open_key_request
,
1352 (dump_func
)dump_delete_key_request
,
1353 (dump_func
)dump_close_key_request
,
1354 (dump_func
)dump_enum_key_request
,
1355 (dump_func
)dump_query_key_info_request
,
1356 (dump_func
)dump_set_key_value_request
,
1357 (dump_func
)dump_get_key_value_request
,
1358 (dump_func
)dump_enum_key_value_request
,
1359 (dump_func
)dump_delete_key_value_request
,
1360 (dump_func
)dump_load_registry_request
,
1361 (dump_func
)dump_save_registry_request
,
1362 (dump_func
)dump_set_registry_levels_request
,
1363 (dump_func
)dump_create_timer_request
,
1364 (dump_func
)dump_open_timer_request
,
1365 (dump_func
)dump_set_timer_request
,
1366 (dump_func
)dump_cancel_timer_request
,
1367 (dump_func
)dump_get_thread_context_request
,
1368 (dump_func
)dump_set_thread_context_request
,
1369 (dump_func
)dump_get_selector_entry_request
,
1370 (dump_func
)dump_add_atom_request
,
1371 (dump_func
)dump_delete_atom_request
,
1372 (dump_func
)dump_find_atom_request
,
1373 (dump_func
)dump_get_atom_name_request
,
1376 static const dump_func reply_dumpers
[REQ_NB_REQUESTS
] = {
1377 (dump_func
)dump_new_process_reply
,
1378 (dump_func
)dump_new_thread_reply
,
1380 (dump_func
)dump_init_process_reply
,
1381 (dump_func
)dump_init_process_done_reply
,
1383 (dump_func
)dump_get_thread_buffer_reply
,
1384 (dump_func
)dump_terminate_process_reply
,
1385 (dump_func
)dump_terminate_thread_reply
,
1386 (dump_func
)dump_get_process_info_reply
,
1388 (dump_func
)dump_get_thread_info_reply
,
1390 (dump_func
)dump_suspend_thread_reply
,
1391 (dump_func
)dump_resume_thread_reply
,
1395 (dump_func
)dump_get_apcs_reply
,
1397 (dump_func
)dump_get_handle_info_reply
,
1399 (dump_func
)dump_dup_handle_reply
,
1400 (dump_func
)dump_open_process_reply
,
1401 (dump_func
)dump_select_reply
,
1402 (dump_func
)dump_create_event_reply
,
1404 (dump_func
)dump_open_event_reply
,
1405 (dump_func
)dump_create_mutex_reply
,
1407 (dump_func
)dump_open_mutex_reply
,
1408 (dump_func
)dump_create_semaphore_reply
,
1409 (dump_func
)dump_release_semaphore_reply
,
1410 (dump_func
)dump_open_semaphore_reply
,
1411 (dump_func
)dump_create_file_reply
,
1412 (dump_func
)dump_alloc_file_handle_reply
,
1415 (dump_func
)dump_set_file_pointer_reply
,
1419 (dump_func
)dump_get_file_info_reply
,
1422 (dump_func
)dump_create_pipe_reply
,
1423 (dump_func
)dump_create_socket_reply
,
1424 (dump_func
)dump_accept_socket_reply
,
1426 (dump_func
)dump_get_socket_event_reply
,
1428 (dump_func
)dump_alloc_console_reply
,
1430 (dump_func
)dump_open_console_reply
,
1432 (dump_func
)dump_get_console_mode_reply
,
1435 (dump_func
)dump_get_console_info_reply
,
1436 (dump_func
)dump_write_console_input_reply
,
1437 (dump_func
)dump_read_console_input_reply
,
1438 (dump_func
)dump_create_change_notification_reply
,
1439 (dump_func
)dump_create_mapping_reply
,
1440 (dump_func
)dump_open_mapping_reply
,
1441 (dump_func
)dump_get_mapping_info_reply
,
1442 (dump_func
)dump_create_device_reply
,
1443 (dump_func
)dump_create_snapshot_reply
,
1444 (dump_func
)dump_next_process_reply
,
1445 (dump_func
)dump_wait_debug_event_reply
,
1446 (dump_func
)dump_exception_event_reply
,
1450 (dump_func
)dump_read_process_memory_reply
,
1452 (dump_func
)dump_create_key_reply
,
1453 (dump_func
)dump_open_key_reply
,
1456 (dump_func
)dump_enum_key_reply
,
1457 (dump_func
)dump_query_key_info_reply
,
1459 (dump_func
)dump_get_key_value_reply
,
1460 (dump_func
)dump_enum_key_value_reply
,
1465 (dump_func
)dump_create_timer_reply
,
1466 (dump_func
)dump_open_timer_reply
,
1469 (dump_func
)dump_get_thread_context_reply
,
1471 (dump_func
)dump_get_selector_entry_reply
,
1472 (dump_func
)dump_add_atom_reply
,
1474 (dump_func
)dump_find_atom_reply
,
1475 (dump_func
)dump_get_atom_name_reply
,
1478 static const char * const req_names
[REQ_NB_REQUESTS
] = {
1483 "init_process_done",
1485 "get_thread_buffer",
1486 "terminate_process",
1511 "release_semaphore",
1514 "alloc_file_handle",
1529 "enable_socket_event",
1538 "write_console_input",
1539 "read_console_input",
1540 "create_change_notification",
1549 "output_debug_string",
1550 "continue_debug_event",
1552 "read_process_memory",
1553 "write_process_memory",
1566 "set_registry_levels",
1571 "get_thread_context",
1572 "set_thread_context",
1573 "get_selector_entry",
1580 /* ### make_requests end ### */
1581 /* Everything above this line is generated automatically by tools/make_requests */
1583 void trace_request( enum request req
)
1585 current
->last_req
= req
;
1586 if (req
< REQ_NB_REQUESTS
)
1588 fprintf( stderr
, "%08x: %s(", (unsigned int)current
, req_names
[req
] );
1589 req_dumpers
[req
]( current
->buffer
);
1592 fprintf( stderr
, "%08x: %d(", (unsigned int)current
, req
);
1593 if (current
->pass_fd
!= -1) fprintf( stderr
, " ) fd=%d\n", current
->pass_fd
);
1594 else fprintf( stderr
, " )\n" );
1597 void trace_reply( struct thread
*thread
)
1599 fprintf( stderr
, "%08x: %s() = %x",
1600 (unsigned int)thread
, req_names
[thread
->last_req
], thread
->error
);
1601 if (reply_dumpers
[thread
->last_req
])
1603 fprintf( stderr
, " {" );
1604 reply_dumpers
[thread
->last_req
]( thread
->buffer
);
1605 fprintf( stderr
, " }" );
1607 if (thread
->pass_fd
!= -1) fprintf( stderr
, " fd=%d\n", thread
->pass_fd
);
1608 else fprintf( stderr
, "\n" );