2 * Server request tracing
4 * Copyright (C) 1999 Alexandre Julliard
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 #include "wine/port.h"
26 #include <sys/types.h>
36 static const void *cur_data;
39 /* utility functions */
41 inline static void remove_data( size_t size )
43 cur_data = (const char *)cur_data + size;
47 static void dump_uints( const int *ptr, int len )
52 fprintf( stderr, "%08x", *ptr++ );
53 if (--len) fputc( ',', stderr );
58 static void dump_rectangle( const rectangle_t *rect )
60 fprintf( stderr, "{%d,%d;%d,%d}",
61 rect->left, rect->top, rect->right, rect->bottom );
64 static void dump_char_info( const char_info_t *info )
66 fprintf( stderr, "{'" );
67 dump_strW( &info->ch, 1, stderr, "\'\'" );
68 fprintf( stderr, "',%04x}", info->attr );
71 static void dump_context( const CONTEXT *context )
74 fprintf( stderr, "{flags=%08lx,eax=%08lx,ebx=%08lx,ecx=%08lx,edx=%08lx,esi=%08lx,edi=%08lx,"
75 "ebp=%08lx,eip=%08lx,esp=%08lx,eflags=%08lx,cs=%04lx,ds=%04lx,es=%04lx,"
76 "fs=%04lx,gs=%04lx,dr0=%08lx,dr1=%08lx,dr2=%08lx,dr3=%08lx,dr6=%08lx,dr7=%08lx,",
77 context->ContextFlags, context->Eax, context->Ebx, context->Ecx, context->Edx,
78 context->Esi, context->Edi, context->Ebp, context->Eip, context->Esp, context->EFlags,
79 context->SegCs, context->SegDs, context->SegEs, context->SegFs, context->SegGs,
80 context->Dr0, context->Dr1, context->Dr2, context->Dr3, context->Dr6, context->Dr7 );
81 fprintf( stderr, "float=" );
82 dump_uints( (int *)&context->FloatSave, sizeof(context->FloatSave) / sizeof(int) );
83 fprintf( stderr, "}" );
85 dump_uints( (int *)context, sizeof(*context) / sizeof(int) );
89 static void dump_exc_record( const EXCEPTION_RECORD *rec )
92 fprintf( stderr, "{code=%lx,flags=%lx,rec=%p,addr=%p,params={",
93 rec->ExceptionCode, rec->ExceptionFlags, rec->ExceptionRecord,
94 rec->ExceptionAddress );
95 for (i = 0; i < min(rec->NumberParameters,EXCEPTION_MAXIMUM_PARAMETERS); i++)
97 if (i) fputc( ',', stderr );
98 fprintf( stderr, "%lx", rec->ExceptionInformation[i] );
100 fputc( '}', stderr );
103 static void dump_varargs_ints( size_t size )
105 const int *data = cur_data;
106 size_t len = size / sizeof(*data);
108 fputc( '{', stderr );
111 fprintf( stderr, "%d", *data++ );
112 if (--len) fputc( ',', stderr );
114 fputc( '}', stderr );
118 static void dump_varargs_handles( size_t size )
120 const obj_handle_t *data = cur_data;
121 size_t len = size / sizeof(*data);
123 fputc( '{', stderr );
126 fprintf( stderr, "%d", *data++ );
127 if (--len) fputc( ',', stderr );
129 fputc( '}', stderr );
133 static void dump_varargs_ptrs( size_t size )
135 void * const *data = cur_data;
136 size_t len = size / sizeof(*data);
138 fputc( '{', stderr );
141 fprintf( stderr, "%p", *data++ );
142 if (--len) fputc( ',', stderr );
144 fputc( '}', stderr );
148 static void dump_varargs_user_handles( size_t size )
150 const user_handle_t *data = cur_data;
151 size_t len = size / sizeof(*data);
153 fputc( '{', stderr );
156 fprintf( stderr, "%08x", *data++ );
157 if (--len) fputc( ',', stderr );
159 fputc( '}', stderr );
163 static void dump_varargs_bytes( size_t size )
165 const unsigned char *data = cur_data;
168 fputc( '{', stderr );
171 fprintf( stderr, "%02x", *data++ );
172 if (--len) fputc( ',', stderr );
174 fputc( '}', stderr );
178 static void dump_varargs_string( size_t size )
180 fprintf( stderr, "\"%.*s\"", (int)size, (char *)cur_data );
184 static void dump_varargs_unicode_str( size_t size )
186 fprintf( stderr, "L\"" );
187 dump_strW( cur_data, size / sizeof(WCHAR), stderr, "\"\"" );
188 fputc( '\"', stderr );
192 static void dump_varargs_context( size_t size )
194 dump_context( cur_data );
198 static void dump_varargs_exc_event( size_t size )
200 const CONTEXT *ptr = cur_data;
201 fprintf( stderr, "{context=" );
203 fprintf( stderr, ",rec=" );
204 dump_exc_record( (EXCEPTION_RECORD *)(ptr + 1) );
205 fputc( '}', stderr );
209 static void dump_varargs_debug_event( size_t size )
211 const debug_event_t *event = cur_data;
215 fprintf( stderr, "{}" );
220 case EXCEPTION_DEBUG_EVENT:
221 fprintf( stderr, "{exception," );
222 dump_exc_record( &event->info.exception.record );
223 fprintf( stderr, ",first=%d}", event->info.exception.first );
225 case CREATE_THREAD_DEBUG_EVENT:
226 fprintf( stderr, "{create_thread,thread=%d,teb=%p,start=%p}",
227 event->info.create_thread.handle, event->info.create_thread.teb,
228 event->info.create_thread.start );
230 case CREATE_PROCESS_DEBUG_EVENT:
231 fprintf( stderr, "{create_process,file=%d,process=%d,thread=%d,base=%p,offset=%d,"
232 "size=%d,teb=%p,start=%p,name=%p,unicode=%d}",
233 event->info.create_process.file, event->info.create_process.process,
234 event->info.create_process.thread, event->info.create_process.base,
235 event->info.create_process.dbg_offset, event->info.create_process.dbg_size,
236 event->info.create_process.teb, event->info.create_process.start,
237 event->info.create_process.name, event->info.create_process.unicode );
239 case EXIT_THREAD_DEBUG_EVENT:
240 fprintf( stderr, "{exit_thread,code=%d}", event->info.exit.exit_code );
242 case EXIT_PROCESS_DEBUG_EVENT:
243 fprintf( stderr, "{exit_process,code=%d}", event->info.exit.exit_code );
245 case LOAD_DLL_DEBUG_EVENT:
246 fprintf( stderr, "{load_dll,file=%d,base=%p,offset=%d,size=%d,name=%p,unicode=%d}",
247 event->info.load_dll.handle, event->info.load_dll.base,
248 event->info.load_dll.dbg_offset, event->info.load_dll.dbg_size,
249 event->info.load_dll.name, event->info.load_dll.unicode );
251 case UNLOAD_DLL_DEBUG_EVENT:
252 fprintf( stderr, "{unload_dll,base=%p}", event->info.unload_dll.base );
254 case OUTPUT_DEBUG_STRING_EVENT:
255 fprintf( stderr, "{output_string,data=%p,unicode=%d,len=%d}",
256 event->info.output_string.string, event->info.output_string.unicode,
257 event->info.output_string.length );
260 fprintf( stderr, "{rip,err=%d,type=%d}",
261 event->info.rip_info.error, event->info.rip_info.type );
263 case 0: /* zero is the code returned on timeouts */
264 fprintf( stderr, "{}" );
267 fprintf( stderr, "{code=??? (%d)}", event->code );
273 static void dump_varargs_startup_info( size_t size )
275 const startup_info_t *ptr = cur_data;
278 if (size < sizeof(info.size))
280 fprintf( stderr, "{}" );
283 if (size > ptr->size) size = ptr->size;
284 memset( &info, 0, sizeof(info) );
285 memcpy( &info, ptr, min( size, sizeof(info) ));
287 fprintf( stderr, "{size=%d", info.size );
288 fprintf( stderr, ",x=%d", info.x );
289 fprintf( stderr, ",y=%d", info.y );
290 fprintf( stderr, ",cx=%d", info.cx );
291 fprintf( stderr, ",cy=%d", info.cy );
292 fprintf( stderr, ",x_chars=%d", info.x_chars );
293 fprintf( stderr, ",y_chars=%d", info.y_chars );
294 fprintf( stderr, ",attr=%d", info.attribute );
295 fprintf( stderr, ",cmd_show=%d", info.cmd_show );
296 fprintf( stderr, ",flags=%x", info.flags );
298 fprintf( stderr, ",filename=" );
299 /* FIXME: these should be unicode */
300 dump_varargs_string( min(cur_size,info.filename_len) );
301 fprintf( stderr, ",cmdline=" );
302 dump_varargs_string( min(cur_size,info.cmdline_len) );
303 fprintf( stderr, ",desktop=" );
304 dump_varargs_string( min(cur_size,info.desktop_len) );
305 fprintf( stderr, ",title=" );
306 dump_varargs_string( min(cur_size,info.title_len) );
307 fputc( '}', stderr );
310 static void dump_varargs_input_records( size_t size )
312 const INPUT_RECORD *rec = cur_data;
313 size_t len = size / sizeof(*rec);
315 fputc( '{', stderr );
318 fprintf( stderr, "{%04x,...}", rec->EventType );
320 if (--len) fputc( ',', stderr );
322 fputc( '}', stderr );
326 static void dump_varargs_properties( size_t size )
328 const property_data_t *prop = cur_data;
329 size_t len = size / sizeof(*prop);
331 fputc( '{', stderr );
334 fprintf( stderr, "{atom=%04x,str=%d,handle=%08x}",
335 prop->atom, prop->string, prop->handle );
337 if (--len) fputc( ',', stderr );
339 fputc( '}', stderr );
343 typedef void (*dump_func)( const void *req );
345 /* Everything below this line is generated automatically by tools/make_requests */
346 /* ### make_requests begin ### */
348 static void dump_new_process_request( const struct new_process_request *req )
350 fprintf( stderr, " inherit_all=%d,", req->inherit_all );
351 fprintf( stderr, " use_handles=%d,", req->use_handles );
352 fprintf( stderr, " create_flags=%d,", req->create_flags );
353 fprintf( stderr, " exe_file=%d,", req->exe_file );
354 fprintf( stderr, " hstdin=%d,", req->hstdin );
355 fprintf( stderr, " hstdout=%d,", req->hstdout );
356 fprintf( stderr, " hstderr=%d,", req->hstderr );
357 fprintf( stderr, " info=" );
358 dump_varargs_startup_info( cur_size );
361 static void dump_new_process_reply( const struct new_process_reply *req )
363 fprintf( stderr, " info=%d", req->info );
366 static void dump_get_new_process_info_request( const struct get_new_process_info_request *req )
368 fprintf( stderr, " info=%d,", req->info );
369 fprintf( stderr, " pinherit=%d,", req->pinherit );
370 fprintf( stderr, " tinherit=%d", req->tinherit );
373 static void dump_get_new_process_info_reply( const struct get_new_process_info_reply *req )
375 fprintf( stderr, " pid=%p,", req->pid );
376 fprintf( stderr, " phandle=%d,", req->phandle );
377 fprintf( stderr, " tid=%p,", req->tid );
378 fprintf( stderr, " thandle=%d,", req->thandle );
379 fprintf( stderr, " success=%d", req->success );
382 static void dump_new_thread_request( const struct new_thread_request *req )
384 fprintf( stderr, " suspend=%d,", req->suspend );
385 fprintf( stderr, " inherit=%d,", req->inherit );
386 fprintf( stderr, " request_fd=%d", req->request_fd );
389 static void dump_new_thread_reply( const struct new_thread_reply *req )
391 fprintf( stderr, " tid=%p,", req->tid );
392 fprintf( stderr, " handle=%d", req->handle );
395 static void dump_boot_done_request( const struct boot_done_request *req )
397 fprintf( stderr, " debug_level=%d", req->debug_level );
400 static void dump_init_process_request( const struct init_process_request *req )
402 fprintf( stderr, " ldt_copy=%p,", req->ldt_copy );
403 fprintf( stderr, " ppid=%d", req->ppid );
406 static void dump_init_process_reply( const struct init_process_reply *req )
408 fprintf( stderr, " create_flags=%d,", req->create_flags );
409 fprintf( stderr, " server_start=%08x,", req->server_start );
410 fprintf( stderr, " info_size=%d,", req->info_size );
411 fprintf( stderr, " exe_file=%d,", req->exe_file );
412 fprintf( stderr, " hstdin=%d,", req->hstdin );
413 fprintf( stderr, " hstdout=%d,", req->hstdout );
414 fprintf( stderr, " hstderr=%d", req->hstderr );
417 static void dump_get_startup_info_request( const struct get_startup_info_request *req )
421 static void dump_get_startup_info_reply( const struct get_startup_info_reply *req )
423 fprintf( stderr, " info=" );
424 dump_varargs_startup_info( cur_size );
427 static void dump_init_process_done_request( const struct init_process_done_request *req )
429 fprintf( stderr, " module=%p,", req->module );
430 fprintf( stderr, " module_size=%d,", req->module_size );
431 fprintf( stderr, " entry=%p,", req->entry );
432 fprintf( stderr, " name=%p,", req->name );
433 fprintf( stderr, " exe_file=%d,", req->exe_file );
434 fprintf( stderr, " gui=%d,", req->gui );
435 fprintf( stderr, " filename=" );
436 dump_varargs_string( cur_size );
439 static void dump_init_process_done_reply( const struct init_process_done_reply *req )
441 fprintf( stderr, " debugged=%d", req->debugged );
444 static void dump_init_thread_request( const struct init_thread_request *req )
446 fprintf( stderr, " unix_pid=%d,", req->unix_pid );
447 fprintf( stderr, " teb=%p,", req->teb );
448 fprintf( stderr, " entry=%p,", req->entry );
449 fprintf( stderr, " reply_fd=%d,", req->reply_fd );
450 fprintf( stderr, " wait_fd=%d", req->wait_fd );
453 static void dump_init_thread_reply( const struct init_thread_reply *req )
455 fprintf( stderr, " pid=%p,", req->pid );
456 fprintf( stderr, " tid=%p,", req->tid );
457 fprintf( stderr, " boot=%d,", req->boot );
458 fprintf( stderr, " version=%d", req->version );
461 static void dump_terminate_process_request( const struct terminate_process_request *req )
463 fprintf( stderr, " handle=%d,", req->handle );
464 fprintf( stderr, " exit_code=%d", req->exit_code );
467 static void dump_terminate_process_reply( const struct terminate_process_reply *req )
469 fprintf( stderr, " self=%d", req->self );
472 static void dump_terminate_thread_request( const struct terminate_thread_request *req )
474 fprintf( stderr, " handle=%d,", req->handle );
475 fprintf( stderr, " exit_code=%d", req->exit_code );
478 static void dump_terminate_thread_reply( const struct terminate_thread_reply *req )
480 fprintf( stderr, " self=%d,", req->self );
481 fprintf( stderr, " last=%d", req->last );
484 static void dump_get_process_info_request( const struct get_process_info_request *req )
486 fprintf( stderr, " handle=%d", req->handle );
489 static void dump_get_process_info_reply( const struct get_process_info_reply *req )
491 fprintf( stderr, " pid=%p,", req->pid );
492 fprintf( stderr, " debugged=%d,", req->debugged );
493 fprintf( stderr, " exit_code=%d,", req->exit_code );
494 fprintf( stderr, " priority=%d,", req->priority );
495 fprintf( stderr, " process_affinity=%d,", req->process_affinity );
496 fprintf( stderr, " system_affinity=%d", req->system_affinity );
499 static void dump_set_process_info_request( const struct set_process_info_request *req )
501 fprintf( stderr, " handle=%d,", req->handle );
502 fprintf( stderr, " mask=%d,", req->mask );
503 fprintf( stderr, " priority=%d,", req->priority );
504 fprintf( stderr, " affinity=%d", req->affinity );
507 static void dump_get_thread_info_request( const struct get_thread_info_request *req )
509 fprintf( stderr, " handle=%d,", req->handle );
510 fprintf( stderr, " tid_in=%p", req->tid_in );
513 static void dump_get_thread_info_reply( const struct get_thread_info_reply *req )
515 fprintf( stderr, " tid=%p,", req->tid );
516 fprintf( stderr, " teb=%p,", req->teb );
517 fprintf( stderr, " exit_code=%d,", req->exit_code );
518 fprintf( stderr, " priority=%d", req->priority );
521 static void dump_set_thread_info_request( const struct set_thread_info_request *req )
523 fprintf( stderr, " handle=%d,", req->handle );
524 fprintf( stderr, " mask=%d,", req->mask );
525 fprintf( stderr, " priority=%d,", req->priority );
526 fprintf( stderr, " affinity=%d", req->affinity );
529 static void dump_suspend_thread_request( const struct suspend_thread_request *req )
531 fprintf( stderr, " handle=%d", req->handle );
534 static void dump_suspend_thread_reply( const struct suspend_thread_reply *req )
536 fprintf( stderr, " count=%d", req->count );
539 static void dump_resume_thread_request( const struct resume_thread_request *req )
541 fprintf( stderr, " handle=%d", req->handle );
544 static void dump_resume_thread_reply( const struct resume_thread_reply *req )
546 fprintf( stderr, " count=%d", req->count );
549 static void dump_load_dll_request( const struct load_dll_request *req )
551 fprintf( stderr, " handle=%d,", req->handle );
552 fprintf( stderr, " base=%p,", req->base );
553 fprintf( stderr, " size=%d,", req->size );
554 fprintf( stderr, " dbg_offset=%d,", req->dbg_offset );
555 fprintf( stderr, " dbg_size=%d,", req->dbg_size );
556 fprintf( stderr, " name=%p,", req->name );
557 fprintf( stderr, " filename=" );
558 dump_varargs_string( cur_size );
561 static void dump_unload_dll_request( const struct unload_dll_request *req )
563 fprintf( stderr, " base=%p", req->base );
566 static void dump_queue_apc_request( const struct queue_apc_request *req )
568 fprintf( stderr, " handle=%d,", req->handle );
569 fprintf( stderr, " user=%d,", req->user );
570 fprintf( stderr, " func=%p,", req->func );
571 fprintf( stderr, " param=%p", req->param );
574 static void dump_get_apc_request( const struct get_apc_request *req )
576 fprintf( stderr, " alertable=%d", req->alertable );
579 static void dump_get_apc_reply( const struct get_apc_reply *req )
581 fprintf( stderr, " func=%p,", req->func );
582 fprintf( stderr, " type=%d,", req->type );
583 fprintf( stderr, " args=" );
584 dump_varargs_ptrs( cur_size );
587 static void dump_close_handle_request( const struct close_handle_request *req )
589 fprintf( stderr, " handle=%d", req->handle );
592 static void dump_close_handle_reply( const struct close_handle_reply *req )
594 fprintf( stderr, " fd=%d", req->fd );
597 static void dump_set_handle_info_request( const struct set_handle_info_request *req )
599 fprintf( stderr, " handle=%d,", req->handle );
600 fprintf( stderr, " flags=%d,", req->flags );
601 fprintf( stderr, " mask=%d,", req->mask );
602 fprintf( stderr, " fd=%d", req->fd );
605 static void dump_set_handle_info_reply( const struct set_handle_info_reply *req )
607 fprintf( stderr, " old_flags=%d,", req->old_flags );
608 fprintf( stderr, " cur_fd=%d", req->cur_fd );
611 static void dump_dup_handle_request( const struct dup_handle_request *req )
613 fprintf( stderr, " src_process=%d,", req->src_process );
614 fprintf( stderr, " src_handle=%d,", req->src_handle );
615 fprintf( stderr, " dst_process=%d,", req->dst_process );
616 fprintf( stderr, " access=%08x,", req->access );
617 fprintf( stderr, " inherit=%d,", req->inherit );
618 fprintf( stderr, " options=%d", req->options );
621 static void dump_dup_handle_reply( const struct dup_handle_reply *req )
623 fprintf( stderr, " handle=%d,", req->handle );
624 fprintf( stderr, " fd=%d", req->fd );
627 static void dump_open_process_request( const struct open_process_request *req )
629 fprintf( stderr, " pid=%p,", req->pid );
630 fprintf( stderr, " access=%08x,", req->access );
631 fprintf( stderr, " inherit=%d", req->inherit );
634 static void dump_open_process_reply( const struct open_process_reply *req )
636 fprintf( stderr, " handle=%d", req->handle );
639 static void dump_open_thread_request( const struct open_thread_request *req )
641 fprintf( stderr, " tid=%p,", req->tid );
642 fprintf( stderr, " access=%08x,", req->access );
643 fprintf( stderr, " inherit=%d", req->inherit );
646 static void dump_open_thread_reply( const struct open_thread_reply *req )
648 fprintf( stderr, " handle=%d", req->handle );
651 static void dump_select_request( const struct select_request *req )
653 fprintf( stderr, " flags=%d,", req->flags );
654 fprintf( stderr, " cookie=%p,", req->cookie );
655 fprintf( stderr, " sec=%d,", req->sec );
656 fprintf( stderr, " usec=%d,", req->usec );
657 fprintf( stderr, " handles=" );
658 dump_varargs_handles( cur_size );
661 static void dump_create_event_request( const struct create_event_request *req )
663 fprintf( stderr, " manual_reset=%d,", req->manual_reset );
664 fprintf( stderr, " initial_state=%d,", req->initial_state );
665 fprintf( stderr, " inherit=%d,", req->inherit );
666 fprintf( stderr, " name=" );
667 dump_varargs_unicode_str( cur_size );
670 static void dump_create_event_reply( const struct create_event_reply *req )
672 fprintf( stderr, " handle=%d", req->handle );
675 static void dump_event_op_request( const struct event_op_request *req )
677 fprintf( stderr, " handle=%d,", req->handle );
678 fprintf( stderr, " op=%d", req->op );
681 static void dump_open_event_request( const struct open_event_request *req )
683 fprintf( stderr, " access=%08x,", req->access );
684 fprintf( stderr, " inherit=%d,", req->inherit );
685 fprintf( stderr, " name=" );
686 dump_varargs_unicode_str( cur_size );
689 static void dump_open_event_reply( const struct open_event_reply *req )
691 fprintf( stderr, " handle=%d", req->handle );
694 static void dump_create_mutex_request( const struct create_mutex_request *req )
696 fprintf( stderr, " owned=%d,", req->owned );
697 fprintf( stderr, " inherit=%d,", req->inherit );
698 fprintf( stderr, " name=" );
699 dump_varargs_unicode_str( cur_size );
702 static void dump_create_mutex_reply( const struct create_mutex_reply *req )
704 fprintf( stderr, " handle=%d", req->handle );
707 static void dump_release_mutex_request( const struct release_mutex_request *req )
709 fprintf( stderr, " handle=%d", req->handle );
712 static void dump_open_mutex_request( const struct open_mutex_request *req )
714 fprintf( stderr, " access=%08x,", req->access );
715 fprintf( stderr, " inherit=%d,", req->inherit );
716 fprintf( stderr, " name=" );
717 dump_varargs_unicode_str( cur_size );
720 static void dump_open_mutex_reply( const struct open_mutex_reply *req )
722 fprintf( stderr, " handle=%d", req->handle );
725 static void dump_create_semaphore_request( const struct create_semaphore_request *req )
727 fprintf( stderr, " initial=%08x,", req->initial );
728 fprintf( stderr, " max=%08x,", req->max );
729 fprintf( stderr, " inherit=%d,", req->inherit );
730 fprintf( stderr, " name=" );
731 dump_varargs_unicode_str( cur_size );
734 static void dump_create_semaphore_reply( const struct create_semaphore_reply *req )
736 fprintf( stderr, " handle=%d", req->handle );
739 static void dump_release_semaphore_request( const struct release_semaphore_request *req )
741 fprintf( stderr, " handle=%d,", req->handle );
742 fprintf( stderr, " count=%08x", req->count );
745 static void dump_release_semaphore_reply( const struct release_semaphore_reply *req )
747 fprintf( stderr, " prev_count=%08x", req->prev_count );
750 static void dump_open_semaphore_request( const struct open_semaphore_request *req )
752 fprintf( stderr, " access=%08x,", req->access );
753 fprintf( stderr, " inherit=%d,", req->inherit );
754 fprintf( stderr, " name=" );
755 dump_varargs_unicode_str( cur_size );
758 static void dump_open_semaphore_reply( const struct open_semaphore_reply *req )
760 fprintf( stderr, " handle=%d", req->handle );
763 static void dump_create_file_request( const struct create_file_request *req )
765 fprintf( stderr, " access=%08x,", req->access );
766 fprintf( stderr, " inherit=%d,", req->inherit );
767 fprintf( stderr, " sharing=%08x,", req->sharing );
768 fprintf( stderr, " create=%d,", req->create );
769 fprintf( stderr, " attrs=%08x,", req->attrs );
770 fprintf( stderr, " drive_type=%d,", req->drive_type );
771 fprintf( stderr, " filename=" );
772 dump_varargs_string( cur_size );
775 static void dump_create_file_reply( const struct create_file_reply *req )
777 fprintf( stderr, " handle=%d", req->handle );
780 static void dump_alloc_file_handle_request( const struct alloc_file_handle_request *req )
782 fprintf( stderr, " access=%08x,", req->access );
783 fprintf( stderr, " inherit=%d,", req->inherit );
784 fprintf( stderr, " fd=%d", req->fd );
787 static void dump_alloc_file_handle_reply( const struct alloc_file_handle_reply *req )
789 fprintf( stderr, " handle=%d", req->handle );
792 static void dump_get_handle_fd_request( const struct get_handle_fd_request *req )
794 fprintf( stderr, " handle=%d,", req->handle );
795 fprintf( stderr, " access=%08x", req->access );
798 static void dump_get_handle_fd_reply( const struct get_handle_fd_reply *req )
800 fprintf( stderr, " fd=%d,", req->fd );
801 fprintf( stderr, " type=%d,", req->type );
802 fprintf( stderr, " flags=%d", req->flags );
805 static void dump_set_file_pointer_request( const struct set_file_pointer_request *req )
807 fprintf( stderr, " handle=%d,", req->handle );
808 fprintf( stderr, " low=%d,", req->low );
809 fprintf( stderr, " high=%d,", req->high );
810 fprintf( stderr, " whence=%d", req->whence );
813 static void dump_set_file_pointer_reply( const struct set_file_pointer_reply *req )
815 fprintf( stderr, " new_low=%d,", req->new_low );
816 fprintf( stderr, " new_high=%d", req->new_high );
819 static void dump_truncate_file_request( const struct truncate_file_request *req )
821 fprintf( stderr, " handle=%d", req->handle );
824 static void dump_set_file_time_request( const struct set_file_time_request *req )
826 fprintf( stderr, " handle=%d,", req->handle );
827 fprintf( stderr, " access_time=%ld,", req->access_time );
828 fprintf( stderr, " write_time=%ld", req->write_time );
831 static void dump_flush_file_request( const struct flush_file_request *req )
833 fprintf( stderr, " handle=%d", req->handle );
836 static void dump_get_file_info_request( const struct get_file_info_request *req )
838 fprintf( stderr, " handle=%d", req->handle );
841 static void dump_get_file_info_reply( const struct get_file_info_reply *req )
843 fprintf( stderr, " type=%d,", req->type );
844 fprintf( stderr, " attr=%d,", req->attr );
845 fprintf( stderr, " access_time=%ld,", req->access_time );
846 fprintf( stderr, " write_time=%ld,", req->write_time );
847 fprintf( stderr, " size_high=%d,", req->size_high );
848 fprintf( stderr, " size_low=%d,", req->size_low );
849 fprintf( stderr, " links=%d,", req->links );
850 fprintf( stderr, " index_high=%d,", req->index_high );
851 fprintf( stderr, " index_low=%d,", req->index_low );
852 fprintf( stderr, " serial=%08x", req->serial );
855 static void dump_lock_file_request( const struct lock_file_request *req )
857 fprintf( stderr, " handle=%d,", req->handle );
858 fprintf( stderr, " offset_low=%08x,", req->offset_low );
859 fprintf( stderr, " offset_high=%08x,", req->offset_high );
860 fprintf( stderr, " count_low=%08x,", req->count_low );
861 fprintf( stderr, " count_high=%08x", req->count_high );
864 static void dump_unlock_file_request( const struct unlock_file_request *req )
866 fprintf( stderr, " handle=%d,", req->handle );
867 fprintf( stderr, " offset_low=%08x,", req->offset_low );
868 fprintf( stderr, " offset_high=%08x,", req->offset_high );
869 fprintf( stderr, " count_low=%08x,", req->count_low );
870 fprintf( stderr, " count_high=%08x", req->count_high );
873 static void dump_create_pipe_request( const struct create_pipe_request *req )
875 fprintf( stderr, " inherit=%d", req->inherit );
878 static void dump_create_pipe_reply( const struct create_pipe_reply *req )
880 fprintf( stderr, " handle_read=%d,", req->handle_read );
881 fprintf( stderr, " handle_write=%d", req->handle_write );
884 static void dump_create_socket_request( const struct create_socket_request *req )
886 fprintf( stderr, " access=%08x,", req->access );
887 fprintf( stderr, " inherit=%d,", req->inherit );
888 fprintf( stderr, " family=%d,", req->family );
889 fprintf( stderr, " type=%d,", req->type );
890 fprintf( stderr, " protocol=%d,", req->protocol );
891 fprintf( stderr, " flags=%08x", req->flags );
894 static void dump_create_socket_reply( const struct create_socket_reply *req )
896 fprintf( stderr, " handle=%d", req->handle );
899 static void dump_accept_socket_request( const struct accept_socket_request *req )
901 fprintf( stderr, " lhandle=%d,", req->lhandle );
902 fprintf( stderr, " access=%08x,", req->access );
903 fprintf( stderr, " inherit=%d", req->inherit );
906 static void dump_accept_socket_reply( const struct accept_socket_reply *req )
908 fprintf( stderr, " handle=%d", req->handle );
911 static void dump_set_socket_event_request( const struct set_socket_event_request *req )
913 fprintf( stderr, " handle=%d,", req->handle );
914 fprintf( stderr, " mask=%08x,", req->mask );
915 fprintf( stderr, " event=%d,", req->event );
916 fprintf( stderr, " window=%08x,", req->window );
917 fprintf( stderr, " msg=%08x", req->msg );
920 static void dump_get_socket_event_request( const struct get_socket_event_request *req )
922 fprintf( stderr, " handle=%d,", req->handle );
923 fprintf( stderr, " service=%d,", req->service );
924 fprintf( stderr, " c_event=%d", req->c_event );
927 static void dump_get_socket_event_reply( const struct get_socket_event_reply *req )
929 fprintf( stderr, " mask=%08x,", req->mask );
930 fprintf( stderr, " pmask=%08x,", req->pmask );
931 fprintf( stderr, " state=%08x,", req->state );
932 fprintf( stderr, " errors=" );
933 dump_varargs_ints( cur_size );
936 static void dump_enable_socket_event_request( const struct enable_socket_event_request *req )
938 fprintf( stderr, " handle=%d,", req->handle );
939 fprintf( stderr, " mask=%08x,", req->mask );
940 fprintf( stderr, " sstate=%08x,", req->sstate );
941 fprintf( stderr, " cstate=%08x", req->cstate );
944 static void dump_set_socket_deferred_request( const struct set_socket_deferred_request *req )
946 fprintf( stderr, " handle=%d,", req->handle );
947 fprintf( stderr, " deferred=%d", req->deferred );
950 static void dump_alloc_console_request( const struct alloc_console_request *req )
952 fprintf( stderr, " access=%08x,", req->access );
953 fprintf( stderr, " inherit=%d,", req->inherit );
954 fprintf( stderr, " pid=%p", req->pid );
957 static void dump_alloc_console_reply( const struct alloc_console_reply *req )
959 fprintf( stderr, " handle_in=%d,", req->handle_in );
960 fprintf( stderr, " event=%d", req->event );
963 static void dump_free_console_request( const struct free_console_request *req )
967 static void dump_get_console_renderer_events_request( const struct get_console_renderer_events_request *req )
969 fprintf( stderr, " handle=%d", req->handle );
972 static void dump_get_console_renderer_events_reply( const struct get_console_renderer_events_reply *req )
974 fprintf( stderr, " data=" );
975 dump_varargs_bytes( cur_size );
978 static void dump_open_console_request( const struct open_console_request *req )
980 fprintf( stderr, " from=%d,", req->from );
981 fprintf( stderr, " access=%08x,", req->access );
982 fprintf( stderr, " inherit=%d,", req->inherit );
983 fprintf( stderr, " share=%d", req->share );
986 static void dump_open_console_reply( const struct open_console_reply *req )
988 fprintf( stderr, " handle=%d", req->handle );
991 static void dump_get_console_mode_request( const struct get_console_mode_request *req )
993 fprintf( stderr, " handle=%d", req->handle );
996 static void dump_get_console_mode_reply( const struct get_console_mode_reply *req )
998 fprintf( stderr, " mode=%d", req->mode );
1001 static void dump_set_console_mode_request( const struct set_console_mode_request *req )
1003 fprintf( stderr, " handle=%d,", req->handle );
1004 fprintf( stderr, " mode=%d", req->mode );
1007 static void dump_set_console_input_info_request( const struct set_console_input_info_request *req )
1009 fprintf( stderr, " handle=%d,", req->handle );
1010 fprintf( stderr, " mask=%d,", req->mask );
1011 fprintf( stderr, " active_sb=%d,", req->active_sb );
1012 fprintf( stderr, " history_mode=%d,", req->history_mode );
1013 fprintf( stderr, " history_size=%d,", req->history_size );
1014 fprintf( stderr, " title=" );
1015 dump_varargs_unicode_str( cur_size );
1018 static void dump_get_console_input_info_request( const struct get_console_input_info_request *req )
1020 fprintf( stderr, " handle=%d", req->handle );
1023 static void dump_get_console_input_info_reply( const struct get_console_input_info_reply *req )
1025 fprintf( stderr, " history_mode=%d,", req->history_mode );
1026 fprintf( stderr, " history_size=%d,", req->history_size );
1027 fprintf( stderr, " history_index=%d,", req->history_index );
1028 fprintf( stderr, " title=" );
1029 dump_varargs_unicode_str( cur_size );
1032 static void dump_append_console_input_history_request( const struct append_console_input_history_request *req )
1034 fprintf( stderr, " handle=%d,", req->handle );
1035 fprintf( stderr, " line=" );
1036 dump_varargs_unicode_str( cur_size );
1039 static void dump_get_console_input_history_request( const struct get_console_input_history_request *req )
1041 fprintf( stderr, " handle=%d,", req->handle );
1042 fprintf( stderr, " index=%d", req->index );
1045 static void dump_get_console_input_history_reply( const struct get_console_input_history_reply *req )
1047 fprintf( stderr, " total=%d,", req->total );
1048 fprintf( stderr, " line=" );
1049 dump_varargs_unicode_str( cur_size );
1052 static void dump_create_console_output_request( const struct create_console_output_request *req )
1054 fprintf( stderr, " handle_in=%d,", req->handle_in );
1055 fprintf( stderr, " access=%d,", req->access );
1056 fprintf( stderr, " share=%d,", req->share );
1057 fprintf( stderr, " inherit=%d", req->inherit );
1060 static void dump_create_console_output_reply( const struct create_console_output_reply *req )
1062 fprintf( stderr, " handle_out=%d", req->handle_out );
1065 static void dump_set_console_output_info_request( const struct set_console_output_info_request *req )
1067 fprintf( stderr, " handle=%d,", req->handle );
1068 fprintf( stderr, " mask=%d,", req->mask );
1069 fprintf( stderr, " cursor_size=%d,", req->cursor_size );
1070 fprintf( stderr, " cursor_visible=%d,", req->cursor_visible );
1071 fprintf( stderr, " cursor_x=%d,", req->cursor_x );
1072 fprintf( stderr, " cursor_y=%d,", req->cursor_y );
1073 fprintf( stderr, " width=%d,", req->width );
1074 fprintf( stderr, " height=%d,", req->height );
1075 fprintf( stderr, " attr=%d,", req->attr );
1076 fprintf( stderr, " win_left=%d,", req->win_left );
1077 fprintf( stderr, " win_top=%d,", req->win_top );
1078 fprintf( stderr, " win_right=%d,", req->win_right );
1079 fprintf( stderr, " win_bottom=%d,", req->win_bottom );
1080 fprintf( stderr, " max_width=%d,", req->max_width );
1081 fprintf( stderr, " max_height=%d", req->max_height );
1084 static void dump_get_console_output_info_request( const struct get_console_output_info_request *req )
1086 fprintf( stderr, " handle=%d", req->handle );
1089 static void dump_get_console_output_info_reply( const struct get_console_output_info_reply *req )
1091 fprintf( stderr, " cursor_size=%d,", req->cursor_size );
1092 fprintf( stderr, " cursor_visible=%d,", req->cursor_visible );
1093 fprintf( stderr, " cursor_x=%d,", req->cursor_x );
1094 fprintf( stderr, " cursor_y=%d,", req->cursor_y );
1095 fprintf( stderr, " width=%d,", req->width );
1096 fprintf( stderr, " height=%d,", req->height );
1097 fprintf( stderr, " attr=%d,", req->attr );
1098 fprintf( stderr, " win_left=%d,", req->win_left );
1099 fprintf( stderr, " win_top=%d,", req->win_top );
1100 fprintf( stderr, " win_right=%d,", req->win_right );
1101 fprintf( stderr, " win_bottom=%d,", req->win_bottom );
1102 fprintf( stderr, " max_width=%d,", req->max_width );
1103 fprintf( stderr, " max_height=%d", req->max_height );
1106 static void dump_write_console_input_request( const struct write_console_input_request *req )
1108 fprintf( stderr, " handle=%d,", req->handle );
1109 fprintf( stderr, " rec=" );
1110 dump_varargs_input_records( cur_size );
1113 static void dump_write_console_input_reply( const struct write_console_input_reply *req )
1115 fprintf( stderr, " written=%d", req->written );
1118 static void dump_read_console_input_request( const struct read_console_input_request *req )
1120 fprintf( stderr, " handle=%d,", req->handle );
1121 fprintf( stderr, " flush=%d", req->flush );
1124 static void dump_read_console_input_reply( const struct read_console_input_reply *req )
1126 fprintf( stderr, " read=%d,", req->read );
1127 fprintf( stderr, " rec=" );
1128 dump_varargs_input_records( cur_size );
1131 static void dump_write_console_output_request( const struct write_console_output_request *req )
1133 fprintf( stderr, " handle=%d,", req->handle );
1134 fprintf( stderr, " x=%d,", req->x );
1135 fprintf( stderr, " y=%d,", req->y );
1136 fprintf( stderr, " mode=%d,", req->mode );
1137 fprintf( stderr, " wrap=%d,", req->wrap );
1138 fprintf( stderr, " data=" );
1139 dump_varargs_bytes( cur_size );
1142 static void dump_write_console_output_reply( const struct write_console_output_reply *req )
1144 fprintf( stderr, " written=%d,", req->written );
1145 fprintf( stderr, " width=%d,", req->width );
1146 fprintf( stderr, " height=%d", req->height );
1149 static void dump_fill_console_output_request( const struct fill_console_output_request *req )
1151 fprintf( stderr, " handle=%d,", req->handle );
1152 fprintf( stderr, " x=%d,", req->x );
1153 fprintf( stderr, " y=%d,", req->y );
1154 fprintf( stderr, " mode=%d,", req->mode );
1155 fprintf( stderr, " count=%d,", req->count );
1156 fprintf( stderr, " wrap=%d,", req->wrap );
1157 fprintf( stderr, " data=" );
1158 dump_char_info( &req->data );
1161 static void dump_fill_console_output_reply( const struct fill_console_output_reply *req )
1163 fprintf( stderr, " written=%d", req->written );
1166 static void dump_read_console_output_request( const struct read_console_output_request *req )
1168 fprintf( stderr, " handle=%d,", req->handle );
1169 fprintf( stderr, " x=%d,", req->x );
1170 fprintf( stderr, " y=%d,", req->y );
1171 fprintf( stderr, " mode=%d,", req->mode );
1172 fprintf( stderr, " wrap=%d", req->wrap );
1175 static void dump_read_console_output_reply( const struct read_console_output_reply *req )
1177 fprintf( stderr, " width=%d,", req->width );
1178 fprintf( stderr, " height=%d,", req->height );
1179 fprintf( stderr, " data=" );
1180 dump_varargs_bytes( cur_size );
1183 static void dump_move_console_output_request( const struct move_console_output_request *req )
1185 fprintf( stderr, " handle=%d,", req->handle );
1186 fprintf( stderr, " x_src=%d,", req->x_src );
1187 fprintf( stderr, " y_src=%d,", req->y_src );
1188 fprintf( stderr, " x_dst=%d,", req->x_dst );
1189 fprintf( stderr, " y_dst=%d,", req->y_dst );
1190 fprintf( stderr, " w=%d,", req->w );
1191 fprintf( stderr, " h=%d", req->h );
1194 static void dump_send_console_signal_request( const struct send_console_signal_request *req )
1196 fprintf( stderr, " signal=%d,", req->signal );
1197 fprintf( stderr, " group_id=%p", req->group_id );
1200 static void dump_create_change_notification_request( const struct create_change_notification_request *req )
1202 fprintf( stderr, " subtree=%d,", req->subtree );
1203 fprintf( stderr, " filter=%d", req->filter );
1206 static void dump_create_change_notification_reply( const struct create_change_notification_reply *req )
1208 fprintf( stderr, " handle=%d", req->handle );
1211 static void dump_create_mapping_request( const struct create_mapping_request *req )
1213 fprintf( stderr, " size_high=%d,", req->size_high );
1214 fprintf( stderr, " size_low=%d,", req->size_low );
1215 fprintf( stderr, " protect=%d,", req->protect );
1216 fprintf( stderr, " inherit=%d,", req->inherit );
1217 fprintf( stderr, " file_handle=%d,", req->file_handle );
1218 fprintf( stderr, " name=" );
1219 dump_varargs_unicode_str( cur_size );
1222 static void dump_create_mapping_reply( const struct create_mapping_reply *req )
1224 fprintf( stderr, " handle=%d", req->handle );
1227 static void dump_open_mapping_request( const struct open_mapping_request *req )
1229 fprintf( stderr, " access=%08x,", req->access );
1230 fprintf( stderr, " inherit=%d,", req->inherit );
1231 fprintf( stderr, " name=" );
1232 dump_varargs_unicode_str( cur_size );
1235 static void dump_open_mapping_reply( const struct open_mapping_reply *req )
1237 fprintf( stderr, " handle=%d", req->handle );
1240 static void dump_get_mapping_info_request( const struct get_mapping_info_request *req )
1242 fprintf( stderr, " handle=%d", req->handle );
1245 static void dump_get_mapping_info_reply( const struct get_mapping_info_reply *req )
1247 fprintf( stderr, " size_high=%d,", req->size_high );
1248 fprintf( stderr, " size_low=%d,", req->size_low );
1249 fprintf( stderr, " protect=%d,", req->protect );
1250 fprintf( stderr, " header_size=%d,", req->header_size );
1251 fprintf( stderr, " base=%p,", req->base );
1252 fprintf( stderr, " shared_file=%d,", req->shared_file );
1253 fprintf( stderr, " shared_size=%d,", req->shared_size );
1254 fprintf( stderr, " drive_type=%d", req->drive_type );
1257 static void dump_create_device_request( const struct create_device_request *req )
1259 fprintf( stderr, " access=%08x,", req->access );
1260 fprintf( stderr, " inherit=%d,", req->inherit );
1261 fprintf( stderr, " id=%d", req->id );
1264 static void dump_create_device_reply( const struct create_device_reply *req )
1266 fprintf( stderr, " handle=%d", req->handle );
1269 static void dump_create_snapshot_request( const struct create_snapshot_request *req )
1271 fprintf( stderr, " inherit=%d,", req->inherit );
1272 fprintf( stderr, " flags=%d,", req->flags );
1273 fprintf( stderr, " pid=%p", req->pid );
1276 static void dump_create_snapshot_reply( const struct create_snapshot_reply *req )
1278 fprintf( stderr, " handle=%d", req->handle );
1281 static void dump_next_process_request( const struct next_process_request *req )
1283 fprintf( stderr, " handle=%d,", req->handle );
1284 fprintf( stderr, " reset=%d", req->reset );
1287 static void dump_next_process_reply( const struct next_process_reply *req )
1289 fprintf( stderr, " count=%d,", req->count );
1290 fprintf( stderr, " pid=%p,", req->pid );
1291 fprintf( stderr, " ppid=%p,", req->ppid );
1292 fprintf( stderr, " heap=%p,", req->heap );
1293 fprintf( stderr, " module=%p,", req->module );
1294 fprintf( stderr, " threads=%d,", req->threads );
1295 fprintf( stderr, " priority=%d,", req->priority );
1296 fprintf( stderr, " filename=" );
1297 dump_varargs_string( cur_size );
1300 static void dump_next_thread_request( const struct next_thread_request *req )
1302 fprintf( stderr, " handle=%d,", req->handle );
1303 fprintf( stderr, " reset=%d", req->reset );
1306 static void dump_next_thread_reply( const struct next_thread_reply *req )
1308 fprintf( stderr, " count=%d,", req->count );
1309 fprintf( stderr, " pid=%p,", req->pid );
1310 fprintf( stderr, " tid=%p,", req->tid );
1311 fprintf( stderr, " base_pri=%d,", req->base_pri );
1312 fprintf( stderr, " delta_pri=%d", req->delta_pri );
1315 static void dump_next_module_request( const struct next_module_request *req )
1317 fprintf( stderr, " handle=%d,", req->handle );
1318 fprintf( stderr, " reset=%d", req->reset );
1321 static void dump_next_module_reply( const struct next_module_reply *req )
1323 fprintf( stderr, " pid=%p,", req->pid );
1324 fprintf( stderr, " base=%p,", req->base );
1325 fprintf( stderr, " size=%d,", req->size );
1326 fprintf( stderr, " filename=" );
1327 dump_varargs_string( cur_size );
1330 static void dump_wait_debug_event_request( const struct wait_debug_event_request *req )
1332 fprintf( stderr, " get_handle=%d", req->get_handle );
1335 static void dump_wait_debug_event_reply( const struct wait_debug_event_reply *req )
1337 fprintf( stderr, " pid=%p,", req->pid );
1338 fprintf( stderr, " tid=%p,", req->tid );
1339 fprintf( stderr, " wait=%d,", req->wait );
1340 fprintf( stderr, " event=" );
1341 dump_varargs_debug_event( cur_size );
1344 static void dump_queue_exception_event_request( const struct queue_exception_event_request *req )
1346 fprintf( stderr, " first=%d,", req->first );
1347 fprintf( stderr, " record=" );
1348 dump_varargs_exc_event( cur_size );
1351 static void dump_queue_exception_event_reply( const struct queue_exception_event_reply *req )
1353 fprintf( stderr, " handle=%d", req->handle );
1356 static void dump_get_exception_status_request( const struct get_exception_status_request *req )
1358 fprintf( stderr, " handle=%d", req->handle );
1361 static void dump_get_exception_status_reply( const struct get_exception_status_reply *req )
1363 fprintf( stderr, " status=%d,", req->status );
1364 fprintf( stderr, " context=" );
1365 dump_varargs_context( cur_size );
1368 static void dump_output_debug_string_request( const struct output_debug_string_request *req )
1370 fprintf( stderr, " string=%p,", req->string );
1371 fprintf( stderr, " unicode=%d,", req->unicode );
1372 fprintf( stderr, " length=%d", req->length );
1375 static void dump_continue_debug_event_request( const struct continue_debug_event_request *req )
1377 fprintf( stderr, " pid=%p,", req->pid );
1378 fprintf( stderr, " tid=%p,", req->tid );
1379 fprintf( stderr, " status=%d", req->status );
1382 static void dump_debug_process_request( const struct debug_process_request *req )
1384 fprintf( stderr, " pid=%p,", req->pid );
1385 fprintf( stderr, " attach=%d", req->attach );
1388 static void dump_debug_break_request( const struct debug_break_request *req )
1390 fprintf( stderr, " handle=%d", req->handle );
1393 static void dump_debug_break_reply( const struct debug_break_reply *req )
1395 fprintf( stderr, " self=%d", req->self );
1398 static void dump_set_debugger_kill_on_exit_request( const struct set_debugger_kill_on_exit_request *req )
1400 fprintf( stderr, " kill_on_exit=%d", req->kill_on_exit );
1403 static void dump_read_process_memory_request( const struct read_process_memory_request *req )
1405 fprintf( stderr, " handle=%d,", req->handle );
1406 fprintf( stderr, " addr=%p", req->addr );
1409 static void dump_read_process_memory_reply( const struct read_process_memory_reply *req )
1411 fprintf( stderr, " data=" );
1412 dump_varargs_bytes( cur_size );
1415 static void dump_write_process_memory_request( const struct write_process_memory_request *req )
1417 fprintf( stderr, " handle=%d,", req->handle );
1418 fprintf( stderr, " addr=%p,", req->addr );
1419 fprintf( stderr, " first_mask=%08x,", req->first_mask );
1420 fprintf( stderr, " last_mask=%08x,", req->last_mask );
1421 fprintf( stderr, " data=" );
1422 dump_varargs_bytes( cur_size );
1425 static void dump_create_key_request( const struct create_key_request *req )
1427 fprintf( stderr, " parent=%d,", req->parent );
1428 fprintf( stderr, " access=%08x,", req->access );
1429 fprintf( stderr, " options=%08x,", req->options );
1430 fprintf( stderr, " modif=%ld,", req->modif );
1431 fprintf( stderr, " namelen=%d,", req->namelen );
1432 fprintf( stderr, " name=" );
1433 dump_varargs_unicode_str( min(cur_size,req->namelen) );
1434 fputc( ',', stderr );
1435 fprintf( stderr, " class=" );
1436 dump_varargs_unicode_str( cur_size );
1439 static void dump_create_key_reply( const struct create_key_reply *req )
1441 fprintf( stderr, " hkey=%d,", req->hkey );
1442 fprintf( stderr, " created=%d", req->created );
1445 static void dump_open_key_request( const struct open_key_request *req )
1447 fprintf( stderr, " parent=%d,", req->parent );
1448 fprintf( stderr, " access=%08x,", req->access );
1449 fprintf( stderr, " name=" );
1450 dump_varargs_unicode_str( cur_size );
1453 static void dump_open_key_reply( const struct open_key_reply *req )
1455 fprintf( stderr, " hkey=%d", req->hkey );
1458 static void dump_delete_key_request( const struct delete_key_request *req )
1460 fprintf( stderr, " hkey=%d", req->hkey );
1463 static void dump_enum_key_request( const struct enum_key_request *req )
1465 fprintf( stderr, " hkey=%d,", req->hkey );
1466 fprintf( stderr, " index=%d,", req->index );
1467 fprintf( stderr, " info_class=%d", req->info_class );
1470 static void dump_enum_key_reply( const struct enum_key_reply *req )
1472 fprintf( stderr, " subkeys=%d,", req->subkeys );
1473 fprintf( stderr, " max_subkey=%d,", req->max_subkey );
1474 fprintf( stderr, " max_class=%d,", req->max_class );
1475 fprintf( stderr, " values=%d,", req->values );
1476 fprintf( stderr, " max_value=%d,", req->max_value );
1477 fprintf( stderr, " max_data=%d,", req->max_data );
1478 fprintf( stderr, " modif=%ld,", req->modif );
1479 fprintf( stderr, " total=%d,", req->total );
1480 fprintf( stderr, " namelen=%d,", req->namelen );
1481 fprintf( stderr, " name=" );
1482 dump_varargs_unicode_str( min(cur_size,req->namelen) );
1483 fputc( ',', stderr );
1484 fprintf( stderr, " class=" );
1485 dump_varargs_unicode_str( cur_size );
1488 static void dump_set_key_value_request( const struct set_key_value_request *req )
1490 fprintf( stderr, " hkey=%d,", req->hkey );
1491 fprintf( stderr, " type=%d,", req->type );
1492 fprintf( stderr, " namelen=%d,", req->namelen );
1493 fprintf( stderr, " name=" );
1494 dump_varargs_unicode_str( min(cur_size,req->namelen) );
1495 fputc( ',', stderr );
1496 fprintf( stderr, " data=" );
1497 dump_varargs_bytes( cur_size );
1500 static void dump_get_key_value_request( const struct get_key_value_request *req )
1502 fprintf( stderr, " hkey=%d,", req->hkey );
1503 fprintf( stderr, " name=" );
1504 dump_varargs_unicode_str( cur_size );
1507 static void dump_get_key_value_reply( const struct get_key_value_reply *req )
1509 fprintf( stderr, " type=%d,", req->type );
1510 fprintf( stderr, " total=%d,", req->total );
1511 fprintf( stderr, " data=" );
1512 dump_varargs_bytes( cur_size );
1515 static void dump_enum_key_value_request( const struct enum_key_value_request *req )
1517 fprintf( stderr, " hkey=%d,", req->hkey );
1518 fprintf( stderr, " index=%d,", req->index );
1519 fprintf( stderr, " info_class=%d", req->info_class );
1522 static void dump_enum_key_value_reply( const struct enum_key_value_reply *req )
1524 fprintf( stderr, " type=%d,", req->type );
1525 fprintf( stderr, " total=%d,", req->total );
1526 fprintf( stderr, " namelen=%d,", req->namelen );
1527 fprintf( stderr, " name=" );
1528 dump_varargs_unicode_str( min(cur_size,req->namelen) );
1529 fputc( ',', stderr );
1530 fprintf( stderr, " data=" );
1531 dump_varargs_bytes( cur_size );
1534 static void dump_delete_key_value_request( const struct delete_key_value_request *req )
1536 fprintf( stderr, " hkey=%d,", req->hkey );
1537 fprintf( stderr, " name=" );
1538 dump_varargs_unicode_str( cur_size );
1541 static void dump_load_registry_request( const struct load_registry_request *req )
1543 fprintf( stderr, " hkey=%d,", req->hkey );
1544 fprintf( stderr, " file=%d,", req->file );
1545 fprintf( stderr, " name=" );
1546 dump_varargs_unicode_str( cur_size );
1549 static void dump_save_registry_request( const struct save_registry_request *req )
1551 fprintf( stderr, " hkey=%d,", req->hkey );
1552 fprintf( stderr, " file=%d", req->file );
1555 static void dump_save_registry_atexit_request( const struct save_registry_atexit_request *req )
1557 fprintf( stderr, " hkey=%d,", req->hkey );
1558 fprintf( stderr, " file=" );
1559 dump_varargs_string( cur_size );
1562 static void dump_set_registry_levels_request( const struct set_registry_levels_request *req )
1564 fprintf( stderr, " current=%d,", req->current );
1565 fprintf( stderr, " saving=%d,", req->saving );
1566 fprintf( stderr, " period=%d", req->period );
1569 static void dump_create_timer_request( const struct create_timer_request *req )
1571 fprintf( stderr, " inherit=%d,", req->inherit );
1572 fprintf( stderr, " manual=%d,", req->manual );
1573 fprintf( stderr, " name=" );
1574 dump_varargs_unicode_str( cur_size );
1577 static void dump_create_timer_reply( const struct create_timer_reply *req )
1579 fprintf( stderr, " handle=%d", req->handle );
1582 static void dump_open_timer_request( const struct open_timer_request *req )
1584 fprintf( stderr, " access=%08x,", req->access );
1585 fprintf( stderr, " inherit=%d,", req->inherit );
1586 fprintf( stderr, " name=" );
1587 dump_varargs_unicode_str( cur_size );
1590 static void dump_open_timer_reply( const struct open_timer_reply *req )
1592 fprintf( stderr, " handle=%d", req->handle );
1595 static void dump_set_timer_request( const struct set_timer_request *req )
1597 fprintf( stderr, " handle=%d,", req->handle );
1598 fprintf( stderr, " sec=%d,", req->sec );
1599 fprintf( stderr, " usec=%d,", req->usec );
1600 fprintf( stderr, " period=%d,", req->period );
1601 fprintf( stderr, " callback=%p,", req->callback );
1602 fprintf( stderr, " arg=%p", req->arg );
1605 static void dump_cancel_timer_request( const struct cancel_timer_request *req )
1607 fprintf( stderr, " handle=%d", req->handle );
1610 static void dump_get_thread_context_request( const struct get_thread_context_request *req )
1612 fprintf( stderr, " handle=%d,", req->handle );
1613 fprintf( stderr, " flags=%08x", req->flags );
1616 static void dump_get_thread_context_reply( const struct get_thread_context_reply *req )
1618 fprintf( stderr, " context=" );
1619 dump_varargs_context( cur_size );
1622 static void dump_set_thread_context_request( const struct set_thread_context_request *req )
1624 fprintf( stderr, " handle=%d,", req->handle );
1625 fprintf( stderr, " flags=%08x,", req->flags );
1626 fprintf( stderr, " context=" );
1627 dump_varargs_context( cur_size );
1630 static void dump_get_selector_entry_request( const struct get_selector_entry_request *req )
1632 fprintf( stderr, " handle=%d,", req->handle );
1633 fprintf( stderr, " entry=%d", req->entry );
1636 static void dump_get_selector_entry_reply( const struct get_selector_entry_reply *req )
1638 fprintf( stderr, " base=%08x,", req->base );
1639 fprintf( stderr, " limit=%08x,", req->limit );
1640 fprintf( stderr, " flags=%02x", req->flags );
1643 static void dump_add_atom_request( const struct add_atom_request *req )
1645 fprintf( stderr, " local=%d,", req->local );
1646 fprintf( stderr, " name=" );
1647 dump_varargs_unicode_str( cur_size );
1650 static void dump_add_atom_reply( const struct add_atom_reply *req )
1652 fprintf( stderr, " atom=%04x", req->atom );
1655 static void dump_delete_atom_request( const struct delete_atom_request *req )
1657 fprintf( stderr, " atom=%04x,", req->atom );
1658 fprintf( stderr, " local=%d", req->local );
1661 static void dump_find_atom_request( const struct find_atom_request *req )
1663 fprintf( stderr, " local=%d,", req->local );
1664 fprintf( stderr, " name=" );
1665 dump_varargs_unicode_str( cur_size );
1668 static void dump_find_atom_reply( const struct find_atom_reply *req )
1670 fprintf( stderr, " atom=%04x", req->atom );
1673 static void dump_get_atom_name_request( const struct get_atom_name_request *req )
1675 fprintf( stderr, " atom=%04x,", req->atom );
1676 fprintf( stderr, " local=%d", req->local );
1679 static void dump_get_atom_name_reply( const struct get_atom_name_reply *req )
1681 fprintf( stderr, " count=%d,", req->count );
1682 fprintf( stderr, " name=" );
1683 dump_varargs_unicode_str( cur_size );
1686 static void dump_init_atom_table_request( const struct init_atom_table_request *req )
1688 fprintf( stderr, " entries=%d", req->entries );
1691 static void dump_get_msg_queue_request( const struct get_msg_queue_request *req )
1695 static void dump_get_msg_queue_reply( const struct get_msg_queue_reply *req )
1697 fprintf( stderr, " handle=%d", req->handle );
1700 static void dump_set_queue_mask_request( const struct set_queue_mask_request *req )
1702 fprintf( stderr, " wake_mask=%08x,", req->wake_mask );
1703 fprintf( stderr, " changed_mask=%08x,", req->changed_mask );
1704 fprintf( stderr, " skip_wait=%d", req->skip_wait );
1707 static void dump_set_queue_mask_reply( const struct set_queue_mask_reply *req )
1709 fprintf( stderr, " wake_bits=%08x,", req->wake_bits );
1710 fprintf( stderr, " changed_bits=%08x", req->changed_bits );
1713 static void dump_get_queue_status_request( const struct get_queue_status_request *req )
1715 fprintf( stderr, " clear=%d", req->clear );
1718 static void dump_get_queue_status_reply( const struct get_queue_status_reply *req )
1720 fprintf( stderr, " wake_bits=%08x,", req->wake_bits );
1721 fprintf( stderr, " changed_bits=%08x", req->changed_bits );
1724 static void dump_wait_input_idle_request( const struct wait_input_idle_request *req )
1726 fprintf( stderr, " handle=%d,", req->handle );
1727 fprintf( stderr, " timeout=%d", req->timeout );
1730 static void dump_wait_input_idle_reply( const struct wait_input_idle_reply *req )
1732 fprintf( stderr, " event=%d", req->event );
1735 static void dump_send_message_request( const struct send_message_request *req )
1737 fprintf( stderr, " id=%p,", req->id );
1738 fprintf( stderr, " type=%d,", req->type );
1739 fprintf( stderr, " win=%08x,", req->win );
1740 fprintf( stderr, " msg=%08x,", req->msg );
1741 fprintf( stderr, " wparam=%08x,", req->wparam );
1742 fprintf( stderr, " lparam=%08x,", req->lparam );
1743 fprintf( stderr, " x=%d,", req->x );
1744 fprintf( stderr, " y=%d,", req->y );
1745 fprintf( stderr, " time=%08x,", req->time );
1746 fprintf( stderr, " info=%08x,", req->info );
1747 fprintf( stderr, " timeout=%d,", req->timeout );
1748 fprintf( stderr, " data=" );
1749 dump_varargs_bytes( cur_size );
1752 static void dump_get_message_request( const struct get_message_request *req )
1754 fprintf( stderr, " flags=%d,", req->flags );
1755 fprintf( stderr, " get_win=%08x,", req->get_win );
1756 fprintf( stderr, " get_first=%08x,", req->get_first );
1757 fprintf( stderr, " get_last=%08x", req->get_last );
1760 static void dump_get_message_reply( const struct get_message_reply *req )
1762 fprintf( stderr, " type=%d,", req->type );
1763 fprintf( stderr, " win=%08x,", req->win );
1764 fprintf( stderr, " msg=%08x,", req->msg );
1765 fprintf( stderr, " wparam=%08x,", req->wparam );
1766 fprintf( stderr, " lparam=%08x,", req->lparam );
1767 fprintf( stderr, " x=%d,", req->x );
1768 fprintf( stderr, " y=%d,", req->y );
1769 fprintf( stderr, " time=%08x,", req->time );
1770 fprintf( stderr, " info=%08x,", req->info );
1771 fprintf( stderr, " total=%d,", req->total );
1772 fprintf( stderr, " data=" );
1773 dump_varargs_bytes( cur_size );
1776 static void dump_reply_message_request( const struct reply_message_request *req )
1778 fprintf( stderr, " result=%08x,", req->result );
1779 fprintf( stderr, " remove=%d,", req->remove );
1780 fprintf( stderr, " data=" );
1781 dump_varargs_bytes( cur_size );
1784 static void dump_get_message_reply_request( const struct get_message_reply_request *req )
1786 fprintf( stderr, " cancel=%d", req->cancel );
1789 static void dump_get_message_reply_reply( const struct get_message_reply_reply *req )
1791 fprintf( stderr, " result=%08x,", req->result );
1792 fprintf( stderr, " data=" );
1793 dump_varargs_bytes( cur_size );
1796 static void dump_set_win_timer_request( const struct set_win_timer_request *req )
1798 fprintf( stderr, " win=%08x,", req->win );
1799 fprintf( stderr, " msg=%08x,", req->msg );
1800 fprintf( stderr, " id=%08x,", req->id );
1801 fprintf( stderr, " rate=%08x,", req->rate );
1802 fprintf( stderr, " lparam=%08x", req->lparam );
1805 static void dump_kill_win_timer_request( const struct kill_win_timer_request *req )
1807 fprintf( stderr, " win=%08x,", req->win );
1808 fprintf( stderr, " msg=%08x,", req->msg );
1809 fprintf( stderr, " id=%08x", req->id );
1812 static void dump_create_serial_request( const struct create_serial_request *req )
1814 fprintf( stderr, " access=%08x,", req->access );
1815 fprintf( stderr, " inherit=%d,", req->inherit );
1816 fprintf( stderr, " attributes=%08x,", req->attributes );
1817 fprintf( stderr, " sharing=%08x,", req->sharing );
1818 fprintf( stderr, " name=" );
1819 dump_varargs_string( cur_size );
1822 static void dump_create_serial_reply( const struct create_serial_reply *req )
1824 fprintf( stderr, " handle=%d", req->handle );
1827 static void dump_get_serial_info_request( const struct get_serial_info_request *req )
1829 fprintf( stderr, " handle=%d", req->handle );
1832 static void dump_get_serial_info_reply( const struct get_serial_info_reply *req )
1834 fprintf( stderr, " readinterval=%08x,", req->readinterval );
1835 fprintf( stderr, " readconst=%08x,", req->readconst );
1836 fprintf( stderr, " readmult=%08x,", req->readmult );
1837 fprintf( stderr, " writeconst=%08x,", req->writeconst );
1838 fprintf( stderr, " writemult=%08x,", req->writemult );
1839 fprintf( stderr, " eventmask=%08x,", req->eventmask );
1840 fprintf( stderr, " commerror=%08x", req->commerror );
1843 static void dump_set_serial_info_request( const struct set_serial_info_request *req )
1845 fprintf( stderr, " handle=%d,", req->handle );
1846 fprintf( stderr, " flags=%d,", req->flags );
1847 fprintf( stderr, " readinterval=%08x,", req->readinterval );
1848 fprintf( stderr, " readconst=%08x,", req->readconst );
1849 fprintf( stderr, " readmult=%08x,", req->readmult );
1850 fprintf( stderr, " writeconst=%08x,", req->writeconst );
1851 fprintf( stderr, " writemult=%08x,", req->writemult );
1852 fprintf( stderr, " eventmask=%08x,", req->eventmask );
1853 fprintf( stderr, " commerror=%08x", req->commerror );
1856 static void dump_register_async_request( const struct register_async_request *req )
1858 fprintf( stderr, " handle=%d,", req->handle );
1859 fprintf( stderr, " type=%d,", req->type );
1860 fprintf( stderr, " overlapped=%p,", req->overlapped );
1861 fprintf( stderr, " count=%d,", req->count );
1862 fprintf( stderr, " status=%08x", req->status );
1865 static void dump_create_named_pipe_request( const struct create_named_pipe_request *req )
1867 fprintf( stderr, " openmode=%08x,", req->openmode );
1868 fprintf( stderr, " pipemode=%08x,", req->pipemode );
1869 fprintf( stderr, " maxinstances=%08x,", req->maxinstances );
1870 fprintf( stderr, " outsize=%08x,", req->outsize );
1871 fprintf( stderr, " insize=%08x,", req->insize );
1872 fprintf( stderr, " timeout=%08x,", req->timeout );
1873 fprintf( stderr, " name=" );
1874 dump_varargs_unicode_str( cur_size );
1877 static void dump_create_named_pipe_reply( const struct create_named_pipe_reply *req )
1879 fprintf( stderr, " handle=%d", req->handle );
1882 static void dump_open_named_pipe_request( const struct open_named_pipe_request *req )
1884 fprintf( stderr, " access=%08x,", req->access );
1885 fprintf( stderr, " name=" );
1886 dump_varargs_unicode_str( cur_size );
1889 static void dump_open_named_pipe_reply( const struct open_named_pipe_reply *req )
1891 fprintf( stderr, " handle=%d", req->handle );
1894 static void dump_connect_named_pipe_request( const struct connect_named_pipe_request *req )
1896 fprintf( stderr, " handle=%d,", req->handle );
1897 fprintf( stderr, " overlapped=%p,", req->overlapped );
1898 fprintf( stderr, " func=%p", req->func );
1901 static void dump_wait_named_pipe_request( const struct wait_named_pipe_request *req )
1903 fprintf( stderr, " timeout=%08x,", req->timeout );
1904 fprintf( stderr, " overlapped=%p,", req->overlapped );
1905 fprintf( stderr, " func=%p,", req->func );
1906 fprintf( stderr, " name=" );
1907 dump_varargs_unicode_str( cur_size );
1910 static void dump_disconnect_named_pipe_request( const struct disconnect_named_pipe_request *req )
1912 fprintf( stderr, " handle=%d", req->handle );
1915 static void dump_get_named_pipe_info_request( const struct get_named_pipe_info_request *req )
1917 fprintf( stderr, " handle=%d", req->handle );
1920 static void dump_get_named_pipe_info_reply( const struct get_named_pipe_info_reply *req )
1922 fprintf( stderr, " flags=%08x,", req->flags );
1923 fprintf( stderr, " maxinstances=%08x,", req->maxinstances );
1924 fprintf( stderr, " outsize=%08x,", req->outsize );
1925 fprintf( stderr, " insize=%08x", req->insize );
1928 static void dump_create_smb_request( const struct create_smb_request *req )
1930 fprintf( stderr, " fd=%d,", req->fd );
1931 fprintf( stderr, " tree_id=%08x,", req->tree_id );
1932 fprintf( stderr, " user_id=%08x,", req->user_id );
1933 fprintf( stderr, " file_id=%08x,", req->file_id );
1934 fprintf( stderr, " dialect=%08x", req->dialect );
1937 static void dump_create_smb_reply( const struct create_smb_reply *req )
1939 fprintf( stderr, " handle=%d", req->handle );
1942 static void dump_get_smb_info_request( const struct get_smb_info_request *req )
1944 fprintf( stderr, " handle=%d,", req->handle );
1945 fprintf( stderr, " flags=%08x,", req->flags );
1946 fprintf( stderr, " offset=%08x", req->offset );
1949 static void dump_get_smb_info_reply( const struct get_smb_info_reply *req )
1951 fprintf( stderr, " tree_id=%08x,", req->tree_id );
1952 fprintf( stderr, " user_id=%08x,", req->user_id );
1953 fprintf( stderr, " dialect=%08x,", req->dialect );
1954 fprintf( stderr, " file_id=%08x,", req->file_id );
1955 fprintf( stderr, " offset=%08x", req->offset );
1958 static void dump_create_window_request( const struct create_window_request *req )
1960 fprintf( stderr, " parent=%08x,", req->parent );
1961 fprintf( stderr, " owner=%08x,", req->owner );
1962 fprintf( stderr, " atom=%04x", req->atom );
1965 static void dump_create_window_reply( const struct create_window_reply *req )
1967 fprintf( stderr, " handle=%08x", req->handle );
1970 static void dump_link_window_request( const struct link_window_request *req )
1972 fprintf( stderr, " handle=%08x,", req->handle );
1973 fprintf( stderr, " parent=%08x,", req->parent );
1974 fprintf( stderr, " previous=%08x", req->previous );
1977 static void dump_link_window_reply( const struct link_window_reply *req )
1979 fprintf( stderr, " full_parent=%08x", req->full_parent );
1982 static void dump_destroy_window_request( const struct destroy_window_request *req )
1984 fprintf( stderr, " handle=%08x", req->handle );
1987 static void dump_set_window_owner_request( const struct set_window_owner_request *req )
1989 fprintf( stderr, " handle=%08x,", req->handle );
1990 fprintf( stderr, " owner=%08x", req->owner );
1993 static void dump_set_window_owner_reply( const struct set_window_owner_reply *req )
1995 fprintf( stderr, " full_owner=%08x", req->full_owner );
1998 static void dump_get_window_info_request( const struct get_window_info_request *req )
2000 fprintf( stderr, " handle=%08x", req->handle );
2003 static void dump_get_window_info_reply( const struct get_window_info_reply *req )
2005 fprintf( stderr, " full_handle=%08x,", req->full_handle );
2006 fprintf( stderr, " pid=%p,", req->pid );
2007 fprintf( stderr, " tid=%p,", req->tid );
2008 fprintf( stderr, " atom=%04x", req->atom );
2011 static void dump_set_window_info_request( const struct set_window_info_request *req )
2013 fprintf( stderr, " handle=%08x,", req->handle );
2014 fprintf( stderr, " flags=%08x,", req->flags );
2015 fprintf( stderr, " style=%08x,", req->style );
2016 fprintf( stderr, " ex_style=%08x,", req->ex_style );
2017 fprintf( stderr, " id=%08x,", req->id );
2018 fprintf( stderr, " instance=%p,", req->instance );
2019 fprintf( stderr, " user_data=%p", req->user_data );
2022 static void dump_set_window_info_reply( const struct set_window_info_reply *req )
2024 fprintf( stderr, " old_style=%08x,", req->old_style );
2025 fprintf( stderr, " old_ex_style=%08x,", req->old_ex_style );
2026 fprintf( stderr, " old_id=%08x,", req->old_id );
2027 fprintf( stderr, " old_instance=%p,", req->old_instance );
2028 fprintf( stderr, " old_user_data=%p", req->old_user_data );
2031 static void dump_get_window_parents_request( const struct get_window_parents_request *req )
2033 fprintf( stderr, " handle=%08x", req->handle );
2036 static void dump_get_window_parents_reply( const struct get_window_parents_reply *req )
2038 fprintf( stderr, " count=%d,", req->count );
2039 fprintf( stderr, " parents=" );
2040 dump_varargs_user_handles( cur_size );
2043 static void dump_get_window_children_request( const struct get_window_children_request *req )
2045 fprintf( stderr, " parent=%08x,", req->parent );
2046 fprintf( stderr, " atom=%04x,", req->atom );
2047 fprintf( stderr, " tid=%p", req->tid );
2050 static void dump_get_window_children_reply( const struct get_window_children_reply *req )
2052 fprintf( stderr, " count=%d,", req->count );
2053 fprintf( stderr, " children=" );
2054 dump_varargs_user_handles( cur_size );
2057 static void dump_get_window_tree_request( const struct get_window_tree_request *req )
2059 fprintf( stderr, " handle=%08x", req->handle );
2062 static void dump_get_window_tree_reply( const struct get_window_tree_reply *req )
2064 fprintf( stderr, " parent=%08x,", req->parent );
2065 fprintf( stderr, " owner=%08x,", req->owner );
2066 fprintf( stderr, " next_sibling=%08x,", req->next_sibling );
2067 fprintf( stderr, " prev_sibling=%08x,", req->prev_sibling );
2068 fprintf( stderr, " first_sibling=%08x,", req->first_sibling );
2069 fprintf( stderr, " last_sibling=%08x,", req->last_sibling );
2070 fprintf( stderr, " first_child=%08x,", req->first_child );
2071 fprintf( stderr, " last_child=%08x", req->last_child );
2074 static void dump_set_window_rectangles_request( const struct set_window_rectangles_request *req )
2076 fprintf( stderr, " handle=%08x,", req->handle );
2077 fprintf( stderr, " window=" );
2078 dump_rectangle( &req->window );
2079 fprintf( stderr, "," );
2080 fprintf( stderr, " client=" );
2081 dump_rectangle( &req->client );
2084 static void dump_get_window_rectangles_request( const struct get_window_rectangles_request *req )
2086 fprintf( stderr, " handle=%08x", req->handle );
2089 static void dump_get_window_rectangles_reply( const struct get_window_rectangles_reply *req )
2091 fprintf( stderr, " window=" );
2092 dump_rectangle( &req->window );
2093 fprintf( stderr, "," );
2094 fprintf( stderr, " client=" );
2095 dump_rectangle( &req->client );
2098 static void dump_get_window_text_request( const struct get_window_text_request *req )
2100 fprintf( stderr, " handle=%08x", req->handle );
2103 static void dump_get_window_text_reply( const struct get_window_text_reply *req )
2105 fprintf( stderr, " text=" );
2106 dump_varargs_unicode_str( cur_size );
2109 static void dump_set_window_text_request( const struct set_window_text_request *req )
2111 fprintf( stderr, " handle=%08x,", req->handle );
2112 fprintf( stderr, " text=" );
2113 dump_varargs_unicode_str( cur_size );
2116 static void dump_inc_window_paint_count_request( const struct inc_window_paint_count_request *req )
2118 fprintf( stderr, " handle=%08x,", req->handle );
2119 fprintf( stderr, " incr=%d", req->incr );
2122 static void dump_get_windows_offset_request( const struct get_windows_offset_request *req )
2124 fprintf( stderr, " from=%08x,", req->from );
2125 fprintf( stderr, " to=%08x", req->to );
2128 static void dump_get_windows_offset_reply( const struct get_windows_offset_reply *req )
2130 fprintf( stderr, " x=%d,", req->x );
2131 fprintf( stderr, " y=%d", req->y );
2134 static void dump_set_window_property_request( const struct set_window_property_request *req )
2136 fprintf( stderr, " window=%08x,", req->window );
2137 fprintf( stderr, " atom=%04x,", req->atom );
2138 fprintf( stderr, " string=%d,", req->string );
2139 fprintf( stderr, " handle=%d", req->handle );
2142 static void dump_remove_window_property_request( const struct remove_window_property_request *req )
2144 fprintf( stderr, " window=%08x,", req->window );
2145 fprintf( stderr, " atom=%04x", req->atom );
2148 static void dump_remove_window_property_reply( const struct remove_window_property_reply *req )
2150 fprintf( stderr, " handle=%d", req->handle );
2153 static void dump_get_window_property_request( const struct get_window_property_request *req )
2155 fprintf( stderr, " window=%08x,", req->window );
2156 fprintf( stderr, " atom=%04x", req->atom );
2159 static void dump_get_window_property_reply( const struct get_window_property_reply *req )
2161 fprintf( stderr, " handle=%d", req->handle );
2164 static void dump_get_window_properties_request( const struct get_window_properties_request *req )
2166 fprintf( stderr, " window=%08x", req->window );
2169 static void dump_get_window_properties_reply( const struct get_window_properties_reply *req )
2171 fprintf( stderr, " total=%d,", req->total );
2172 fprintf( stderr, " props=" );
2173 dump_varargs_properties( cur_size );
2176 static const dump_func req_dumpers[REQ_NB_REQUESTS] = {
2177 (dump_func)dump_new_process_request,
2178 (dump_func)dump_get_new_process_info_request,
2179 (dump_func)dump_new_thread_request,
2180 (dump_func)dump_boot_done_request,
2181 (dump_func)dump_init_process_request,
2182 (dump_func)dump_get_startup_info_request,
2183 (dump_func)dump_init_process_done_request,
2184 (dump_func)dump_init_thread_request,
2185 (dump_func)dump_terminate_process_request,
2186 (dump_func)dump_terminate_thread_request,
2187 (dump_func)dump_get_process_info_request,
2188 (dump_func)dump_set_process_info_request,
2189 (dump_func)dump_get_thread_info_request,
2190 (dump_func)dump_set_thread_info_request,
2191 (dump_func)dump_suspend_thread_request,
2192 (dump_func)dump_resume_thread_request,
2193 (dump_func)dump_load_dll_request,
2194 (dump_func)dump_unload_dll_request,
2195 (dump_func)dump_queue_apc_request,
2196 (dump_func)dump_get_apc_request,
2197 (dump_func)dump_close_handle_request,
2198 (dump_func)dump_set_handle_info_request,
2199 (dump_func)dump_dup_handle_request,
2200 (dump_func)dump_open_process_request,
2201 (dump_func)dump_open_thread_request,
2202 (dump_func)dump_select_request,
2203 (dump_func)dump_create_event_request,
2204 (dump_func)dump_event_op_request,
2205 (dump_func)dump_open_event_request,
2206 (dump_func)dump_create_mutex_request,
2207 (dump_func)dump_release_mutex_request,
2208 (dump_func)dump_open_mutex_request,
2209 (dump_func)dump_create_semaphore_request,
2210 (dump_func)dump_release_semaphore_request,
2211 (dump_func)dump_open_semaphore_request,
2212 (dump_func)dump_create_file_request,
2213 (dump_func)dump_alloc_file_handle_request,
2214 (dump_func)dump_get_handle_fd_request,
2215 (dump_func)dump_set_file_pointer_request,
2216 (dump_func)dump_truncate_file_request,
2217 (dump_func)dump_set_file_time_request,
2218 (dump_func)dump_flush_file_request,
2219 (dump_func)dump_get_file_info_request,
2220 (dump_func)dump_lock_file_request,
2221 (dump_func)dump_unlock_file_request,
2222 (dump_func)dump_create_pipe_request,
2223 (dump_func)dump_create_socket_request,
2224 (dump_func)dump_accept_socket_request,
2225 (dump_func)dump_set_socket_event_request,
2226 (dump_func)dump_get_socket_event_request,
2227 (dump_func)dump_enable_socket_event_request,
2228 (dump_func)dump_set_socket_deferred_request,
2229 (dump_func)dump_alloc_console_request,
2230 (dump_func)dump_free_console_request,
2231 (dump_func)dump_get_console_renderer_events_request,
2232 (dump_func)dump_open_console_request,
2233 (dump_func)dump_get_console_mode_request,
2234 (dump_func)dump_set_console_mode_request,
2235 (dump_func)dump_set_console_input_info_request,
2236 (dump_func)dump_get_console_input_info_request,
2237 (dump_func)dump_append_console_input_history_request,
2238 (dump_func)dump_get_console_input_history_request,
2239 (dump_func)dump_create_console_output_request,
2240 (dump_func)dump_set_console_output_info_request,
2241 (dump_func)dump_get_console_output_info_request,
2242 (dump_func)dump_write_console_input_request,
2243 (dump_func)dump_read_console_input_request,
2244 (dump_func)dump_write_console_output_request,
2245 (dump_func)dump_fill_console_output_request,
2246 (dump_func)dump_read_console_output_request,
2247 (dump_func)dump_move_console_output_request,
2248 (dump_func)dump_send_console_signal_request,
2249 (dump_func)dump_create_change_notification_request,
2250 (dump_func)dump_create_mapping_request,
2251 (dump_func)dump_open_mapping_request,
2252 (dump_func)dump_get_mapping_info_request,
2253 (dump_func)dump_create_device_request,
2254 (dump_func)dump_create_snapshot_request,
2255 (dump_func)dump_next_process_request,
2256 (dump_func)dump_next_thread_request,
2257 (dump_func)dump_next_module_request,
2258 (dump_func)dump_wait_debug_event_request,
2259 (dump_func)dump_queue_exception_event_request,
2260 (dump_func)dump_get_exception_status_request,
2261 (dump_func)dump_output_debug_string_request,
2262 (dump_func)dump_continue_debug_event_request,
2263 (dump_func)dump_debug_process_request,
2264 (dump_func)dump_debug_break_request,
2265 (dump_func)dump_set_debugger_kill_on_exit_request,
2266 (dump_func)dump_read_process_memory_request,
2267 (dump_func)dump_write_process_memory_request,
2268 (dump_func)dump_create_key_request,
2269 (dump_func)dump_open_key_request,
2270 (dump_func)dump_delete_key_request,
2271 (dump_func)dump_enum_key_request,
2272 (dump_func)dump_set_key_value_request,
2273 (dump_func)dump_get_key_value_request,
2274 (dump_func)dump_enum_key_value_request,
2275 (dump_func)dump_delete_key_value_request,
2276 (dump_func)dump_load_registry_request,
2277 (dump_func)dump_save_registry_request,
2278 (dump_func)dump_save_registry_atexit_request,
2279 (dump_func)dump_set_registry_levels_request,
2280 (dump_func)dump_create_timer_request,
2281 (dump_func)dump_open_timer_request,
2282 (dump_func)dump_set_timer_request,
2283 (dump_func)dump_cancel_timer_request,
2284 (dump_func)dump_get_thread_context_request,
2285 (dump_func)dump_set_thread_context_request,
2286 (dump_func)dump_get_selector_entry_request,
2287 (dump_func)dump_add_atom_request,
2288 (dump_func)dump_delete_atom_request,
2289 (dump_func)dump_find_atom_request,
2290 (dump_func)dump_get_atom_name_request,
2291 (dump_func)dump_init_atom_table_request,
2292 (dump_func)dump_get_msg_queue_request,
2293 (dump_func)dump_set_queue_mask_request,
2294 (dump_func)dump_get_queue_status_request,
2295 (dump_func)dump_wait_input_idle_request,
2296 (dump_func)dump_send_message_request,
2297 (dump_func)dump_get_message_request,
2298 (dump_func)dump_reply_message_request,
2299 (dump_func)dump_get_message_reply_request,
2300 (dump_func)dump_set_win_timer_request,
2301 (dump_func)dump_kill_win_timer_request,
2302 (dump_func)dump_create_serial_request,
2303 (dump_func)dump_get_serial_info_request,
2304 (dump_func)dump_set_serial_info_request,
2305 (dump_func)dump_register_async_request,
2306 (dump_func)dump_create_named_pipe_request,
2307 (dump_func)dump_open_named_pipe_request,
2308 (dump_func)dump_connect_named_pipe_request,
2309 (dump_func)dump_wait_named_pipe_request,
2310 (dump_func)dump_disconnect_named_pipe_request,
2311 (dump_func)dump_get_named_pipe_info_request,
2312 (dump_func)dump_create_smb_request,
2313 (dump_func)dump_get_smb_info_request,
2314 (dump_func)dump_create_window_request,
2315 (dump_func)dump_link_window_request,
2316 (dump_func)dump_destroy_window_request,
2317 (dump_func)dump_set_window_owner_request,
2318 (dump_func)dump_get_window_info_request,
2319 (dump_func)dump_set_window_info_request,
2320 (dump_func)dump_get_window_parents_request,
2321 (dump_func)dump_get_window_children_request,
2322 (dump_func)dump_get_window_tree_request,
2323 (dump_func)dump_set_window_rectangles_request,
2324 (dump_func)dump_get_window_rectangles_request,
2325 (dump_func)dump_get_window_text_request,
2326 (dump_func)dump_set_window_text_request,
2327 (dump_func)dump_inc_window_paint_count_request,
2328 (dump_func)dump_get_windows_offset_request,
2329 (dump_func)dump_set_window_property_request,
2330 (dump_func)dump_remove_window_property_request,
2331 (dump_func)dump_get_window_property_request,
2332 (dump_func)dump_get_window_properties_request,
2335 static const dump_func reply_dumpers[REQ_NB_REQUESTS] = {
2336 (dump_func)dump_new_process_reply,
2337 (dump_func)dump_get_new_process_info_reply,
2338 (dump_func)dump_new_thread_reply,
2340 (dump_func)dump_init_process_reply,
2341 (dump_func)dump_get_startup_info_reply,
2342 (dump_func)dump_init_process_done_reply,
2343 (dump_func)dump_init_thread_reply,
2344 (dump_func)dump_terminate_process_reply,
2345 (dump_func)dump_terminate_thread_reply,
2346 (dump_func)dump_get_process_info_reply,
2348 (dump_func)dump_get_thread_info_reply,
2350 (dump_func)dump_suspend_thread_reply,
2351 (dump_func)dump_resume_thread_reply,
2355 (dump_func)dump_get_apc_reply,
2356 (dump_func)dump_close_handle_reply,
2357 (dump_func)dump_set_handle_info_reply,
2358 (dump_func)dump_dup_handle_reply,
2359 (dump_func)dump_open_process_reply,
2360 (dump_func)dump_open_thread_reply,
2362 (dump_func)dump_create_event_reply,
2364 (dump_func)dump_open_event_reply,
2365 (dump_func)dump_create_mutex_reply,
2367 (dump_func)dump_open_mutex_reply,
2368 (dump_func)dump_create_semaphore_reply,
2369 (dump_func)dump_release_semaphore_reply,
2370 (dump_func)dump_open_semaphore_reply,
2371 (dump_func)dump_create_file_reply,
2372 (dump_func)dump_alloc_file_handle_reply,
2373 (dump_func)dump_get_handle_fd_reply,
2374 (dump_func)dump_set_file_pointer_reply,
2378 (dump_func)dump_get_file_info_reply,
2381 (dump_func)dump_create_pipe_reply,
2382 (dump_func)dump_create_socket_reply,
2383 (dump_func)dump_accept_socket_reply,
2385 (dump_func)dump_get_socket_event_reply,
2388 (dump_func)dump_alloc_console_reply,
2390 (dump_func)dump_get_console_renderer_events_reply,
2391 (dump_func)dump_open_console_reply,
2392 (dump_func)dump_get_console_mode_reply,
2395 (dump_func)dump_get_console_input_info_reply,
2397 (dump_func)dump_get_console_input_history_reply,
2398 (dump_func)dump_create_console_output_reply,
2400 (dump_func)dump_get_console_output_info_reply,
2401 (dump_func)dump_write_console_input_reply,
2402 (dump_func)dump_read_console_input_reply,
2403 (dump_func)dump_write_console_output_reply,
2404 (dump_func)dump_fill_console_output_reply,
2405 (dump_func)dump_read_console_output_reply,
2408 (dump_func)dump_create_change_notification_reply,
2409 (dump_func)dump_create_mapping_reply,
2410 (dump_func)dump_open_mapping_reply,
2411 (dump_func)dump_get_mapping_info_reply,
2412 (dump_func)dump_create_device_reply,
2413 (dump_func)dump_create_snapshot_reply,
2414 (dump_func)dump_next_process_reply,
2415 (dump_func)dump_next_thread_reply,
2416 (dump_func)dump_next_module_reply,
2417 (dump_func)dump_wait_debug_event_reply,
2418 (dump_func)dump_queue_exception_event_reply,
2419 (dump_func)dump_get_exception_status_reply,
2423 (dump_func)dump_debug_break_reply,
2425 (dump_func)dump_read_process_memory_reply,
2427 (dump_func)dump_create_key_reply,
2428 (dump_func)dump_open_key_reply,
2430 (dump_func)dump_enum_key_reply,
2432 (dump_func)dump_get_key_value_reply,
2433 (dump_func)dump_enum_key_value_reply,
2439 (dump_func)dump_create_timer_reply,
2440 (dump_func)dump_open_timer_reply,
2443 (dump_func)dump_get_thread_context_reply,
2445 (dump_func)dump_get_selector_entry_reply,
2446 (dump_func)dump_add_atom_reply,
2448 (dump_func)dump_find_atom_reply,
2449 (dump_func)dump_get_atom_name_reply,
2451 (dump_func)dump_get_msg_queue_reply,
2452 (dump_func)dump_set_queue_mask_reply,
2453 (dump_func)dump_get_queue_status_reply,
2454 (dump_func)dump_wait_input_idle_reply,
2456 (dump_func)dump_get_message_reply,
2458 (dump_func)dump_get_message_reply_reply,
2461 (dump_func)dump_create_serial_reply,
2462 (dump_func)dump_get_serial_info_reply,
2465 (dump_func)dump_create_named_pipe_reply,
2466 (dump_func)dump_open_named_pipe_reply,
2470 (dump_func)dump_get_named_pipe_info_reply,
2471 (dump_func)dump_create_smb_reply,
2472 (dump_func)dump_get_smb_info_reply,
2473 (dump_func)dump_create_window_reply,
2474 (dump_func)dump_link_window_reply,
2476 (dump_func)dump_set_window_owner_reply,
2477 (dump_func)dump_get_window_info_reply,
2478 (dump_func)dump_set_window_info_reply,
2479 (dump_func)dump_get_window_parents_reply,
2480 (dump_func)dump_get_window_children_reply,
2481 (dump_func)dump_get_window_tree_reply,
2483 (dump_func)dump_get_window_rectangles_reply,
2484 (dump_func)dump_get_window_text_reply,
2487 (dump_func)dump_get_windows_offset_reply,
2489 (dump_func)dump_remove_window_property_reply,
2490 (dump_func)dump_get_window_property_reply,
2491 (dump_func)dump_get_window_properties_reply,
2494 static const char * const req_names[REQ_NB_REQUESTS] = {
2496 "get_new_process_info",
2501 "init_process_done",
2503 "terminate_process",
2528 "release_semaphore",
2531 "alloc_file_handle",
2545 "enable_socket_event",
2546 "set_socket_deferred",
2549 "get_console_renderer_events",
2553 "set_console_input_info",
2554 "get_console_input_info",
2555 "append_console_input_history",
2556 "get_console_input_history",
2557 "create_console_output",
2558 "set_console_output_info",
2559 "get_console_output_info",
2560 "write_console_input",
2561 "read_console_input",
2562 "write_console_output",
2563 "fill_console_output",
2564 "read_console_output",
2565 "move_console_output",
2566 "send_console_signal",
2567 "create_change_notification",
2577 "queue_exception_event",
2578 "get_exception_status",
2579 "output_debug_string",
2580 "continue_debug_event",
2583 "set_debugger_kill_on_exit",
2584 "read_process_memory",
2585 "write_process_memory",
2596 "save_registry_atexit",
2597 "set_registry_levels",
2602 "get_thread_context",
2603 "set_thread_context",
2604 "get_selector_entry",
2617 "get_message_reply",
2624 "create_named_pipe",
2626 "connect_named_pipe",
2628 "disconnect_named_pipe",
2629 "get_named_pipe_info",
2638 "get_window_parents",
2639 "get_window_children",
2641 "set_window_rectangles",
2642 "get_window_rectangles",
2645 "inc_window_paint_count",
2646 "get_windows_offset",
2647 "set_window_property",
2648 "remove_window_property",
2649 "get_window_property",
2650 "get_window_properties",
2653 /* ### make_requests end ### */
2654 /* Everything above this line is generated automatically by tools/make_requests */
2656 static const char *get_status_name( unsigned int status )
2658 #define NAME(status) { #status, STATUS_##status }
2665 NAME(ACCESS_DENIED),
2666 NAME(ACCESS_VIOLATION),
2667 NAME(BUFFER_OVERFLOW),
2668 NAME(CHILD_MUST_BE_VOLATILE),
2669 NAME(DIRECTORY_NOT_EMPTY),
2671 NAME(FILE_LOCK_CONFLICT),
2672 NAME(INVALID_FILE_FOR_SECTION),
2673 NAME(INVALID_HANDLE),
2674 NAME(INVALID_PARAMETER),
2676 NAME(MEDIA_WRITE_PROTECTED),
2677 NAME(MUTANT_NOT_OWNED),
2678 NAME(NOT_REGISTRY_FILE),
2680 NAME(NO_MORE_ENTRIES),
2681 NAME(NO_MORE_FILES),
2683 NAME(OBJECT_NAME_COLLISION),
2684 NAME(OBJECT_NAME_INVALID),
2685 NAME(OBJECT_NAME_NOT_FOUND),
2686 NAME(OBJECT_PATH_INVALID),
2687 NAME(OBJECT_TYPE_MISMATCH),
2690 NAME(SEMAPHORE_LIMIT_EXCEEDED),
2691 NAME(SHARING_VIOLATION),
2692 NAME(SUSPEND_COUNT_EXCEEDED),
2694 NAME(TOO_MANY_OPENED_FILES),
2697 { NULL, 0 } /* terminator */
2702 static char buffer[10];
2706 for (i = 0; status_names[i].name; i++)
2707 if (status_names[i].value == status) return status_names[i].name;
2709 sprintf( buffer, "%x", status );
2713 void trace_request(void)
2715 enum request req = current->req.request_header.req;
2716 if (req < REQ_NB_REQUESTS)
2718 fprintf( stderr, "%08x: %s(", (unsigned int)current, req_names[req] );
2719 if (req_dumpers[req])
2722 cur_data = get_req_data();
2723 cur_size = get_req_data_size();
2724 req_dumpers[req]( ¤t->req );
2726 fprintf( stderr, " )\n" );
2728 else fprintf( stderr, "%08x: %d(?)\n", (unsigned int)current, req );
2731 void trace_reply( enum request req, const union generic_reply *reply )
2733 if (req < REQ_NB_REQUESTS)
2735 fprintf( stderr, "%08x: %s() = %s",
2736 (unsigned int)current, req_names[req], get_status_name(current->error) );
2737 if (reply_dumpers[req])
2739 fprintf( stderr, " {" );
2741 cur_data = current->reply_data;
2742 cur_size = reply->reply_header.reply_size;
2743 reply_dumpers[req]( reply );
2744 fprintf( stderr, " }" );
2746 fputc( '\n', stderr );
2748 else fprintf( stderr, "%08x: %d() = %s\n",
2749 (unsigned int)current, req, get_status_name(current->error) );