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"
27 #include <sys/types.h>
42 static const void *cur_data;
45 /* utility functions */
47 inline static void remove_data( size_t size )
49 cur_data = (const char *)cur_data + size;
53 static void dump_uints( const int *ptr, int len )
58 fprintf( stderr, "%08x", *ptr++ );
59 if (--len) fputc( ',', stderr );
64 static void dump_abs_time( const abs_time_t *time )
69 if (!time->sec && !time->usec)
71 fprintf( stderr, "0" );
74 gettimeofday( &tv, NULL );
75 secs = time->sec - tv.tv_sec;
76 if ((usecs = time->usec - tv.tv_usec) < 0)
81 if (secs > 0 || (secs == 0 && usecs >= 0))
82 fprintf( stderr, "%d.%06d (+%d.%06d)", time->sec, time->usec, secs, usecs );
84 fprintf( stderr, "%d.%06d (-%d.%06d)", time->sec, time->usec, abs(secs+1), 1000000-usecs );
87 static void dump_rectangle( const rectangle_t *rect )
89 fprintf( stderr, "{%d,%d;%d,%d}",
90 rect->left, rect->top, rect->right, rect->bottom );
93 static void dump_char_info( const char_info_t *info )
95 fprintf( stderr, "{'" );
96 dump_strW( &info->ch, 1, stderr, "\'\'" );
97 fprintf( stderr, "',%04x}", info->attr );
100 static void dump_context( const CONTEXT *context )
103 fprintf( stderr, "{flags=%08lx,eax=%08lx,ebx=%08lx,ecx=%08lx,edx=%08lx,esi=%08lx,edi=%08lx,"
104 "ebp=%08lx,eip=%08lx,esp=%08lx,eflags=%08lx,cs=%04lx,ds=%04lx,es=%04lx,"
105 "fs=%04lx,gs=%04lx,dr0=%08lx,dr1=%08lx,dr2=%08lx,dr3=%08lx,dr6=%08lx,dr7=%08lx,",
106 context->ContextFlags, context->Eax, context->Ebx, context->Ecx, context->Edx,
107 context->Esi, context->Edi, context->Ebp, context->Eip, context->Esp, context->EFlags,
108 context->SegCs, context->SegDs, context->SegEs, context->SegFs, context->SegGs,
109 context->Dr0, context->Dr1, context->Dr2, context->Dr3, context->Dr6, context->Dr7 );
110 fprintf( stderr, "float=" );
111 dump_uints( (int *)&context->FloatSave, sizeof(context->FloatSave) / sizeof(int) );
112 fprintf( stderr, "}" );
114 dump_uints( (int *)context, sizeof(*context) / sizeof(int) );
118 static void dump_exc_record( const EXCEPTION_RECORD *rec )
121 fprintf( stderr, "{code=%lx,flags=%lx,rec=%p,addr=%p,params={",
122 rec->ExceptionCode, rec->ExceptionFlags, rec->ExceptionRecord,
123 rec->ExceptionAddress );
124 for (i = 0; i < min(rec->NumberParameters,EXCEPTION_MAXIMUM_PARAMETERS); i++)
126 if (i) fputc( ',', stderr );
127 fprintf( stderr, "%lx", rec->ExceptionInformation[i] );
129 fputc( '}', stderr );
132 static void dump_varargs_ints( size_t size )
134 const int *data = cur_data;
135 size_t len = size / sizeof(*data);
137 fputc( '{', stderr );
140 fprintf( stderr, "%d", *data++ );
141 if (--len) fputc( ',', stderr );
143 fputc( '}', stderr );
147 static void dump_varargs_handles( size_t size )
149 const obj_handle_t *data = cur_data;
150 size_t len = size / sizeof(*data);
152 fputc( '{', stderr );
155 fprintf( stderr, "%p", *data++ );
156 if (--len) fputc( ',', stderr );
158 fputc( '}', stderr );
162 static void dump_varargs_user_handles( size_t size )
164 const user_handle_t *data = cur_data;
165 size_t len = size / sizeof(*data);
167 fputc( '{', stderr );
170 fprintf( stderr, "%p", *data++ );
171 if (--len) fputc( ',', stderr );
173 fputc( '}', stderr );
177 static void dump_varargs_bytes( size_t size )
179 const unsigned char *data = cur_data;
182 fputc( '{', stderr );
185 fprintf( stderr, "%02x", *data++ );
186 if (--len) fputc( ',', stderr );
188 fputc( '}', stderr );
192 static void dump_varargs_string( size_t size )
194 fprintf( stderr, "\"%.*s\"", (int)size, (char *)cur_data );
198 static void dump_varargs_unicode_str( size_t size )
200 fprintf( stderr, "L\"" );
201 dump_strW( cur_data, size / sizeof(WCHAR), stderr, "\"\"" );
202 fputc( '\"', stderr );
206 static void dump_varargs_context( size_t size )
210 fprintf( stderr, "{}" );
213 dump_context( cur_data );
217 static void dump_varargs_exc_event( size_t size )
219 const CONTEXT *ptr = cur_data;
223 fprintf( stderr, "{}" );
226 fprintf( stderr, "{context=" );
228 fprintf( stderr, ",rec=" );
229 dump_exc_record( (EXCEPTION_RECORD *)(ptr + 1) );
230 fputc( '}', stderr );
234 static void dump_varargs_debug_event( size_t size )
236 const debug_event_t *event = cur_data;
240 fprintf( stderr, "{}" );
245 case EXCEPTION_DEBUG_EVENT:
246 fprintf( stderr, "{exception," );
247 dump_exc_record( &event->info.exception.record );
248 fprintf( stderr, ",first=%d}", event->info.exception.first );
250 case CREATE_THREAD_DEBUG_EVENT:
251 fprintf( stderr, "{create_thread,thread=%p,teb=%p,start=%p}",
252 event->info.create_thread.handle, event->info.create_thread.teb,
253 event->info.create_thread.start );
255 case CREATE_PROCESS_DEBUG_EVENT:
256 fprintf( stderr, "{create_process,file=%p,process=%p,thread=%p,base=%p,offset=%d,"
257 "size=%d,teb=%p,start=%p,name=%p,unicode=%d}",
258 event->info.create_process.file, event->info.create_process.process,
259 event->info.create_process.thread, event->info.create_process.base,
260 event->info.create_process.dbg_offset, event->info.create_process.dbg_size,
261 event->info.create_process.teb, event->info.create_process.start,
262 event->info.create_process.name, event->info.create_process.unicode );
264 case EXIT_THREAD_DEBUG_EVENT:
265 fprintf( stderr, "{exit_thread,code=%d}", event->info.exit.exit_code );
267 case EXIT_PROCESS_DEBUG_EVENT:
268 fprintf( stderr, "{exit_process,code=%d}", event->info.exit.exit_code );
270 case LOAD_DLL_DEBUG_EVENT:
271 fprintf( stderr, "{load_dll,file=%p,base=%p,offset=%d,size=%d,name=%p,unicode=%d}",
272 event->info.load_dll.handle, event->info.load_dll.base,
273 event->info.load_dll.dbg_offset, event->info.load_dll.dbg_size,
274 event->info.load_dll.name, event->info.load_dll.unicode );
276 case UNLOAD_DLL_DEBUG_EVENT:
277 fprintf( stderr, "{unload_dll,base=%p}", event->info.unload_dll.base );
279 case OUTPUT_DEBUG_STRING_EVENT:
280 fprintf( stderr, "{output_string,data=%p,unicode=%d,len=%d}",
281 event->info.output_string.string, event->info.output_string.unicode,
282 event->info.output_string.length );
285 fprintf( stderr, "{rip,err=%d,type=%d}",
286 event->info.rip_info.error, event->info.rip_info.type );
288 case 0: /* zero is the code returned on timeouts */
289 fprintf( stderr, "{}" );
292 fprintf( stderr, "{code=??? (%d)}", event->code );
298 /* dump a unicode string contained in a buffer; helper for dump_varargs_startup_info */
299 static void dump_inline_unicode_string( const UNICODE_STRING *str, const void *data, size_t size )
301 size_t length = str->Length / sizeof(WCHAR);
302 size_t offset = (size_t)str->Buffer;
304 if (offset >= size) return;
305 if (offset + length > size) length = size - offset;
306 dump_strW( (const WCHAR *)data + offset/sizeof(WCHAR), length, stderr, "\"\"" );
309 static void dump_varargs_startup_info( size_t size )
311 const RTL_USER_PROCESS_PARAMETERS *ptr = cur_data;
312 RTL_USER_PROCESS_PARAMETERS params;
314 if (size < sizeof(params.Size))
316 fprintf( stderr, "{}" );
319 if (size > ptr->Size) size = ptr->Size;
320 memset( ¶ms, 0, sizeof(params) );
321 memcpy( ¶ms, ptr, min( size, sizeof(params) ));
323 fprintf( stderr, "{AllocationSize=%lx,", params.AllocationSize );
324 fprintf( stderr, "Size=%lx,", params.Size );
325 fprintf( stderr, "Flags=%lx,", params.Flags );
326 fprintf( stderr, "DebugFlags=%lx,", params.DebugFlags );
327 fprintf( stderr, "Console=%p,", params.hConsole );
328 fprintf( stderr, "ProcessGroup=%lx,", params.ProcessGroup );
329 fprintf( stderr, "hStdInput=%p,", params.hStdInput );
330 fprintf( stderr, "hStdOutput=%p,", params.hStdOutput );
331 fprintf( stderr, "hStdError=%p,", params.hStdError );
332 fprintf( stderr, "CurrentDirectoryHandle=%p,", params.CurrentDirectoryHandle );
333 fprintf( stderr, "dwX=%ld,", params.dwX );
334 fprintf( stderr, "dwY=%ld,", params.dwY );
335 fprintf( stderr, "dwXSize=%ld,", params.dwXSize );
336 fprintf( stderr, "dwYSize=%ld,", params.dwYSize );
337 fprintf( stderr, "dwXCountChars=%ld,", params.dwXCountChars );
338 fprintf( stderr, "dwYCountChars=%ld,", params.dwYCountChars );
339 fprintf( stderr, "dwFillAttribute=%lx,", params.dwFillAttribute );
340 fprintf( stderr, "dwFlags=%lx,", params.dwFlags );
341 fprintf( stderr, "wShowWindow=%lx,", params.wShowWindow );
342 fprintf( stderr, "CurrentDirectoryName=L\"" );
343 dump_inline_unicode_string( ¶ms.CurrentDirectoryName, cur_data, size );
344 fprintf( stderr, "\",DllPath=L\"" );
345 dump_inline_unicode_string( ¶ms.DllPath, cur_data, size );
346 fprintf( stderr, "\",ImagePathName=L\"" );
347 dump_inline_unicode_string( ¶ms.ImagePathName, cur_data, size );
348 fprintf( stderr, "\",CommandLine=L\"" );
349 dump_inline_unicode_string( ¶ms.CommandLine, cur_data, size );
350 fprintf( stderr, "\",WindowTitle=L\"" );
351 dump_inline_unicode_string( ¶ms.WindowTitle, cur_data, size );
352 fprintf( stderr, "\",Desktop=L\"" );
353 dump_inline_unicode_string( ¶ms.Desktop, cur_data, size );
354 fprintf( stderr, "\",ShellInfo=L\"" );
355 dump_inline_unicode_string( ¶ms.ShellInfo, cur_data, size );
356 fprintf( stderr, "\",RuntimeInfo=L\"" );
357 dump_inline_unicode_string( ¶ms.RuntimeInfo, cur_data, size );
358 fprintf( stderr, "\"}" );
362 static void dump_varargs_input_records( size_t size )
364 const INPUT_RECORD *rec = cur_data;
365 size_t len = size / sizeof(*rec);
367 fputc( '{', stderr );
370 fprintf( stderr, "{%04x,...}", rec->EventType );
372 if (--len) fputc( ',', stderr );
374 fputc( '}', stderr );
378 static void dump_varargs_properties( size_t size )
380 const property_data_t *prop = cur_data;
381 size_t len = size / sizeof(*prop);
383 fputc( '{', stderr );
386 fprintf( stderr, "{atom=%04x,str=%d,handle=%p}",
387 prop->atom, prop->string, prop->handle );
389 if (--len) fputc( ',', stderr );
391 fputc( '}', stderr );
395 typedef void (*dump_func)( const void *req );
397 /* Everything below this line is generated automatically by tools/make_requests */
398 /* ### make_requests begin ### */
400 static void dump_new_process_request( const struct new_process_request *req )
402 fprintf( stderr, " inherit_all=%d,", req->inherit_all );
403 fprintf( stderr, " create_flags=%d,", req->create_flags );
404 fprintf( stderr, " unix_pid=%d,", req->unix_pid );
405 fprintf( stderr, " exe_file=%p,", req->exe_file );
406 fprintf( stderr, " hstdin=%p,", req->hstdin );
407 fprintf( stderr, " hstdout=%p,", req->hstdout );
408 fprintf( stderr, " hstderr=%p,", req->hstderr );
409 fprintf( stderr, " info=" );
410 dump_varargs_startup_info( cur_size );
413 static void dump_new_process_reply( const struct new_process_reply *req )
415 fprintf( stderr, " info=%p", req->info );
418 static void dump_get_new_process_info_request( const struct get_new_process_info_request *req )
420 fprintf( stderr, " info=%p,", req->info );
421 fprintf( stderr, " pinherit=%d,", req->pinherit );
422 fprintf( stderr, " tinherit=%d", req->tinherit );
425 static void dump_get_new_process_info_reply( const struct get_new_process_info_reply *req )
427 fprintf( stderr, " pid=%04x,", req->pid );
428 fprintf( stderr, " phandle=%p,", req->phandle );
429 fprintf( stderr, " tid=%04x,", req->tid );
430 fprintf( stderr, " thandle=%p,", req->thandle );
431 fprintf( stderr, " success=%d", req->success );
434 static void dump_new_thread_request( const struct new_thread_request *req )
436 fprintf( stderr, " suspend=%d,", req->suspend );
437 fprintf( stderr, " inherit=%d,", req->inherit );
438 fprintf( stderr, " request_fd=%d", req->request_fd );
441 static void dump_new_thread_reply( const struct new_thread_reply *req )
443 fprintf( stderr, " tid=%04x,", req->tid );
444 fprintf( stderr, " handle=%p", req->handle );
447 static void dump_boot_done_request( const struct boot_done_request *req )
449 fprintf( stderr, " debug_level=%d", req->debug_level );
452 static void dump_init_process_request( const struct init_process_request *req )
454 fprintf( stderr, " peb=%p,", req->peb );
455 fprintf( stderr, " ldt_copy=%p", req->ldt_copy );
458 static void dump_init_process_reply( const struct init_process_reply *req )
460 fprintf( stderr, " create_flags=%d,", req->create_flags );
461 fprintf( stderr, " server_start=%08x,", req->server_start );
462 fprintf( stderr, " info_size=%d,", req->info_size );
463 fprintf( stderr, " exe_file=%p,", req->exe_file );
464 fprintf( stderr, " hstdin=%p,", req->hstdin );
465 fprintf( stderr, " hstdout=%p,", req->hstdout );
466 fprintf( stderr, " hstderr=%p", req->hstderr );
469 static void dump_get_startup_info_request( const struct get_startup_info_request *req )
473 static void dump_get_startup_info_reply( const struct get_startup_info_reply *req )
475 fprintf( stderr, " info=" );
476 dump_varargs_startup_info( cur_size );
479 static void dump_init_process_done_request( const struct init_process_done_request *req )
481 fprintf( stderr, " module=%p,", req->module );
482 fprintf( stderr, " module_size=%d,", req->module_size );
483 fprintf( stderr, " entry=%p,", req->entry );
484 fprintf( stderr, " name=%p,", req->name );
485 fprintf( stderr, " exe_file=%p,", req->exe_file );
486 fprintf( stderr, " gui=%d,", req->gui );
487 fprintf( stderr, " filename=" );
488 dump_varargs_unicode_str( cur_size );
491 static void dump_init_thread_request( const struct init_thread_request *req )
493 fprintf( stderr, " unix_pid=%d,", req->unix_pid );
494 fprintf( stderr, " unix_tid=%d,", req->unix_tid );
495 fprintf( stderr, " teb=%p,", req->teb );
496 fprintf( stderr, " entry=%p,", req->entry );
497 fprintf( stderr, " reply_fd=%d,", req->reply_fd );
498 fprintf( stderr, " wait_fd=%d", req->wait_fd );
501 static void dump_init_thread_reply( const struct init_thread_reply *req )
503 fprintf( stderr, " pid=%04x,", req->pid );
504 fprintf( stderr, " tid=%04x,", req->tid );
505 fprintf( stderr, " boot=%d,", req->boot );
506 fprintf( stderr, " version=%d", req->version );
509 static void dump_terminate_process_request( const struct terminate_process_request *req )
511 fprintf( stderr, " handle=%p,", req->handle );
512 fprintf( stderr, " exit_code=%d", req->exit_code );
515 static void dump_terminate_process_reply( const struct terminate_process_reply *req )
517 fprintf( stderr, " self=%d", req->self );
520 static void dump_terminate_thread_request( const struct terminate_thread_request *req )
522 fprintf( stderr, " handle=%p,", req->handle );
523 fprintf( stderr, " exit_code=%d", req->exit_code );
526 static void dump_terminate_thread_reply( const struct terminate_thread_reply *req )
528 fprintf( stderr, " self=%d,", req->self );
529 fprintf( stderr, " last=%d", req->last );
532 static void dump_get_process_info_request( const struct get_process_info_request *req )
534 fprintf( stderr, " handle=%p", req->handle );
537 static void dump_get_process_info_reply( const struct get_process_info_reply *req )
539 fprintf( stderr, " pid=%04x,", req->pid );
540 fprintf( stderr, " exit_code=%d,", req->exit_code );
541 fprintf( stderr, " priority=%d,", req->priority );
542 fprintf( stderr, " process_affinity=%d,", req->process_affinity );
543 fprintf( stderr, " system_affinity=%d", req->system_affinity );
546 static void dump_set_process_info_request( const struct set_process_info_request *req )
548 fprintf( stderr, " handle=%p,", req->handle );
549 fprintf( stderr, " mask=%d,", req->mask );
550 fprintf( stderr, " priority=%d,", req->priority );
551 fprintf( stderr, " affinity=%d", req->affinity );
554 static void dump_get_thread_info_request( const struct get_thread_info_request *req )
556 fprintf( stderr, " handle=%p,", req->handle );
557 fprintf( stderr, " tid_in=%04x", req->tid_in );
560 static void dump_get_thread_info_reply( const struct get_thread_info_reply *req )
562 fprintf( stderr, " pid=%04x,", req->pid );
563 fprintf( stderr, " tid=%04x,", req->tid );
564 fprintf( stderr, " teb=%p,", req->teb );
565 fprintf( stderr, " exit_code=%d,", req->exit_code );
566 fprintf( stderr, " priority=%d,", req->priority );
567 fprintf( stderr, " affinity=%d,", req->affinity );
568 fprintf( stderr, " creation_time=%ld,", (long)req->creation_time );
569 fprintf( stderr, " exit_time=%ld", (long)req->exit_time );
572 static void dump_set_thread_info_request( const struct set_thread_info_request *req )
574 fprintf( stderr, " handle=%p,", req->handle );
575 fprintf( stderr, " mask=%d,", req->mask );
576 fprintf( stderr, " priority=%d,", req->priority );
577 fprintf( stderr, " affinity=%d", req->affinity );
580 static void dump_get_dll_info_request( const struct get_dll_info_request *req )
582 fprintf( stderr, " handle=%p,", req->handle );
583 fprintf( stderr, " base_address=%p", req->base_address );
586 static void dump_get_dll_info_reply( const struct get_dll_info_reply *req )
588 fprintf( stderr, " size=%d,", req->size );
589 fprintf( stderr, " entry_point=%p,", req->entry_point );
590 fprintf( stderr, " filename=" );
591 dump_varargs_unicode_str( cur_size );
594 static void dump_suspend_thread_request( const struct suspend_thread_request *req )
596 fprintf( stderr, " handle=%p", req->handle );
599 static void dump_suspend_thread_reply( const struct suspend_thread_reply *req )
601 fprintf( stderr, " count=%d", req->count );
604 static void dump_resume_thread_request( const struct resume_thread_request *req )
606 fprintf( stderr, " handle=%p", req->handle );
609 static void dump_resume_thread_reply( const struct resume_thread_reply *req )
611 fprintf( stderr, " count=%d", req->count );
614 static void dump_load_dll_request( const struct load_dll_request *req )
616 fprintf( stderr, " handle=%p,", req->handle );
617 fprintf( stderr, " base=%p,", req->base );
618 fprintf( stderr, " size=%d,", req->size );
619 fprintf( stderr, " dbg_offset=%d,", req->dbg_offset );
620 fprintf( stderr, " dbg_size=%d,", req->dbg_size );
621 fprintf( stderr, " name=%p,", req->name );
622 fprintf( stderr, " filename=" );
623 dump_varargs_unicode_str( cur_size );
626 static void dump_unload_dll_request( const struct unload_dll_request *req )
628 fprintf( stderr, " base=%p", req->base );
631 static void dump_queue_apc_request( const struct queue_apc_request *req )
633 fprintf( stderr, " handle=%p,", req->handle );
634 fprintf( stderr, " user=%d,", req->user );
635 fprintf( stderr, " func=%p,", req->func );
636 fprintf( stderr, " arg1=%p,", req->arg1 );
637 fprintf( stderr, " arg2=%p,", req->arg2 );
638 fprintf( stderr, " arg3=%p", req->arg3 );
641 static void dump_get_apc_request( const struct get_apc_request *req )
643 fprintf( stderr, " alertable=%d", req->alertable );
646 static void dump_get_apc_reply( const struct get_apc_reply *req )
648 fprintf( stderr, " func=%p,", req->func );
649 fprintf( stderr, " type=%d,", req->type );
650 fprintf( stderr, " arg1=%p,", req->arg1 );
651 fprintf( stderr, " arg2=%p,", req->arg2 );
652 fprintf( stderr, " arg3=%p", req->arg3 );
655 static void dump_close_handle_request( const struct close_handle_request *req )
657 fprintf( stderr, " handle=%p", req->handle );
660 static void dump_close_handle_reply( const struct close_handle_reply *req )
662 fprintf( stderr, " fd=%d", req->fd );
665 static void dump_set_handle_info_request( const struct set_handle_info_request *req )
667 fprintf( stderr, " handle=%p,", req->handle );
668 fprintf( stderr, " flags=%d,", req->flags );
669 fprintf( stderr, " mask=%d,", req->mask );
670 fprintf( stderr, " fd=%d", req->fd );
673 static void dump_set_handle_info_reply( const struct set_handle_info_reply *req )
675 fprintf( stderr, " old_flags=%d,", req->old_flags );
676 fprintf( stderr, " cur_fd=%d", req->cur_fd );
679 static void dump_dup_handle_request( const struct dup_handle_request *req )
681 fprintf( stderr, " src_process=%p,", req->src_process );
682 fprintf( stderr, " src_handle=%p,", req->src_handle );
683 fprintf( stderr, " dst_process=%p,", req->dst_process );
684 fprintf( stderr, " access=%08x,", req->access );
685 fprintf( stderr, " inherit=%d,", req->inherit );
686 fprintf( stderr, " options=%d", req->options );
689 static void dump_dup_handle_reply( const struct dup_handle_reply *req )
691 fprintf( stderr, " handle=%p,", req->handle );
692 fprintf( stderr, " fd=%d", req->fd );
695 static void dump_open_process_request( const struct open_process_request *req )
697 fprintf( stderr, " pid=%04x,", req->pid );
698 fprintf( stderr, " access=%08x,", req->access );
699 fprintf( stderr, " inherit=%d", req->inherit );
702 static void dump_open_process_reply( const struct open_process_reply *req )
704 fprintf( stderr, " handle=%p", req->handle );
707 static void dump_open_thread_request( const struct open_thread_request *req )
709 fprintf( stderr, " tid=%04x,", req->tid );
710 fprintf( stderr, " access=%08x,", req->access );
711 fprintf( stderr, " inherit=%d", req->inherit );
714 static void dump_open_thread_reply( const struct open_thread_reply *req )
716 fprintf( stderr, " handle=%p", req->handle );
719 static void dump_select_request( const struct select_request *req )
721 fprintf( stderr, " flags=%d,", req->flags );
722 fprintf( stderr, " cookie=%p,", req->cookie );
723 fprintf( stderr, " timeout=" );
724 dump_abs_time( &req->timeout );
725 fprintf( stderr, "," );
726 fprintf( stderr, " handles=" );
727 dump_varargs_handles( cur_size );
730 static void dump_create_event_request( const struct create_event_request *req )
732 fprintf( stderr, " manual_reset=%d,", req->manual_reset );
733 fprintf( stderr, " initial_state=%d,", req->initial_state );
734 fprintf( stderr, " inherit=%d,", req->inherit );
735 fprintf( stderr, " name=" );
736 dump_varargs_unicode_str( cur_size );
739 static void dump_create_event_reply( const struct create_event_reply *req )
741 fprintf( stderr, " handle=%p", req->handle );
744 static void dump_event_op_request( const struct event_op_request *req )
746 fprintf( stderr, " handle=%p,", req->handle );
747 fprintf( stderr, " op=%d", req->op );
750 static void dump_open_event_request( const struct open_event_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_event_reply( const struct open_event_reply *req )
760 fprintf( stderr, " handle=%p", req->handle );
763 static void dump_create_mutex_request( const struct create_mutex_request *req )
765 fprintf( stderr, " owned=%d,", req->owned );
766 fprintf( stderr, " inherit=%d,", req->inherit );
767 fprintf( stderr, " name=" );
768 dump_varargs_unicode_str( cur_size );
771 static void dump_create_mutex_reply( const struct create_mutex_reply *req )
773 fprintf( stderr, " handle=%p", req->handle );
776 static void dump_release_mutex_request( const struct release_mutex_request *req )
778 fprintf( stderr, " handle=%p", req->handle );
781 static void dump_open_mutex_request( const struct open_mutex_request *req )
783 fprintf( stderr, " access=%08x,", req->access );
784 fprintf( stderr, " inherit=%d,", req->inherit );
785 fprintf( stderr, " name=" );
786 dump_varargs_unicode_str( cur_size );
789 static void dump_open_mutex_reply( const struct open_mutex_reply *req )
791 fprintf( stderr, " handle=%p", req->handle );
794 static void dump_create_semaphore_request( const struct create_semaphore_request *req )
796 fprintf( stderr, " initial=%08x,", req->initial );
797 fprintf( stderr, " max=%08x,", req->max );
798 fprintf( stderr, " inherit=%d,", req->inherit );
799 fprintf( stderr, " name=" );
800 dump_varargs_unicode_str( cur_size );
803 static void dump_create_semaphore_reply( const struct create_semaphore_reply *req )
805 fprintf( stderr, " handle=%p", req->handle );
808 static void dump_release_semaphore_request( const struct release_semaphore_request *req )
810 fprintf( stderr, " handle=%p,", req->handle );
811 fprintf( stderr, " count=%08x", req->count );
814 static void dump_release_semaphore_reply( const struct release_semaphore_reply *req )
816 fprintf( stderr, " prev_count=%08x", req->prev_count );
819 static void dump_open_semaphore_request( const struct open_semaphore_request *req )
821 fprintf( stderr, " access=%08x,", req->access );
822 fprintf( stderr, " inherit=%d,", req->inherit );
823 fprintf( stderr, " name=" );
824 dump_varargs_unicode_str( cur_size );
827 static void dump_open_semaphore_reply( const struct open_semaphore_reply *req )
829 fprintf( stderr, " handle=%p", req->handle );
832 static void dump_create_file_request( const struct create_file_request *req )
834 fprintf( stderr, " access=%08x,", req->access );
835 fprintf( stderr, " inherit=%d,", req->inherit );
836 fprintf( stderr, " sharing=%08x,", req->sharing );
837 fprintf( stderr, " create=%d,", req->create );
838 fprintf( stderr, " options=%08x,", req->options );
839 fprintf( stderr, " attrs=%08x,", req->attrs );
840 fprintf( stderr, " removable=%d,", req->removable );
841 fprintf( stderr, " filename=" );
842 dump_varargs_string( cur_size );
845 static void dump_create_file_reply( const struct create_file_reply *req )
847 fprintf( stderr, " handle=%p", req->handle );
850 static void dump_alloc_file_handle_request( const struct alloc_file_handle_request *req )
852 fprintf( stderr, " access=%08x,", req->access );
853 fprintf( stderr, " inherit=%d,", req->inherit );
854 fprintf( stderr, " fd=%d", req->fd );
857 static void dump_alloc_file_handle_reply( const struct alloc_file_handle_reply *req )
859 fprintf( stderr, " handle=%p", req->handle );
862 static void dump_get_handle_fd_request( const struct get_handle_fd_request *req )
864 fprintf( stderr, " handle=%p,", req->handle );
865 fprintf( stderr, " access=%08x", req->access );
868 static void dump_get_handle_fd_reply( const struct get_handle_fd_reply *req )
870 fprintf( stderr, " fd=%d,", req->fd );
871 fprintf( stderr, " type=%d,", req->type );
872 fprintf( stderr, " flags=%d", req->flags );
875 static void dump_set_file_pointer_request( const struct set_file_pointer_request *req )
877 fprintf( stderr, " handle=%p,", req->handle );
878 fprintf( stderr, " low=%d,", req->low );
879 fprintf( stderr, " high=%d,", req->high );
880 fprintf( stderr, " whence=%d", req->whence );
883 static void dump_set_file_pointer_reply( const struct set_file_pointer_reply *req )
885 fprintf( stderr, " new_low=%d,", req->new_low );
886 fprintf( stderr, " new_high=%d", req->new_high );
889 static void dump_truncate_file_request( const struct truncate_file_request *req )
891 fprintf( stderr, " handle=%p", req->handle );
894 static void dump_flush_file_request( const struct flush_file_request *req )
896 fprintf( stderr, " handle=%p", req->handle );
899 static void dump_flush_file_reply( const struct flush_file_reply *req )
901 fprintf( stderr, " event=%p", req->event );
904 static void dump_get_file_info_request( const struct get_file_info_request *req )
906 fprintf( stderr, " handle=%p", req->handle );
909 static void dump_get_file_info_reply( const struct get_file_info_reply *req )
911 fprintf( stderr, " type=%d,", req->type );
912 fprintf( stderr, " attr=%d,", req->attr );
913 fprintf( stderr, " access_time=%ld,", (long)req->access_time );
914 fprintf( stderr, " write_time=%ld,", (long)req->write_time );
915 fprintf( stderr, " change_time=%ld,", (long)req->change_time );
916 fprintf( stderr, " size_high=%d,", req->size_high );
917 fprintf( stderr, " size_low=%d,", req->size_low );
918 fprintf( stderr, " alloc_high=%d,", req->alloc_high );
919 fprintf( stderr, " alloc_low=%d,", req->alloc_low );
920 fprintf( stderr, " links=%d,", req->links );
921 fprintf( stderr, " index_high=%d,", req->index_high );
922 fprintf( stderr, " index_low=%d,", req->index_low );
923 fprintf( stderr, " serial=%08x", req->serial );
926 static void dump_lock_file_request( const struct lock_file_request *req )
928 fprintf( stderr, " handle=%p,", req->handle );
929 fprintf( stderr, " offset_low=%08x,", req->offset_low );
930 fprintf( stderr, " offset_high=%08x,", req->offset_high );
931 fprintf( stderr, " count_low=%08x,", req->count_low );
932 fprintf( stderr, " count_high=%08x,", req->count_high );
933 fprintf( stderr, " shared=%d,", req->shared );
934 fprintf( stderr, " wait=%d", req->wait );
937 static void dump_lock_file_reply( const struct lock_file_reply *req )
939 fprintf( stderr, " handle=%p,", req->handle );
940 fprintf( stderr, " overlapped=%d", req->overlapped );
943 static void dump_unlock_file_request( const struct unlock_file_request *req )
945 fprintf( stderr, " handle=%p,", req->handle );
946 fprintf( stderr, " offset_low=%08x,", req->offset_low );
947 fprintf( stderr, " offset_high=%08x,", req->offset_high );
948 fprintf( stderr, " count_low=%08x,", req->count_low );
949 fprintf( stderr, " count_high=%08x", req->count_high );
952 static void dump_create_socket_request( const struct create_socket_request *req )
954 fprintf( stderr, " access=%08x,", req->access );
955 fprintf( stderr, " inherit=%d,", req->inherit );
956 fprintf( stderr, " family=%d,", req->family );
957 fprintf( stderr, " type=%d,", req->type );
958 fprintf( stderr, " protocol=%d,", req->protocol );
959 fprintf( stderr, " flags=%08x", req->flags );
962 static void dump_create_socket_reply( const struct create_socket_reply *req )
964 fprintf( stderr, " handle=%p", req->handle );
967 static void dump_accept_socket_request( const struct accept_socket_request *req )
969 fprintf( stderr, " lhandle=%p,", req->lhandle );
970 fprintf( stderr, " access=%08x,", req->access );
971 fprintf( stderr, " inherit=%d", req->inherit );
974 static void dump_accept_socket_reply( const struct accept_socket_reply *req )
976 fprintf( stderr, " handle=%p", req->handle );
979 static void dump_set_socket_event_request( const struct set_socket_event_request *req )
981 fprintf( stderr, " handle=%p,", req->handle );
982 fprintf( stderr, " mask=%08x,", req->mask );
983 fprintf( stderr, " event=%p,", req->event );
984 fprintf( stderr, " window=%p,", req->window );
985 fprintf( stderr, " msg=%08x", req->msg );
988 static void dump_get_socket_event_request( const struct get_socket_event_request *req )
990 fprintf( stderr, " handle=%p,", req->handle );
991 fprintf( stderr, " service=%d,", req->service );
992 fprintf( stderr, " c_event=%p", req->c_event );
995 static void dump_get_socket_event_reply( const struct get_socket_event_reply *req )
997 fprintf( stderr, " mask=%08x,", req->mask );
998 fprintf( stderr, " pmask=%08x,", req->pmask );
999 fprintf( stderr, " state=%08x,", req->state );
1000 fprintf( stderr, " errors=" );
1001 dump_varargs_ints( cur_size );
1004 static void dump_enable_socket_event_request( const struct enable_socket_event_request *req )
1006 fprintf( stderr, " handle=%p,", req->handle );
1007 fprintf( stderr, " mask=%08x,", req->mask );
1008 fprintf( stderr, " sstate=%08x,", req->sstate );
1009 fprintf( stderr, " cstate=%08x", req->cstate );
1012 static void dump_set_socket_deferred_request( const struct set_socket_deferred_request *req )
1014 fprintf( stderr, " handle=%p,", req->handle );
1015 fprintf( stderr, " deferred=%p", req->deferred );
1018 static void dump_alloc_console_request( const struct alloc_console_request *req )
1020 fprintf( stderr, " access=%08x,", req->access );
1021 fprintf( stderr, " inherit=%d,", req->inherit );
1022 fprintf( stderr, " pid=%04x", req->pid );
1025 static void dump_alloc_console_reply( const struct alloc_console_reply *req )
1027 fprintf( stderr, " handle_in=%p,", req->handle_in );
1028 fprintf( stderr, " event=%p", req->event );
1031 static void dump_free_console_request( const struct free_console_request *req )
1035 static void dump_get_console_renderer_events_request( const struct get_console_renderer_events_request *req )
1037 fprintf( stderr, " handle=%p", req->handle );
1040 static void dump_get_console_renderer_events_reply( const struct get_console_renderer_events_reply *req )
1042 fprintf( stderr, " data=" );
1043 dump_varargs_bytes( cur_size );
1046 static void dump_open_console_request( const struct open_console_request *req )
1048 fprintf( stderr, " from=%d,", req->from );
1049 fprintf( stderr, " access=%08x,", req->access );
1050 fprintf( stderr, " inherit=%d,", req->inherit );
1051 fprintf( stderr, " share=%d", req->share );
1054 static void dump_open_console_reply( const struct open_console_reply *req )
1056 fprintf( stderr, " handle=%p", req->handle );
1059 static void dump_get_console_wait_event_request( const struct get_console_wait_event_request *req )
1063 static void dump_get_console_wait_event_reply( const struct get_console_wait_event_reply *req )
1065 fprintf( stderr, " handle=%p", req->handle );
1068 static void dump_get_console_mode_request( const struct get_console_mode_request *req )
1070 fprintf( stderr, " handle=%p", req->handle );
1073 static void dump_get_console_mode_reply( const struct get_console_mode_reply *req )
1075 fprintf( stderr, " mode=%d", req->mode );
1078 static void dump_set_console_mode_request( const struct set_console_mode_request *req )
1080 fprintf( stderr, " handle=%p,", req->handle );
1081 fprintf( stderr, " mode=%d", req->mode );
1084 static void dump_set_console_input_info_request( const struct set_console_input_info_request *req )
1086 fprintf( stderr, " handle=%p,", req->handle );
1087 fprintf( stderr, " mask=%d,", req->mask );
1088 fprintf( stderr, " active_sb=%p,", req->active_sb );
1089 fprintf( stderr, " history_mode=%d,", req->history_mode );
1090 fprintf( stderr, " history_size=%d,", req->history_size );
1091 fprintf( stderr, " edition_mode=%d,", req->edition_mode );
1092 fprintf( stderr, " title=" );
1093 dump_varargs_unicode_str( cur_size );
1096 static void dump_get_console_input_info_request( const struct get_console_input_info_request *req )
1098 fprintf( stderr, " handle=%p", req->handle );
1101 static void dump_get_console_input_info_reply( const struct get_console_input_info_reply *req )
1103 fprintf( stderr, " history_mode=%d,", req->history_mode );
1104 fprintf( stderr, " history_size=%d,", req->history_size );
1105 fprintf( stderr, " history_index=%d,", req->history_index );
1106 fprintf( stderr, " edition_mode=%d,", req->edition_mode );
1107 fprintf( stderr, " title=" );
1108 dump_varargs_unicode_str( cur_size );
1111 static void dump_append_console_input_history_request( const struct append_console_input_history_request *req )
1113 fprintf( stderr, " handle=%p,", req->handle );
1114 fprintf( stderr, " line=" );
1115 dump_varargs_unicode_str( cur_size );
1118 static void dump_get_console_input_history_request( const struct get_console_input_history_request *req )
1120 fprintf( stderr, " handle=%p,", req->handle );
1121 fprintf( stderr, " index=%d", req->index );
1124 static void dump_get_console_input_history_reply( const struct get_console_input_history_reply *req )
1126 fprintf( stderr, " total=%d,", req->total );
1127 fprintf( stderr, " line=" );
1128 dump_varargs_unicode_str( cur_size );
1131 static void dump_create_console_output_request( const struct create_console_output_request *req )
1133 fprintf( stderr, " handle_in=%p,", req->handle_in );
1134 fprintf( stderr, " access=%d,", req->access );
1135 fprintf( stderr, " share=%d,", req->share );
1136 fprintf( stderr, " inherit=%d", req->inherit );
1139 static void dump_create_console_output_reply( const struct create_console_output_reply *req )
1141 fprintf( stderr, " handle_out=%p", req->handle_out );
1144 static void dump_set_console_output_info_request( const struct set_console_output_info_request *req )
1146 fprintf( stderr, " handle=%p,", req->handle );
1147 fprintf( stderr, " mask=%d,", req->mask );
1148 fprintf( stderr, " cursor_size=%d,", req->cursor_size );
1149 fprintf( stderr, " cursor_visible=%d,", req->cursor_visible );
1150 fprintf( stderr, " cursor_x=%d,", req->cursor_x );
1151 fprintf( stderr, " cursor_y=%d,", req->cursor_y );
1152 fprintf( stderr, " width=%d,", req->width );
1153 fprintf( stderr, " height=%d,", req->height );
1154 fprintf( stderr, " attr=%d,", req->attr );
1155 fprintf( stderr, " win_left=%d,", req->win_left );
1156 fprintf( stderr, " win_top=%d,", req->win_top );
1157 fprintf( stderr, " win_right=%d,", req->win_right );
1158 fprintf( stderr, " win_bottom=%d,", req->win_bottom );
1159 fprintf( stderr, " max_width=%d,", req->max_width );
1160 fprintf( stderr, " max_height=%d", req->max_height );
1163 static void dump_get_console_output_info_request( const struct get_console_output_info_request *req )
1165 fprintf( stderr, " handle=%p", req->handle );
1168 static void dump_get_console_output_info_reply( const struct get_console_output_info_reply *req )
1170 fprintf( stderr, " cursor_size=%d,", req->cursor_size );
1171 fprintf( stderr, " cursor_visible=%d,", req->cursor_visible );
1172 fprintf( stderr, " cursor_x=%d,", req->cursor_x );
1173 fprintf( stderr, " cursor_y=%d,", req->cursor_y );
1174 fprintf( stderr, " width=%d,", req->width );
1175 fprintf( stderr, " height=%d,", req->height );
1176 fprintf( stderr, " attr=%d,", req->attr );
1177 fprintf( stderr, " win_left=%d,", req->win_left );
1178 fprintf( stderr, " win_top=%d,", req->win_top );
1179 fprintf( stderr, " win_right=%d,", req->win_right );
1180 fprintf( stderr, " win_bottom=%d,", req->win_bottom );
1181 fprintf( stderr, " max_width=%d,", req->max_width );
1182 fprintf( stderr, " max_height=%d", req->max_height );
1185 static void dump_write_console_input_request( const struct write_console_input_request *req )
1187 fprintf( stderr, " handle=%p,", req->handle );
1188 fprintf( stderr, " rec=" );
1189 dump_varargs_input_records( cur_size );
1192 static void dump_write_console_input_reply( const struct write_console_input_reply *req )
1194 fprintf( stderr, " written=%d", req->written );
1197 static void dump_read_console_input_request( const struct read_console_input_request *req )
1199 fprintf( stderr, " handle=%p,", req->handle );
1200 fprintf( stderr, " flush=%d", req->flush );
1203 static void dump_read_console_input_reply( const struct read_console_input_reply *req )
1205 fprintf( stderr, " read=%d,", req->read );
1206 fprintf( stderr, " rec=" );
1207 dump_varargs_input_records( cur_size );
1210 static void dump_write_console_output_request( const struct write_console_output_request *req )
1212 fprintf( stderr, " handle=%p,", req->handle );
1213 fprintf( stderr, " x=%d,", req->x );
1214 fprintf( stderr, " y=%d,", req->y );
1215 fprintf( stderr, " mode=%d,", req->mode );
1216 fprintf( stderr, " wrap=%d,", req->wrap );
1217 fprintf( stderr, " data=" );
1218 dump_varargs_bytes( cur_size );
1221 static void dump_write_console_output_reply( const struct write_console_output_reply *req )
1223 fprintf( stderr, " written=%d,", req->written );
1224 fprintf( stderr, " width=%d,", req->width );
1225 fprintf( stderr, " height=%d", req->height );
1228 static void dump_fill_console_output_request( const struct fill_console_output_request *req )
1230 fprintf( stderr, " handle=%p,", req->handle );
1231 fprintf( stderr, " x=%d,", req->x );
1232 fprintf( stderr, " y=%d,", req->y );
1233 fprintf( stderr, " mode=%d,", req->mode );
1234 fprintf( stderr, " count=%d,", req->count );
1235 fprintf( stderr, " wrap=%d,", req->wrap );
1236 fprintf( stderr, " data=" );
1237 dump_char_info( &req->data );
1240 static void dump_fill_console_output_reply( const struct fill_console_output_reply *req )
1242 fprintf( stderr, " written=%d", req->written );
1245 static void dump_read_console_output_request( const struct read_console_output_request *req )
1247 fprintf( stderr, " handle=%p,", req->handle );
1248 fprintf( stderr, " x=%d,", req->x );
1249 fprintf( stderr, " y=%d,", req->y );
1250 fprintf( stderr, " mode=%d,", req->mode );
1251 fprintf( stderr, " wrap=%d", req->wrap );
1254 static void dump_read_console_output_reply( const struct read_console_output_reply *req )
1256 fprintf( stderr, " width=%d,", req->width );
1257 fprintf( stderr, " height=%d,", req->height );
1258 fprintf( stderr, " data=" );
1259 dump_varargs_bytes( cur_size );
1262 static void dump_move_console_output_request( const struct move_console_output_request *req )
1264 fprintf( stderr, " handle=%p,", req->handle );
1265 fprintf( stderr, " x_src=%d,", req->x_src );
1266 fprintf( stderr, " y_src=%d,", req->y_src );
1267 fprintf( stderr, " x_dst=%d,", req->x_dst );
1268 fprintf( stderr, " y_dst=%d,", req->y_dst );
1269 fprintf( stderr, " w=%d,", req->w );
1270 fprintf( stderr, " h=%d", req->h );
1273 static void dump_send_console_signal_request( const struct send_console_signal_request *req )
1275 fprintf( stderr, " signal=%d,", req->signal );
1276 fprintf( stderr, " group_id=%04x", req->group_id );
1279 static void dump_create_change_notification_request( const struct create_change_notification_request *req )
1281 fprintf( stderr, " handle=%p,", req->handle );
1282 fprintf( stderr, " subtree=%d,", req->subtree );
1283 fprintf( stderr, " filter=%08x", req->filter );
1286 static void dump_create_change_notification_reply( const struct create_change_notification_reply *req )
1288 fprintf( stderr, " handle=%p", req->handle );
1291 static void dump_next_change_notification_request( const struct next_change_notification_request *req )
1293 fprintf( stderr, " handle=%p", req->handle );
1296 static void dump_create_mapping_request( const struct create_mapping_request *req )
1298 fprintf( stderr, " size_high=%d,", req->size_high );
1299 fprintf( stderr, " size_low=%d,", req->size_low );
1300 fprintf( stderr, " protect=%d,", req->protect );
1301 fprintf( stderr, " access=%08x,", req->access );
1302 fprintf( stderr, " inherit=%d,", req->inherit );
1303 fprintf( stderr, " file_handle=%p,", req->file_handle );
1304 fprintf( stderr, " name=" );
1305 dump_varargs_unicode_str( cur_size );
1308 static void dump_create_mapping_reply( const struct create_mapping_reply *req )
1310 fprintf( stderr, " handle=%p", req->handle );
1313 static void dump_open_mapping_request( const struct open_mapping_request *req )
1315 fprintf( stderr, " access=%08x,", req->access );
1316 fprintf( stderr, " inherit=%d,", req->inherit );
1317 fprintf( stderr, " name=" );
1318 dump_varargs_unicode_str( cur_size );
1321 static void dump_open_mapping_reply( const struct open_mapping_reply *req )
1323 fprintf( stderr, " handle=%p", req->handle );
1326 static void dump_get_mapping_info_request( const struct get_mapping_info_request *req )
1328 fprintf( stderr, " handle=%p", req->handle );
1331 static void dump_get_mapping_info_reply( const struct get_mapping_info_reply *req )
1333 fprintf( stderr, " size_high=%d,", req->size_high );
1334 fprintf( stderr, " size_low=%d,", req->size_low );
1335 fprintf( stderr, " protect=%d,", req->protect );
1336 fprintf( stderr, " header_size=%d,", req->header_size );
1337 fprintf( stderr, " base=%p,", req->base );
1338 fprintf( stderr, " shared_file=%p,", req->shared_file );
1339 fprintf( stderr, " shared_size=%d,", req->shared_size );
1340 fprintf( stderr, " removable=%d", req->removable );
1343 static void dump_create_snapshot_request( const struct create_snapshot_request *req )
1345 fprintf( stderr, " inherit=%d,", req->inherit );
1346 fprintf( stderr, " flags=%d,", req->flags );
1347 fprintf( stderr, " pid=%04x", req->pid );
1350 static void dump_create_snapshot_reply( const struct create_snapshot_reply *req )
1352 fprintf( stderr, " handle=%p", req->handle );
1355 static void dump_next_process_request( const struct next_process_request *req )
1357 fprintf( stderr, " handle=%p,", req->handle );
1358 fprintf( stderr, " reset=%d", req->reset );
1361 static void dump_next_process_reply( const struct next_process_reply *req )
1363 fprintf( stderr, " count=%d,", req->count );
1364 fprintf( stderr, " pid=%04x,", req->pid );
1365 fprintf( stderr, " ppid=%04x,", req->ppid );
1366 fprintf( stderr, " heap=%p,", req->heap );
1367 fprintf( stderr, " module=%p,", req->module );
1368 fprintf( stderr, " threads=%d,", req->threads );
1369 fprintf( stderr, " priority=%d,", req->priority );
1370 fprintf( stderr, " handles=%d,", req->handles );
1371 fprintf( stderr, " filename=" );
1372 dump_varargs_unicode_str( cur_size );
1375 static void dump_next_thread_request( const struct next_thread_request *req )
1377 fprintf( stderr, " handle=%p,", req->handle );
1378 fprintf( stderr, " reset=%d", req->reset );
1381 static void dump_next_thread_reply( const struct next_thread_reply *req )
1383 fprintf( stderr, " count=%d,", req->count );
1384 fprintf( stderr, " pid=%04x,", req->pid );
1385 fprintf( stderr, " tid=%04x,", req->tid );
1386 fprintf( stderr, " base_pri=%d,", req->base_pri );
1387 fprintf( stderr, " delta_pri=%d", req->delta_pri );
1390 static void dump_next_module_request( const struct next_module_request *req )
1392 fprintf( stderr, " handle=%p,", req->handle );
1393 fprintf( stderr, " reset=%d", req->reset );
1396 static void dump_next_module_reply( const struct next_module_reply *req )
1398 fprintf( stderr, " pid=%04x,", req->pid );
1399 fprintf( stderr, " base=%p,", req->base );
1400 fprintf( stderr, " size=%d,", req->size );
1401 fprintf( stderr, " filename=" );
1402 dump_varargs_unicode_str( cur_size );
1405 static void dump_wait_debug_event_request( const struct wait_debug_event_request *req )
1407 fprintf( stderr, " get_handle=%d", req->get_handle );
1410 static void dump_wait_debug_event_reply( const struct wait_debug_event_reply *req )
1412 fprintf( stderr, " pid=%04x,", req->pid );
1413 fprintf( stderr, " tid=%04x,", req->tid );
1414 fprintf( stderr, " wait=%p,", req->wait );
1415 fprintf( stderr, " event=" );
1416 dump_varargs_debug_event( cur_size );
1419 static void dump_queue_exception_event_request( const struct queue_exception_event_request *req )
1421 fprintf( stderr, " first=%d,", req->first );
1422 fprintf( stderr, " record=" );
1423 dump_varargs_exc_event( cur_size );
1426 static void dump_queue_exception_event_reply( const struct queue_exception_event_reply *req )
1428 fprintf( stderr, " handle=%p", req->handle );
1431 static void dump_get_exception_status_request( const struct get_exception_status_request *req )
1433 fprintf( stderr, " handle=%p", req->handle );
1436 static void dump_get_exception_status_reply( const struct get_exception_status_reply *req )
1438 fprintf( stderr, " status=%d,", req->status );
1439 fprintf( stderr, " context=" );
1440 dump_varargs_context( cur_size );
1443 static void dump_output_debug_string_request( const struct output_debug_string_request *req )
1445 fprintf( stderr, " string=%p,", req->string );
1446 fprintf( stderr, " unicode=%d,", req->unicode );
1447 fprintf( stderr, " length=%d", req->length );
1450 static void dump_continue_debug_event_request( const struct continue_debug_event_request *req )
1452 fprintf( stderr, " pid=%04x,", req->pid );
1453 fprintf( stderr, " tid=%04x,", req->tid );
1454 fprintf( stderr, " status=%d", req->status );
1457 static void dump_debug_process_request( const struct debug_process_request *req )
1459 fprintf( stderr, " pid=%04x,", req->pid );
1460 fprintf( stderr, " attach=%d", req->attach );
1463 static void dump_debug_break_request( const struct debug_break_request *req )
1465 fprintf( stderr, " handle=%p", req->handle );
1468 static void dump_debug_break_reply( const struct debug_break_reply *req )
1470 fprintf( stderr, " self=%d", req->self );
1473 static void dump_set_debugger_kill_on_exit_request( const struct set_debugger_kill_on_exit_request *req )
1475 fprintf( stderr, " kill_on_exit=%d", req->kill_on_exit );
1478 static void dump_read_process_memory_request( const struct read_process_memory_request *req )
1480 fprintf( stderr, " handle=%p,", req->handle );
1481 fprintf( stderr, " addr=%p", req->addr );
1484 static void dump_read_process_memory_reply( const struct read_process_memory_reply *req )
1486 fprintf( stderr, " data=" );
1487 dump_varargs_bytes( cur_size );
1490 static void dump_write_process_memory_request( const struct write_process_memory_request *req )
1492 fprintf( stderr, " handle=%p,", req->handle );
1493 fprintf( stderr, " addr=%p,", req->addr );
1494 fprintf( stderr, " first_mask=%08x,", req->first_mask );
1495 fprintf( stderr, " last_mask=%08x,", req->last_mask );
1496 fprintf( stderr, " data=" );
1497 dump_varargs_bytes( cur_size );
1500 static void dump_create_key_request( const struct create_key_request *req )
1502 fprintf( stderr, " parent=%p,", req->parent );
1503 fprintf( stderr, " access=%08x,", req->access );
1504 fprintf( stderr, " options=%08x,", req->options );
1505 fprintf( stderr, " modif=%ld,", (long)req->modif );
1506 fprintf( stderr, " namelen=%d,", req->namelen );
1507 fprintf( stderr, " name=" );
1508 dump_varargs_unicode_str( min(cur_size,req->namelen) );
1509 fputc( ',', stderr );
1510 fprintf( stderr, " class=" );
1511 dump_varargs_unicode_str( cur_size );
1514 static void dump_create_key_reply( const struct create_key_reply *req )
1516 fprintf( stderr, " hkey=%p,", req->hkey );
1517 fprintf( stderr, " created=%d", req->created );
1520 static void dump_open_key_request( const struct open_key_request *req )
1522 fprintf( stderr, " parent=%p,", req->parent );
1523 fprintf( stderr, " access=%08x,", req->access );
1524 fprintf( stderr, " name=" );
1525 dump_varargs_unicode_str( cur_size );
1528 static void dump_open_key_reply( const struct open_key_reply *req )
1530 fprintf( stderr, " hkey=%p", req->hkey );
1533 static void dump_delete_key_request( const struct delete_key_request *req )
1535 fprintf( stderr, " hkey=%p", req->hkey );
1538 static void dump_flush_key_request( const struct flush_key_request *req )
1540 fprintf( stderr, " hkey=%p", req->hkey );
1543 static void dump_enum_key_request( const struct enum_key_request *req )
1545 fprintf( stderr, " hkey=%p,", req->hkey );
1546 fprintf( stderr, " index=%d,", req->index );
1547 fprintf( stderr, " info_class=%d", req->info_class );
1550 static void dump_enum_key_reply( const struct enum_key_reply *req )
1552 fprintf( stderr, " subkeys=%d,", req->subkeys );
1553 fprintf( stderr, " max_subkey=%d,", req->max_subkey );
1554 fprintf( stderr, " max_class=%d,", req->max_class );
1555 fprintf( stderr, " values=%d,", req->values );
1556 fprintf( stderr, " max_value=%d,", req->max_value );
1557 fprintf( stderr, " max_data=%d,", req->max_data );
1558 fprintf( stderr, " modif=%ld,", (long)req->modif );
1559 fprintf( stderr, " total=%d,", req->total );
1560 fprintf( stderr, " namelen=%d,", req->namelen );
1561 fprintf( stderr, " name=" );
1562 dump_varargs_unicode_str( min(cur_size,req->namelen) );
1563 fputc( ',', stderr );
1564 fprintf( stderr, " class=" );
1565 dump_varargs_unicode_str( cur_size );
1568 static void dump_set_key_value_request( const struct set_key_value_request *req )
1570 fprintf( stderr, " hkey=%p,", req->hkey );
1571 fprintf( stderr, " type=%d,", req->type );
1572 fprintf( stderr, " namelen=%d,", req->namelen );
1573 fprintf( stderr, " name=" );
1574 dump_varargs_unicode_str( min(cur_size,req->namelen) );
1575 fputc( ',', stderr );
1576 fprintf( stderr, " data=" );
1577 dump_varargs_bytes( cur_size );
1580 static void dump_get_key_value_request( const struct get_key_value_request *req )
1582 fprintf( stderr, " hkey=%p,", req->hkey );
1583 fprintf( stderr, " name=" );
1584 dump_varargs_unicode_str( cur_size );
1587 static void dump_get_key_value_reply( const struct get_key_value_reply *req )
1589 fprintf( stderr, " type=%d,", req->type );
1590 fprintf( stderr, " total=%d,", req->total );
1591 fprintf( stderr, " data=" );
1592 dump_varargs_bytes( cur_size );
1595 static void dump_enum_key_value_request( const struct enum_key_value_request *req )
1597 fprintf( stderr, " hkey=%p,", req->hkey );
1598 fprintf( stderr, " index=%d,", req->index );
1599 fprintf( stderr, " info_class=%d", req->info_class );
1602 static void dump_enum_key_value_reply( const struct enum_key_value_reply *req )
1604 fprintf( stderr, " type=%d,", req->type );
1605 fprintf( stderr, " total=%d,", req->total );
1606 fprintf( stderr, " namelen=%d,", req->namelen );
1607 fprintf( stderr, " name=" );
1608 dump_varargs_unicode_str( min(cur_size,req->namelen) );
1609 fputc( ',', stderr );
1610 fprintf( stderr, " data=" );
1611 dump_varargs_bytes( cur_size );
1614 static void dump_delete_key_value_request( const struct delete_key_value_request *req )
1616 fprintf( stderr, " hkey=%p,", req->hkey );
1617 fprintf( stderr, " name=" );
1618 dump_varargs_unicode_str( cur_size );
1621 static void dump_load_registry_request( const struct load_registry_request *req )
1623 fprintf( stderr, " hkey=%p,", req->hkey );
1624 fprintf( stderr, " file=%p,", req->file );
1625 fprintf( stderr, " name=" );
1626 dump_varargs_unicode_str( cur_size );
1629 static void dump_unload_registry_request( const struct unload_registry_request *req )
1631 fprintf( stderr, " hkey=%p", req->hkey );
1634 static void dump_save_registry_request( const struct save_registry_request *req )
1636 fprintf( stderr, " hkey=%p,", req->hkey );
1637 fprintf( stderr, " file=%p", req->file );
1640 static void dump_save_registry_atexit_request( const struct save_registry_atexit_request *req )
1642 fprintf( stderr, " hkey=%p,", req->hkey );
1643 fprintf( stderr, " file=" );
1644 dump_varargs_string( cur_size );
1647 static void dump_set_registry_levels_request( const struct set_registry_levels_request *req )
1649 fprintf( stderr, " current=%d,", req->current );
1650 fprintf( stderr, " saving=%d,", req->saving );
1651 fprintf( stderr, " period=%d", req->period );
1654 static void dump_set_registry_notification_request( const struct set_registry_notification_request *req )
1656 fprintf( stderr, " hkey=%p,", req->hkey );
1657 fprintf( stderr, " event=%p,", req->event );
1658 fprintf( stderr, " subtree=%d,", req->subtree );
1659 fprintf( stderr, " filter=%08x", req->filter );
1662 static void dump_create_timer_request( const struct create_timer_request *req )
1664 fprintf( stderr, " inherit=%d,", req->inherit );
1665 fprintf( stderr, " manual=%d,", req->manual );
1666 fprintf( stderr, " name=" );
1667 dump_varargs_unicode_str( cur_size );
1670 static void dump_create_timer_reply( const struct create_timer_reply *req )
1672 fprintf( stderr, " handle=%p", req->handle );
1675 static void dump_open_timer_request( const struct open_timer_request *req )
1677 fprintf( stderr, " access=%08x,", req->access );
1678 fprintf( stderr, " inherit=%d,", req->inherit );
1679 fprintf( stderr, " name=" );
1680 dump_varargs_unicode_str( cur_size );
1683 static void dump_open_timer_reply( const struct open_timer_reply *req )
1685 fprintf( stderr, " handle=%p", req->handle );
1688 static void dump_set_timer_request( const struct set_timer_request *req )
1690 fprintf( stderr, " handle=%p,", req->handle );
1691 fprintf( stderr, " expire=" );
1692 dump_abs_time( &req->expire );
1693 fprintf( stderr, "," );
1694 fprintf( stderr, " period=%d,", req->period );
1695 fprintf( stderr, " callback=%p,", req->callback );
1696 fprintf( stderr, " arg=%p", req->arg );
1699 static void dump_set_timer_reply( const struct set_timer_reply *req )
1701 fprintf( stderr, " signaled=%d", req->signaled );
1704 static void dump_cancel_timer_request( const struct cancel_timer_request *req )
1706 fprintf( stderr, " handle=%p", req->handle );
1709 static void dump_cancel_timer_reply( const struct cancel_timer_reply *req )
1711 fprintf( stderr, " signaled=%d", req->signaled );
1714 static void dump_get_thread_context_request( const struct get_thread_context_request *req )
1716 fprintf( stderr, " handle=%p,", req->handle );
1717 fprintf( stderr, " flags=%08x", req->flags );
1720 static void dump_get_thread_context_reply( const struct get_thread_context_reply *req )
1722 fprintf( stderr, " context=" );
1723 dump_varargs_context( cur_size );
1726 static void dump_set_thread_context_request( const struct set_thread_context_request *req )
1728 fprintf( stderr, " handle=%p,", req->handle );
1729 fprintf( stderr, " flags=%08x,", req->flags );
1730 fprintf( stderr, " context=" );
1731 dump_varargs_context( cur_size );
1734 static void dump_get_selector_entry_request( const struct get_selector_entry_request *req )
1736 fprintf( stderr, " handle=%p,", req->handle );
1737 fprintf( stderr, " entry=%d", req->entry );
1740 static void dump_get_selector_entry_reply( const struct get_selector_entry_reply *req )
1742 fprintf( stderr, " base=%08x,", req->base );
1743 fprintf( stderr, " limit=%08x,", req->limit );
1744 fprintf( stderr, " flags=%02x", req->flags );
1747 static void dump_add_atom_request( const struct add_atom_request *req )
1749 fprintf( stderr, " local=%d,", req->local );
1750 fprintf( stderr, " name=" );
1751 dump_varargs_unicode_str( cur_size );
1754 static void dump_add_atom_reply( const struct add_atom_reply *req )
1756 fprintf( stderr, " atom=%04x", req->atom );
1759 static void dump_delete_atom_request( const struct delete_atom_request *req )
1761 fprintf( stderr, " atom=%04x,", req->atom );
1762 fprintf( stderr, " local=%d", req->local );
1765 static void dump_find_atom_request( const struct find_atom_request *req )
1767 fprintf( stderr, " local=%d,", req->local );
1768 fprintf( stderr, " name=" );
1769 dump_varargs_unicode_str( cur_size );
1772 static void dump_find_atom_reply( const struct find_atom_reply *req )
1774 fprintf( stderr, " atom=%04x", req->atom );
1777 static void dump_get_atom_name_request( const struct get_atom_name_request *req )
1779 fprintf( stderr, " atom=%04x,", req->atom );
1780 fprintf( stderr, " local=%d", req->local );
1783 static void dump_get_atom_name_reply( const struct get_atom_name_reply *req )
1785 fprintf( stderr, " count=%d,", req->count );
1786 fprintf( stderr, " name=" );
1787 dump_varargs_unicode_str( cur_size );
1790 static void dump_init_atom_table_request( const struct init_atom_table_request *req )
1792 fprintf( stderr, " entries=%d", req->entries );
1795 static void dump_get_msg_queue_request( const struct get_msg_queue_request *req )
1799 static void dump_get_msg_queue_reply( const struct get_msg_queue_reply *req )
1801 fprintf( stderr, " handle=%p", req->handle );
1804 static void dump_set_queue_mask_request( const struct set_queue_mask_request *req )
1806 fprintf( stderr, " wake_mask=%08x,", req->wake_mask );
1807 fprintf( stderr, " changed_mask=%08x,", req->changed_mask );
1808 fprintf( stderr, " skip_wait=%d", req->skip_wait );
1811 static void dump_set_queue_mask_reply( const struct set_queue_mask_reply *req )
1813 fprintf( stderr, " wake_bits=%08x,", req->wake_bits );
1814 fprintf( stderr, " changed_bits=%08x", req->changed_bits );
1817 static void dump_get_queue_status_request( const struct get_queue_status_request *req )
1819 fprintf( stderr, " clear=%d", req->clear );
1822 static void dump_get_queue_status_reply( const struct get_queue_status_reply *req )
1824 fprintf( stderr, " wake_bits=%08x,", req->wake_bits );
1825 fprintf( stderr, " changed_bits=%08x", req->changed_bits );
1828 static void dump_wait_input_idle_request( const struct wait_input_idle_request *req )
1830 fprintf( stderr, " handle=%p,", req->handle );
1831 fprintf( stderr, " timeout=%d", req->timeout );
1834 static void dump_wait_input_idle_reply( const struct wait_input_idle_reply *req )
1836 fprintf( stderr, " event=%p", req->event );
1839 static void dump_send_message_request( const struct send_message_request *req )
1841 fprintf( stderr, " id=%04x,", req->id );
1842 fprintf( stderr, " type=%d,", req->type );
1843 fprintf( stderr, " flags=%d,", req->flags );
1844 fprintf( stderr, " win=%p,", req->win );
1845 fprintf( stderr, " msg=%08x,", req->msg );
1846 fprintf( stderr, " wparam=%08x,", req->wparam );
1847 fprintf( stderr, " lparam=%08x,", req->lparam );
1848 fprintf( stderr, " x=%d,", req->x );
1849 fprintf( stderr, " y=%d,", req->y );
1850 fprintf( stderr, " time=%08x,", req->time );
1851 fprintf( stderr, " info=%08x,", req->info );
1852 fprintf( stderr, " timeout=%d,", req->timeout );
1853 fprintf( stderr, " callback=%p,", req->callback );
1854 fprintf( stderr, " data=" );
1855 dump_varargs_bytes( cur_size );
1858 static void dump_get_message_request( const struct get_message_request *req )
1860 fprintf( stderr, " flags=%d,", req->flags );
1861 fprintf( stderr, " get_win=%p,", req->get_win );
1862 fprintf( stderr, " get_first=%08x,", req->get_first );
1863 fprintf( stderr, " get_last=%08x", req->get_last );
1866 static void dump_get_message_reply( const struct get_message_reply *req )
1868 fprintf( stderr, " type=%d,", req->type );
1869 fprintf( stderr, " win=%p,", req->win );
1870 fprintf( stderr, " msg=%08x,", req->msg );
1871 fprintf( stderr, " wparam=%08x,", req->wparam );
1872 fprintf( stderr, " lparam=%08x,", req->lparam );
1873 fprintf( stderr, " x=%d,", req->x );
1874 fprintf( stderr, " y=%d,", req->y );
1875 fprintf( stderr, " time=%08x,", req->time );
1876 fprintf( stderr, " info=%08x,", req->info );
1877 fprintf( stderr, " total=%d,", req->total );
1878 fprintf( stderr, " data=" );
1879 dump_varargs_bytes( cur_size );
1882 static void dump_reply_message_request( const struct reply_message_request *req )
1884 fprintf( stderr, " type=%d,", req->type );
1885 fprintf( stderr, " result=%08x,", req->result );
1886 fprintf( stderr, " remove=%d,", req->remove );
1887 fprintf( stderr, " data=" );
1888 dump_varargs_bytes( cur_size );
1891 static void dump_get_message_reply_request( const struct get_message_reply_request *req )
1893 fprintf( stderr, " cancel=%d", req->cancel );
1896 static void dump_get_message_reply_reply( const struct get_message_reply_reply *req )
1898 fprintf( stderr, " result=%08x,", req->result );
1899 fprintf( stderr, " data=" );
1900 dump_varargs_bytes( cur_size );
1903 static void dump_set_win_timer_request( const struct set_win_timer_request *req )
1905 fprintf( stderr, " win=%p,", req->win );
1906 fprintf( stderr, " msg=%08x,", req->msg );
1907 fprintf( stderr, " id=%08x,", req->id );
1908 fprintf( stderr, " rate=%08x,", req->rate );
1909 fprintf( stderr, " lparam=%08x", req->lparam );
1912 static void dump_kill_win_timer_request( const struct kill_win_timer_request *req )
1914 fprintf( stderr, " win=%p,", req->win );
1915 fprintf( stderr, " msg=%08x,", req->msg );
1916 fprintf( stderr, " id=%08x", req->id );
1919 static void dump_get_serial_info_request( const struct get_serial_info_request *req )
1921 fprintf( stderr, " handle=%p", req->handle );
1924 static void dump_get_serial_info_reply( const struct get_serial_info_reply *req )
1926 fprintf( stderr, " readinterval=%08x,", req->readinterval );
1927 fprintf( stderr, " readconst=%08x,", req->readconst );
1928 fprintf( stderr, " readmult=%08x,", req->readmult );
1929 fprintf( stderr, " writeconst=%08x,", req->writeconst );
1930 fprintf( stderr, " writemult=%08x,", req->writemult );
1931 fprintf( stderr, " eventmask=%08x,", req->eventmask );
1932 fprintf( stderr, " commerror=%08x", req->commerror );
1935 static void dump_set_serial_info_request( const struct set_serial_info_request *req )
1937 fprintf( stderr, " handle=%p,", req->handle );
1938 fprintf( stderr, " flags=%d,", req->flags );
1939 fprintf( stderr, " readinterval=%08x,", req->readinterval );
1940 fprintf( stderr, " readconst=%08x,", req->readconst );
1941 fprintf( stderr, " readmult=%08x,", req->readmult );
1942 fprintf( stderr, " writeconst=%08x,", req->writeconst );
1943 fprintf( stderr, " writemult=%08x,", req->writemult );
1944 fprintf( stderr, " eventmask=%08x,", req->eventmask );
1945 fprintf( stderr, " commerror=%08x", req->commerror );
1948 static void dump_register_async_request( const struct register_async_request *req )
1950 fprintf( stderr, " handle=%p,", req->handle );
1951 fprintf( stderr, " type=%d,", req->type );
1952 fprintf( stderr, " overlapped=%p,", req->overlapped );
1953 fprintf( stderr, " count=%d,", req->count );
1954 fprintf( stderr, " status=%08x", req->status );
1957 static void dump_create_named_pipe_request( const struct create_named_pipe_request *req )
1959 fprintf( stderr, " openmode=%08x,", req->openmode );
1960 fprintf( stderr, " pipemode=%08x,", req->pipemode );
1961 fprintf( stderr, " maxinstances=%08x,", req->maxinstances );
1962 fprintf( stderr, " outsize=%08x,", req->outsize );
1963 fprintf( stderr, " insize=%08x,", req->insize );
1964 fprintf( stderr, " timeout=%08x,", req->timeout );
1965 fprintf( stderr, " inherit=%d,", req->inherit );
1966 fprintf( stderr, " name=" );
1967 dump_varargs_unicode_str( cur_size );
1970 static void dump_create_named_pipe_reply( const struct create_named_pipe_reply *req )
1972 fprintf( stderr, " handle=%p", req->handle );
1975 static void dump_open_named_pipe_request( const struct open_named_pipe_request *req )
1977 fprintf( stderr, " access=%08x,", req->access );
1978 fprintf( stderr, " inherit=%d,", req->inherit );
1979 fprintf( stderr, " name=" );
1980 dump_varargs_unicode_str( cur_size );
1983 static void dump_open_named_pipe_reply( const struct open_named_pipe_reply *req )
1985 fprintf( stderr, " handle=%p", req->handle );
1988 static void dump_connect_named_pipe_request( const struct connect_named_pipe_request *req )
1990 fprintf( stderr, " handle=%p,", req->handle );
1991 fprintf( stderr, " overlapped=%p,", req->overlapped );
1992 fprintf( stderr, " func=%p", req->func );
1995 static void dump_wait_named_pipe_request( const struct wait_named_pipe_request *req )
1997 fprintf( stderr, " timeout=%08x,", req->timeout );
1998 fprintf( stderr, " overlapped=%p,", req->overlapped );
1999 fprintf( stderr, " func=%p,", req->func );
2000 fprintf( stderr, " name=" );
2001 dump_varargs_unicode_str( cur_size );
2004 static void dump_disconnect_named_pipe_request( const struct disconnect_named_pipe_request *req )
2006 fprintf( stderr, " handle=%p", req->handle );
2009 static void dump_disconnect_named_pipe_reply( const struct disconnect_named_pipe_reply *req )
2011 fprintf( stderr, " fd=%d", req->fd );
2014 static void dump_get_named_pipe_info_request( const struct get_named_pipe_info_request *req )
2016 fprintf( stderr, " handle=%p", req->handle );
2019 static void dump_get_named_pipe_info_reply( const struct get_named_pipe_info_reply *req )
2021 fprintf( stderr, " flags=%08x,", req->flags );
2022 fprintf( stderr, " maxinstances=%08x,", req->maxinstances );
2023 fprintf( stderr, " outsize=%08x,", req->outsize );
2024 fprintf( stderr, " insize=%08x", req->insize );
2027 static void dump_create_smb_request( const struct create_smb_request *req )
2029 fprintf( stderr, " fd=%d,", req->fd );
2030 fprintf( stderr, " tree_id=%08x,", req->tree_id );
2031 fprintf( stderr, " user_id=%08x,", req->user_id );
2032 fprintf( stderr, " file_id=%08x,", req->file_id );
2033 fprintf( stderr, " dialect=%08x", req->dialect );
2036 static void dump_create_smb_reply( const struct create_smb_reply *req )
2038 fprintf( stderr, " handle=%p", req->handle );
2041 static void dump_get_smb_info_request( const struct get_smb_info_request *req )
2043 fprintf( stderr, " handle=%p,", req->handle );
2044 fprintf( stderr, " flags=%08x,", req->flags );
2045 fprintf( stderr, " offset=%08x", req->offset );
2048 static void dump_get_smb_info_reply( const struct get_smb_info_reply *req )
2050 fprintf( stderr, " tree_id=%08x,", req->tree_id );
2051 fprintf( stderr, " user_id=%08x,", req->user_id );
2052 fprintf( stderr, " dialect=%08x,", req->dialect );
2053 fprintf( stderr, " file_id=%08x,", req->file_id );
2054 fprintf( stderr, " offset=%08x", req->offset );
2057 static void dump_create_window_request( const struct create_window_request *req )
2059 fprintf( stderr, " parent=%p,", req->parent );
2060 fprintf( stderr, " owner=%p,", req->owner );
2061 fprintf( stderr, " atom=%04x,", req->atom );
2062 fprintf( stderr, " instance=%p", req->instance );
2065 static void dump_create_window_reply( const struct create_window_reply *req )
2067 fprintf( stderr, " handle=%p,", req->handle );
2068 fprintf( stderr, " extra=%d,", req->extra );
2069 fprintf( stderr, " class_ptr=%p", req->class_ptr );
2072 static void dump_link_window_request( const struct link_window_request *req )
2074 fprintf( stderr, " handle=%p,", req->handle );
2075 fprintf( stderr, " parent=%p,", req->parent );
2076 fprintf( stderr, " previous=%p", req->previous );
2079 static void dump_link_window_reply( const struct link_window_reply *req )
2081 fprintf( stderr, " full_parent=%p", req->full_parent );
2084 static void dump_destroy_window_request( const struct destroy_window_request *req )
2086 fprintf( stderr, " handle=%p", req->handle );
2089 static void dump_set_window_owner_request( const struct set_window_owner_request *req )
2091 fprintf( stderr, " handle=%p,", req->handle );
2092 fprintf( stderr, " owner=%p", req->owner );
2095 static void dump_set_window_owner_reply( const struct set_window_owner_reply *req )
2097 fprintf( stderr, " full_owner=%p,", req->full_owner );
2098 fprintf( stderr, " prev_owner=%p", req->prev_owner );
2101 static void dump_get_window_info_request( const struct get_window_info_request *req )
2103 fprintf( stderr, " handle=%p", req->handle );
2106 static void dump_get_window_info_reply( const struct get_window_info_reply *req )
2108 fprintf( stderr, " full_handle=%p,", req->full_handle );
2109 fprintf( stderr, " last_active=%p,", req->last_active );
2110 fprintf( stderr, " pid=%04x,", req->pid );
2111 fprintf( stderr, " tid=%04x,", req->tid );
2112 fprintf( stderr, " atom=%04x", req->atom );
2115 static void dump_set_window_info_request( const struct set_window_info_request *req )
2117 fprintf( stderr, " handle=%p,", req->handle );
2118 fprintf( stderr, " flags=%08x,", req->flags );
2119 fprintf( stderr, " style=%08x,", req->style );
2120 fprintf( stderr, " ex_style=%08x,", req->ex_style );
2121 fprintf( stderr, " id=%08x,", req->id );
2122 fprintf( stderr, " instance=%p,", req->instance );
2123 fprintf( stderr, " user_data=%p,", req->user_data );
2124 fprintf( stderr, " extra_offset=%d,", req->extra_offset );
2125 fprintf( stderr, " extra_size=%d,", req->extra_size );
2126 fprintf( stderr, " extra_value=%08x", req->extra_value );
2129 static void dump_set_window_info_reply( const struct set_window_info_reply *req )
2131 fprintf( stderr, " old_style=%08x,", req->old_style );
2132 fprintf( stderr, " old_ex_style=%08x,", req->old_ex_style );
2133 fprintf( stderr, " old_id=%08x,", req->old_id );
2134 fprintf( stderr, " old_instance=%p,", req->old_instance );
2135 fprintf( stderr, " old_user_data=%p,", req->old_user_data );
2136 fprintf( stderr, " old_extra_value=%08x", req->old_extra_value );
2139 static void dump_get_window_parents_request( const struct get_window_parents_request *req )
2141 fprintf( stderr, " handle=%p", req->handle );
2144 static void dump_get_window_parents_reply( const struct get_window_parents_reply *req )
2146 fprintf( stderr, " count=%d,", req->count );
2147 fprintf( stderr, " parents=" );
2148 dump_varargs_user_handles( cur_size );
2151 static void dump_get_window_children_request( const struct get_window_children_request *req )
2153 fprintf( stderr, " parent=%p,", req->parent );
2154 fprintf( stderr, " atom=%04x,", req->atom );
2155 fprintf( stderr, " tid=%04x", req->tid );
2158 static void dump_get_window_children_reply( const struct get_window_children_reply *req )
2160 fprintf( stderr, " count=%d,", req->count );
2161 fprintf( stderr, " children=" );
2162 dump_varargs_user_handles( cur_size );
2165 static void dump_get_window_tree_request( const struct get_window_tree_request *req )
2167 fprintf( stderr, " handle=%p", req->handle );
2170 static void dump_get_window_tree_reply( const struct get_window_tree_reply *req )
2172 fprintf( stderr, " parent=%p,", req->parent );
2173 fprintf( stderr, " owner=%p,", req->owner );
2174 fprintf( stderr, " next_sibling=%p,", req->next_sibling );
2175 fprintf( stderr, " prev_sibling=%p,", req->prev_sibling );
2176 fprintf( stderr, " first_sibling=%p,", req->first_sibling );
2177 fprintf( stderr, " last_sibling=%p,", req->last_sibling );
2178 fprintf( stderr, " first_child=%p,", req->first_child );
2179 fprintf( stderr, " last_child=%p", req->last_child );
2182 static void dump_set_window_rectangles_request( const struct set_window_rectangles_request *req )
2184 fprintf( stderr, " handle=%p,", req->handle );
2185 fprintf( stderr, " window=" );
2186 dump_rectangle( &req->window );
2187 fprintf( stderr, "," );
2188 fprintf( stderr, " client=" );
2189 dump_rectangle( &req->client );
2192 static void dump_get_window_rectangles_request( const struct get_window_rectangles_request *req )
2194 fprintf( stderr, " handle=%p", req->handle );
2197 static void dump_get_window_rectangles_reply( const struct get_window_rectangles_reply *req )
2199 fprintf( stderr, " window=" );
2200 dump_rectangle( &req->window );
2201 fprintf( stderr, "," );
2202 fprintf( stderr, " client=" );
2203 dump_rectangle( &req->client );
2206 static void dump_get_window_text_request( const struct get_window_text_request *req )
2208 fprintf( stderr, " handle=%p", req->handle );
2211 static void dump_get_window_text_reply( const struct get_window_text_reply *req )
2213 fprintf( stderr, " text=" );
2214 dump_varargs_unicode_str( cur_size );
2217 static void dump_set_window_text_request( const struct set_window_text_request *req )
2219 fprintf( stderr, " handle=%p,", req->handle );
2220 fprintf( stderr, " text=" );
2221 dump_varargs_unicode_str( cur_size );
2224 static void dump_inc_window_paint_count_request( const struct inc_window_paint_count_request *req )
2226 fprintf( stderr, " handle=%p,", req->handle );
2227 fprintf( stderr, " incr=%d", req->incr );
2230 static void dump_get_windows_offset_request( const struct get_windows_offset_request *req )
2232 fprintf( stderr, " from=%p,", req->from );
2233 fprintf( stderr, " to=%p", req->to );
2236 static void dump_get_windows_offset_reply( const struct get_windows_offset_reply *req )
2238 fprintf( stderr, " x=%d,", req->x );
2239 fprintf( stderr, " y=%d", req->y );
2242 static void dump_set_window_property_request( const struct set_window_property_request *req )
2244 fprintf( stderr, " window=%p,", req->window );
2245 fprintf( stderr, " atom=%04x,", req->atom );
2246 fprintf( stderr, " string=%d,", req->string );
2247 fprintf( stderr, " handle=%p", req->handle );
2250 static void dump_remove_window_property_request( const struct remove_window_property_request *req )
2252 fprintf( stderr, " window=%p,", req->window );
2253 fprintf( stderr, " atom=%04x", req->atom );
2256 static void dump_remove_window_property_reply( const struct remove_window_property_reply *req )
2258 fprintf( stderr, " handle=%p", req->handle );
2261 static void dump_get_window_property_request( const struct get_window_property_request *req )
2263 fprintf( stderr, " window=%p,", req->window );
2264 fprintf( stderr, " atom=%04x", req->atom );
2267 static void dump_get_window_property_reply( const struct get_window_property_reply *req )
2269 fprintf( stderr, " handle=%p", req->handle );
2272 static void dump_get_window_properties_request( const struct get_window_properties_request *req )
2274 fprintf( stderr, " window=%p", req->window );
2277 static void dump_get_window_properties_reply( const struct get_window_properties_reply *req )
2279 fprintf( stderr, " total=%d,", req->total );
2280 fprintf( stderr, " props=" );
2281 dump_varargs_properties( cur_size );
2284 static void dump_attach_thread_input_request( const struct attach_thread_input_request *req )
2286 fprintf( stderr, " tid_from=%04x,", req->tid_from );
2287 fprintf( stderr, " tid_to=%04x,", req->tid_to );
2288 fprintf( stderr, " attach=%d", req->attach );
2291 static void dump_get_thread_input_request( const struct get_thread_input_request *req )
2293 fprintf( stderr, " tid=%04x", req->tid );
2296 static void dump_get_thread_input_reply( const struct get_thread_input_reply *req )
2298 fprintf( stderr, " focus=%p,", req->focus );
2299 fprintf( stderr, " capture=%p,", req->capture );
2300 fprintf( stderr, " active=%p,", req->active );
2301 fprintf( stderr, " foreground=%p,", req->foreground );
2302 fprintf( stderr, " menu_owner=%p,", req->menu_owner );
2303 fprintf( stderr, " move_size=%p,", req->move_size );
2304 fprintf( stderr, " caret=%p,", req->caret );
2305 fprintf( stderr, " rect=" );
2306 dump_rectangle( &req->rect );
2309 static void dump_get_key_state_request( const struct get_key_state_request *req )
2311 fprintf( stderr, " tid=%04x,", req->tid );
2312 fprintf( stderr, " key=%d", req->key );
2315 static void dump_get_key_state_reply( const struct get_key_state_reply *req )
2317 fprintf( stderr, " state=%02x,", req->state );
2318 fprintf( stderr, " keystate=" );
2319 dump_varargs_bytes( cur_size );
2322 static void dump_set_key_state_request( const struct set_key_state_request *req )
2324 fprintf( stderr, " tid=%04x,", req->tid );
2325 fprintf( stderr, " keystate=" );
2326 dump_varargs_bytes( cur_size );
2329 static void dump_set_foreground_window_request( const struct set_foreground_window_request *req )
2331 fprintf( stderr, " handle=%p", req->handle );
2334 static void dump_set_foreground_window_reply( const struct set_foreground_window_reply *req )
2336 fprintf( stderr, " previous=%p,", req->previous );
2337 fprintf( stderr, " send_msg_old=%d,", req->send_msg_old );
2338 fprintf( stderr, " send_msg_new=%d", req->send_msg_new );
2341 static void dump_set_focus_window_request( const struct set_focus_window_request *req )
2343 fprintf( stderr, " handle=%p", req->handle );
2346 static void dump_set_focus_window_reply( const struct set_focus_window_reply *req )
2348 fprintf( stderr, " previous=%p", req->previous );
2351 static void dump_set_active_window_request( const struct set_active_window_request *req )
2353 fprintf( stderr, " handle=%p", req->handle );
2356 static void dump_set_active_window_reply( const struct set_active_window_reply *req )
2358 fprintf( stderr, " previous=%p", req->previous );
2361 static void dump_set_capture_window_request( const struct set_capture_window_request *req )
2363 fprintf( stderr, " handle=%p,", req->handle );
2364 fprintf( stderr, " flags=%08x", req->flags );
2367 static void dump_set_capture_window_reply( const struct set_capture_window_reply *req )
2369 fprintf( stderr, " previous=%p,", req->previous );
2370 fprintf( stderr, " full_handle=%p", req->full_handle );
2373 static void dump_set_caret_window_request( const struct set_caret_window_request *req )
2375 fprintf( stderr, " handle=%p,", req->handle );
2376 fprintf( stderr, " width=%d,", req->width );
2377 fprintf( stderr, " height=%d", req->height );
2380 static void dump_set_caret_window_reply( const struct set_caret_window_reply *req )
2382 fprintf( stderr, " previous=%p,", req->previous );
2383 fprintf( stderr, " old_rect=" );
2384 dump_rectangle( &req->old_rect );
2385 fprintf( stderr, "," );
2386 fprintf( stderr, " old_hide=%d,", req->old_hide );
2387 fprintf( stderr, " old_state=%d", req->old_state );
2390 static void dump_set_caret_info_request( const struct set_caret_info_request *req )
2392 fprintf( stderr, " flags=%08x,", req->flags );
2393 fprintf( stderr, " handle=%p,", req->handle );
2394 fprintf( stderr, " x=%d,", req->x );
2395 fprintf( stderr, " y=%d,", req->y );
2396 fprintf( stderr, " hide=%d,", req->hide );
2397 fprintf( stderr, " state=%d", req->state );
2400 static void dump_set_caret_info_reply( const struct set_caret_info_reply *req )
2402 fprintf( stderr, " full_handle=%p,", req->full_handle );
2403 fprintf( stderr, " old_rect=" );
2404 dump_rectangle( &req->old_rect );
2405 fprintf( stderr, "," );
2406 fprintf( stderr, " old_hide=%d,", req->old_hide );
2407 fprintf( stderr, " old_state=%d", req->old_state );
2410 static void dump_set_hook_request( const struct set_hook_request *req )
2412 fprintf( stderr, " id=%d,", req->id );
2413 fprintf( stderr, " tid=%04x,", req->tid );
2414 fprintf( stderr, " proc=%p,", req->proc );
2415 fprintf( stderr, " unicode=%d,", req->unicode );
2416 fprintf( stderr, " module=" );
2417 dump_varargs_unicode_str( cur_size );
2420 static void dump_set_hook_reply( const struct set_hook_reply *req )
2422 fprintf( stderr, " handle=%p", req->handle );
2425 static void dump_remove_hook_request( const struct remove_hook_request *req )
2427 fprintf( stderr, " handle=%p,", req->handle );
2428 fprintf( stderr, " id=%d,", req->id );
2429 fprintf( stderr, " proc=%p", req->proc );
2432 static void dump_start_hook_chain_request( const struct start_hook_chain_request *req )
2434 fprintf( stderr, " id=%d", req->id );
2437 static void dump_start_hook_chain_reply( const struct start_hook_chain_reply *req )
2439 fprintf( stderr, " handle=%p,", req->handle );
2440 fprintf( stderr, " pid=%04x,", req->pid );
2441 fprintf( stderr, " tid=%04x,", req->tid );
2442 fprintf( stderr, " proc=%p,", req->proc );
2443 fprintf( stderr, " unicode=%d,", req->unicode );
2444 fprintf( stderr, " module=" );
2445 dump_varargs_unicode_str( cur_size );
2448 static void dump_finish_hook_chain_request( const struct finish_hook_chain_request *req )
2450 fprintf( stderr, " id=%d", req->id );
2453 static void dump_get_next_hook_request( const struct get_next_hook_request *req )
2455 fprintf( stderr, " handle=%p", req->handle );
2458 static void dump_get_next_hook_reply( const struct get_next_hook_reply *req )
2460 fprintf( stderr, " next=%p,", req->next );
2461 fprintf( stderr, " id=%d,", req->id );
2462 fprintf( stderr, " pid=%04x,", req->pid );
2463 fprintf( stderr, " tid=%04x,", req->tid );
2464 fprintf( stderr, " proc=%p,", req->proc );
2465 fprintf( stderr, " prev_unicode=%d,", req->prev_unicode );
2466 fprintf( stderr, " next_unicode=%d,", req->next_unicode );
2467 fprintf( stderr, " module=" );
2468 dump_varargs_unicode_str( cur_size );
2471 static void dump_create_class_request( const struct create_class_request *req )
2473 fprintf( stderr, " local=%d,", req->local );
2474 fprintf( stderr, " atom=%04x,", req->atom );
2475 fprintf( stderr, " style=%08x,", req->style );
2476 fprintf( stderr, " instance=%p,", req->instance );
2477 fprintf( stderr, " extra=%d,", req->extra );
2478 fprintf( stderr, " win_extra=%d,", req->win_extra );
2479 fprintf( stderr, " client_ptr=%p", req->client_ptr );
2482 static void dump_destroy_class_request( const struct destroy_class_request *req )
2484 fprintf( stderr, " atom=%04x,", req->atom );
2485 fprintf( stderr, " instance=%p", req->instance );
2488 static void dump_destroy_class_reply( const struct destroy_class_reply *req )
2490 fprintf( stderr, " client_ptr=%p", req->client_ptr );
2493 static void dump_set_class_info_request( const struct set_class_info_request *req )
2495 fprintf( stderr, " window=%p,", req->window );
2496 fprintf( stderr, " flags=%08x,", req->flags );
2497 fprintf( stderr, " atom=%04x,", req->atom );
2498 fprintf( stderr, " style=%08x,", req->style );
2499 fprintf( stderr, " win_extra=%d,", req->win_extra );
2500 fprintf( stderr, " instance=%p,", req->instance );
2501 fprintf( stderr, " extra_offset=%d,", req->extra_offset );
2502 fprintf( stderr, " extra_size=%d,", req->extra_size );
2503 fprintf( stderr, " extra_value=%08x", req->extra_value );
2506 static void dump_set_class_info_reply( const struct set_class_info_reply *req )
2508 fprintf( stderr, " old_atom=%04x,", req->old_atom );
2509 fprintf( stderr, " old_style=%08x,", req->old_style );
2510 fprintf( stderr, " old_extra=%d,", req->old_extra );
2511 fprintf( stderr, " old_win_extra=%d,", req->old_win_extra );
2512 fprintf( stderr, " old_instance=%p,", req->old_instance );
2513 fprintf( stderr, " old_extra_value=%08x", req->old_extra_value );
2516 static void dump_set_clipboard_info_request( const struct set_clipboard_info_request *req )
2518 fprintf( stderr, " flags=%08x,", req->flags );
2519 fprintf( stderr, " clipboard=%p,", req->clipboard );
2520 fprintf( stderr, " owner=%p,", req->owner );
2521 fprintf( stderr, " viewer=%p,", req->viewer );
2522 fprintf( stderr, " seqno=%08x", req->seqno );
2525 static void dump_set_clipboard_info_reply( const struct set_clipboard_info_reply *req )
2527 fprintf( stderr, " flags=%08x,", req->flags );
2528 fprintf( stderr, " old_clipboard=%p,", req->old_clipboard );
2529 fprintf( stderr, " old_owner=%p,", req->old_owner );
2530 fprintf( stderr, " old_viewer=%p,", req->old_viewer );
2531 fprintf( stderr, " seqno=%08x", req->seqno );
2534 static void dump_open_token_request( const struct open_token_request *req )
2536 fprintf( stderr, " handle=%p,", req->handle );
2537 fprintf( stderr, " flags=%08x", req->flags );
2540 static void dump_open_token_reply( const struct open_token_reply *req )
2542 fprintf( stderr, " token=%p", req->token );
2545 static void dump_set_global_windows_request( const struct set_global_windows_request *req )
2547 fprintf( stderr, " flags=%08x,", req->flags );
2548 fprintf( stderr, " shell_window=%p,", req->shell_window );
2549 fprintf( stderr, " shell_listview=%p,", req->shell_listview );
2550 fprintf( stderr, " progman_window=%p,", req->progman_window );
2551 fprintf( stderr, " taskman_window=%p", req->taskman_window );
2554 static void dump_set_global_windows_reply( const struct set_global_windows_reply *req )
2556 fprintf( stderr, " old_shell_window=%p,", req->old_shell_window );
2557 fprintf( stderr, " old_shell_listview=%p,", req->old_shell_listview );
2558 fprintf( stderr, " old_progman_window=%p,", req->old_progman_window );
2559 fprintf( stderr, " old_taskman_window=%p", req->old_taskman_window );
2562 static const dump_func req_dumpers[REQ_NB_REQUESTS] = {
2563 (dump_func)dump_new_process_request,
2564 (dump_func)dump_get_new_process_info_request,
2565 (dump_func)dump_new_thread_request,
2566 (dump_func)dump_boot_done_request,
2567 (dump_func)dump_init_process_request,
2568 (dump_func)dump_get_startup_info_request,
2569 (dump_func)dump_init_process_done_request,
2570 (dump_func)dump_init_thread_request,
2571 (dump_func)dump_terminate_process_request,
2572 (dump_func)dump_terminate_thread_request,
2573 (dump_func)dump_get_process_info_request,
2574 (dump_func)dump_set_process_info_request,
2575 (dump_func)dump_get_thread_info_request,
2576 (dump_func)dump_set_thread_info_request,
2577 (dump_func)dump_get_dll_info_request,
2578 (dump_func)dump_suspend_thread_request,
2579 (dump_func)dump_resume_thread_request,
2580 (dump_func)dump_load_dll_request,
2581 (dump_func)dump_unload_dll_request,
2582 (dump_func)dump_queue_apc_request,
2583 (dump_func)dump_get_apc_request,
2584 (dump_func)dump_close_handle_request,
2585 (dump_func)dump_set_handle_info_request,
2586 (dump_func)dump_dup_handle_request,
2587 (dump_func)dump_open_process_request,
2588 (dump_func)dump_open_thread_request,
2589 (dump_func)dump_select_request,
2590 (dump_func)dump_create_event_request,
2591 (dump_func)dump_event_op_request,
2592 (dump_func)dump_open_event_request,
2593 (dump_func)dump_create_mutex_request,
2594 (dump_func)dump_release_mutex_request,
2595 (dump_func)dump_open_mutex_request,
2596 (dump_func)dump_create_semaphore_request,
2597 (dump_func)dump_release_semaphore_request,
2598 (dump_func)dump_open_semaphore_request,
2599 (dump_func)dump_create_file_request,
2600 (dump_func)dump_alloc_file_handle_request,
2601 (dump_func)dump_get_handle_fd_request,
2602 (dump_func)dump_set_file_pointer_request,
2603 (dump_func)dump_truncate_file_request,
2604 (dump_func)dump_flush_file_request,
2605 (dump_func)dump_get_file_info_request,
2606 (dump_func)dump_lock_file_request,
2607 (dump_func)dump_unlock_file_request,
2608 (dump_func)dump_create_socket_request,
2609 (dump_func)dump_accept_socket_request,
2610 (dump_func)dump_set_socket_event_request,
2611 (dump_func)dump_get_socket_event_request,
2612 (dump_func)dump_enable_socket_event_request,
2613 (dump_func)dump_set_socket_deferred_request,
2614 (dump_func)dump_alloc_console_request,
2615 (dump_func)dump_free_console_request,
2616 (dump_func)dump_get_console_renderer_events_request,
2617 (dump_func)dump_open_console_request,
2618 (dump_func)dump_get_console_wait_event_request,
2619 (dump_func)dump_get_console_mode_request,
2620 (dump_func)dump_set_console_mode_request,
2621 (dump_func)dump_set_console_input_info_request,
2622 (dump_func)dump_get_console_input_info_request,
2623 (dump_func)dump_append_console_input_history_request,
2624 (dump_func)dump_get_console_input_history_request,
2625 (dump_func)dump_create_console_output_request,
2626 (dump_func)dump_set_console_output_info_request,
2627 (dump_func)dump_get_console_output_info_request,
2628 (dump_func)dump_write_console_input_request,
2629 (dump_func)dump_read_console_input_request,
2630 (dump_func)dump_write_console_output_request,
2631 (dump_func)dump_fill_console_output_request,
2632 (dump_func)dump_read_console_output_request,
2633 (dump_func)dump_move_console_output_request,
2634 (dump_func)dump_send_console_signal_request,
2635 (dump_func)dump_create_change_notification_request,
2636 (dump_func)dump_next_change_notification_request,
2637 (dump_func)dump_create_mapping_request,
2638 (dump_func)dump_open_mapping_request,
2639 (dump_func)dump_get_mapping_info_request,
2640 (dump_func)dump_create_snapshot_request,
2641 (dump_func)dump_next_process_request,
2642 (dump_func)dump_next_thread_request,
2643 (dump_func)dump_next_module_request,
2644 (dump_func)dump_wait_debug_event_request,
2645 (dump_func)dump_queue_exception_event_request,
2646 (dump_func)dump_get_exception_status_request,
2647 (dump_func)dump_output_debug_string_request,
2648 (dump_func)dump_continue_debug_event_request,
2649 (dump_func)dump_debug_process_request,
2650 (dump_func)dump_debug_break_request,
2651 (dump_func)dump_set_debugger_kill_on_exit_request,
2652 (dump_func)dump_read_process_memory_request,
2653 (dump_func)dump_write_process_memory_request,
2654 (dump_func)dump_create_key_request,
2655 (dump_func)dump_open_key_request,
2656 (dump_func)dump_delete_key_request,
2657 (dump_func)dump_flush_key_request,
2658 (dump_func)dump_enum_key_request,
2659 (dump_func)dump_set_key_value_request,
2660 (dump_func)dump_get_key_value_request,
2661 (dump_func)dump_enum_key_value_request,
2662 (dump_func)dump_delete_key_value_request,
2663 (dump_func)dump_load_registry_request,
2664 (dump_func)dump_unload_registry_request,
2665 (dump_func)dump_save_registry_request,
2666 (dump_func)dump_save_registry_atexit_request,
2667 (dump_func)dump_set_registry_levels_request,
2668 (dump_func)dump_set_registry_notification_request,
2669 (dump_func)dump_create_timer_request,
2670 (dump_func)dump_open_timer_request,
2671 (dump_func)dump_set_timer_request,
2672 (dump_func)dump_cancel_timer_request,
2673 (dump_func)dump_get_thread_context_request,
2674 (dump_func)dump_set_thread_context_request,
2675 (dump_func)dump_get_selector_entry_request,
2676 (dump_func)dump_add_atom_request,
2677 (dump_func)dump_delete_atom_request,
2678 (dump_func)dump_find_atom_request,
2679 (dump_func)dump_get_atom_name_request,
2680 (dump_func)dump_init_atom_table_request,
2681 (dump_func)dump_get_msg_queue_request,
2682 (dump_func)dump_set_queue_mask_request,
2683 (dump_func)dump_get_queue_status_request,
2684 (dump_func)dump_wait_input_idle_request,
2685 (dump_func)dump_send_message_request,
2686 (dump_func)dump_get_message_request,
2687 (dump_func)dump_reply_message_request,
2688 (dump_func)dump_get_message_reply_request,
2689 (dump_func)dump_set_win_timer_request,
2690 (dump_func)dump_kill_win_timer_request,
2691 (dump_func)dump_get_serial_info_request,
2692 (dump_func)dump_set_serial_info_request,
2693 (dump_func)dump_register_async_request,
2694 (dump_func)dump_create_named_pipe_request,
2695 (dump_func)dump_open_named_pipe_request,
2696 (dump_func)dump_connect_named_pipe_request,
2697 (dump_func)dump_wait_named_pipe_request,
2698 (dump_func)dump_disconnect_named_pipe_request,
2699 (dump_func)dump_get_named_pipe_info_request,
2700 (dump_func)dump_create_smb_request,
2701 (dump_func)dump_get_smb_info_request,
2702 (dump_func)dump_create_window_request,
2703 (dump_func)dump_link_window_request,
2704 (dump_func)dump_destroy_window_request,
2705 (dump_func)dump_set_window_owner_request,
2706 (dump_func)dump_get_window_info_request,
2707 (dump_func)dump_set_window_info_request,
2708 (dump_func)dump_get_window_parents_request,
2709 (dump_func)dump_get_window_children_request,
2710 (dump_func)dump_get_window_tree_request,
2711 (dump_func)dump_set_window_rectangles_request,
2712 (dump_func)dump_get_window_rectangles_request,
2713 (dump_func)dump_get_window_text_request,
2714 (dump_func)dump_set_window_text_request,
2715 (dump_func)dump_inc_window_paint_count_request,
2716 (dump_func)dump_get_windows_offset_request,
2717 (dump_func)dump_set_window_property_request,
2718 (dump_func)dump_remove_window_property_request,
2719 (dump_func)dump_get_window_property_request,
2720 (dump_func)dump_get_window_properties_request,
2721 (dump_func)dump_attach_thread_input_request,
2722 (dump_func)dump_get_thread_input_request,
2723 (dump_func)dump_get_key_state_request,
2724 (dump_func)dump_set_key_state_request,
2725 (dump_func)dump_set_foreground_window_request,
2726 (dump_func)dump_set_focus_window_request,
2727 (dump_func)dump_set_active_window_request,
2728 (dump_func)dump_set_capture_window_request,
2729 (dump_func)dump_set_caret_window_request,
2730 (dump_func)dump_set_caret_info_request,
2731 (dump_func)dump_set_hook_request,
2732 (dump_func)dump_remove_hook_request,
2733 (dump_func)dump_start_hook_chain_request,
2734 (dump_func)dump_finish_hook_chain_request,
2735 (dump_func)dump_get_next_hook_request,
2736 (dump_func)dump_create_class_request,
2737 (dump_func)dump_destroy_class_request,
2738 (dump_func)dump_set_class_info_request,
2739 (dump_func)dump_set_clipboard_info_request,
2740 (dump_func)dump_open_token_request,
2741 (dump_func)dump_set_global_windows_request,
2744 static const dump_func reply_dumpers[REQ_NB_REQUESTS] = {
2745 (dump_func)dump_new_process_reply,
2746 (dump_func)dump_get_new_process_info_reply,
2747 (dump_func)dump_new_thread_reply,
2749 (dump_func)dump_init_process_reply,
2750 (dump_func)dump_get_startup_info_reply,
2752 (dump_func)dump_init_thread_reply,
2753 (dump_func)dump_terminate_process_reply,
2754 (dump_func)dump_terminate_thread_reply,
2755 (dump_func)dump_get_process_info_reply,
2757 (dump_func)dump_get_thread_info_reply,
2759 (dump_func)dump_get_dll_info_reply,
2760 (dump_func)dump_suspend_thread_reply,
2761 (dump_func)dump_resume_thread_reply,
2765 (dump_func)dump_get_apc_reply,
2766 (dump_func)dump_close_handle_reply,
2767 (dump_func)dump_set_handle_info_reply,
2768 (dump_func)dump_dup_handle_reply,
2769 (dump_func)dump_open_process_reply,
2770 (dump_func)dump_open_thread_reply,
2772 (dump_func)dump_create_event_reply,
2774 (dump_func)dump_open_event_reply,
2775 (dump_func)dump_create_mutex_reply,
2777 (dump_func)dump_open_mutex_reply,
2778 (dump_func)dump_create_semaphore_reply,
2779 (dump_func)dump_release_semaphore_reply,
2780 (dump_func)dump_open_semaphore_reply,
2781 (dump_func)dump_create_file_reply,
2782 (dump_func)dump_alloc_file_handle_reply,
2783 (dump_func)dump_get_handle_fd_reply,
2784 (dump_func)dump_set_file_pointer_reply,
2786 (dump_func)dump_flush_file_reply,
2787 (dump_func)dump_get_file_info_reply,
2788 (dump_func)dump_lock_file_reply,
2790 (dump_func)dump_create_socket_reply,
2791 (dump_func)dump_accept_socket_reply,
2793 (dump_func)dump_get_socket_event_reply,
2796 (dump_func)dump_alloc_console_reply,
2798 (dump_func)dump_get_console_renderer_events_reply,
2799 (dump_func)dump_open_console_reply,
2800 (dump_func)dump_get_console_wait_event_reply,
2801 (dump_func)dump_get_console_mode_reply,
2804 (dump_func)dump_get_console_input_info_reply,
2806 (dump_func)dump_get_console_input_history_reply,
2807 (dump_func)dump_create_console_output_reply,
2809 (dump_func)dump_get_console_output_info_reply,
2810 (dump_func)dump_write_console_input_reply,
2811 (dump_func)dump_read_console_input_reply,
2812 (dump_func)dump_write_console_output_reply,
2813 (dump_func)dump_fill_console_output_reply,
2814 (dump_func)dump_read_console_output_reply,
2817 (dump_func)dump_create_change_notification_reply,
2819 (dump_func)dump_create_mapping_reply,
2820 (dump_func)dump_open_mapping_reply,
2821 (dump_func)dump_get_mapping_info_reply,
2822 (dump_func)dump_create_snapshot_reply,
2823 (dump_func)dump_next_process_reply,
2824 (dump_func)dump_next_thread_reply,
2825 (dump_func)dump_next_module_reply,
2826 (dump_func)dump_wait_debug_event_reply,
2827 (dump_func)dump_queue_exception_event_reply,
2828 (dump_func)dump_get_exception_status_reply,
2832 (dump_func)dump_debug_break_reply,
2834 (dump_func)dump_read_process_memory_reply,
2836 (dump_func)dump_create_key_reply,
2837 (dump_func)dump_open_key_reply,
2840 (dump_func)dump_enum_key_reply,
2842 (dump_func)dump_get_key_value_reply,
2843 (dump_func)dump_enum_key_value_reply,
2851 (dump_func)dump_create_timer_reply,
2852 (dump_func)dump_open_timer_reply,
2853 (dump_func)dump_set_timer_reply,
2854 (dump_func)dump_cancel_timer_reply,
2855 (dump_func)dump_get_thread_context_reply,
2857 (dump_func)dump_get_selector_entry_reply,
2858 (dump_func)dump_add_atom_reply,
2860 (dump_func)dump_find_atom_reply,
2861 (dump_func)dump_get_atom_name_reply,
2863 (dump_func)dump_get_msg_queue_reply,
2864 (dump_func)dump_set_queue_mask_reply,
2865 (dump_func)dump_get_queue_status_reply,
2866 (dump_func)dump_wait_input_idle_reply,
2868 (dump_func)dump_get_message_reply,
2870 (dump_func)dump_get_message_reply_reply,
2873 (dump_func)dump_get_serial_info_reply,
2876 (dump_func)dump_create_named_pipe_reply,
2877 (dump_func)dump_open_named_pipe_reply,
2880 (dump_func)dump_disconnect_named_pipe_reply,
2881 (dump_func)dump_get_named_pipe_info_reply,
2882 (dump_func)dump_create_smb_reply,
2883 (dump_func)dump_get_smb_info_reply,
2884 (dump_func)dump_create_window_reply,
2885 (dump_func)dump_link_window_reply,
2887 (dump_func)dump_set_window_owner_reply,
2888 (dump_func)dump_get_window_info_reply,
2889 (dump_func)dump_set_window_info_reply,
2890 (dump_func)dump_get_window_parents_reply,
2891 (dump_func)dump_get_window_children_reply,
2892 (dump_func)dump_get_window_tree_reply,
2894 (dump_func)dump_get_window_rectangles_reply,
2895 (dump_func)dump_get_window_text_reply,
2898 (dump_func)dump_get_windows_offset_reply,
2900 (dump_func)dump_remove_window_property_reply,
2901 (dump_func)dump_get_window_property_reply,
2902 (dump_func)dump_get_window_properties_reply,
2904 (dump_func)dump_get_thread_input_reply,
2905 (dump_func)dump_get_key_state_reply,
2907 (dump_func)dump_set_foreground_window_reply,
2908 (dump_func)dump_set_focus_window_reply,
2909 (dump_func)dump_set_active_window_reply,
2910 (dump_func)dump_set_capture_window_reply,
2911 (dump_func)dump_set_caret_window_reply,
2912 (dump_func)dump_set_caret_info_reply,
2913 (dump_func)dump_set_hook_reply,
2915 (dump_func)dump_start_hook_chain_reply,
2917 (dump_func)dump_get_next_hook_reply,
2919 (dump_func)dump_destroy_class_reply,
2920 (dump_func)dump_set_class_info_reply,
2921 (dump_func)dump_set_clipboard_info_reply,
2922 (dump_func)dump_open_token_reply,
2923 (dump_func)dump_set_global_windows_reply,
2926 static const char * const req_names[REQ_NB_REQUESTS] = {
2928 "get_new_process_info",
2933 "init_process_done",
2935 "terminate_process",
2961 "release_semaphore",
2964 "alloc_file_handle",
2976 "enable_socket_event",
2977 "set_socket_deferred",
2980 "get_console_renderer_events",
2982 "get_console_wait_event",
2985 "set_console_input_info",
2986 "get_console_input_info",
2987 "append_console_input_history",
2988 "get_console_input_history",
2989 "create_console_output",
2990 "set_console_output_info",
2991 "get_console_output_info",
2992 "write_console_input",
2993 "read_console_input",
2994 "write_console_output",
2995 "fill_console_output",
2996 "read_console_output",
2997 "move_console_output",
2998 "send_console_signal",
2999 "create_change_notification",
3000 "next_change_notification",
3009 "queue_exception_event",
3010 "get_exception_status",
3011 "output_debug_string",
3012 "continue_debug_event",
3015 "set_debugger_kill_on_exit",
3016 "read_process_memory",
3017 "write_process_memory",
3030 "save_registry_atexit",
3031 "set_registry_levels",
3032 "set_registry_notification",
3037 "get_thread_context",
3038 "set_thread_context",
3039 "get_selector_entry",
3052 "get_message_reply",
3058 "create_named_pipe",
3060 "connect_named_pipe",
3062 "disconnect_named_pipe",
3063 "get_named_pipe_info",
3072 "get_window_parents",
3073 "get_window_children",
3075 "set_window_rectangles",
3076 "get_window_rectangles",
3079 "inc_window_paint_count",
3080 "get_windows_offset",
3081 "set_window_property",
3082 "remove_window_property",
3083 "get_window_property",
3084 "get_window_properties",
3085 "attach_thread_input",
3089 "set_foreground_window",
3091 "set_active_window",
3092 "set_capture_window",
3098 "finish_hook_chain",
3103 "set_clipboard_info",
3105 "set_global_windows",
3108 /* ### make_requests end ### */
3109 /* Everything above this line is generated automatically by tools/make_requests */
3111 static const char *get_status_name( unsigned int status )
3113 #define NAME(status) { #status, STATUS_##status }
3114 #define NAME_WIN32(error) { #error, 0xc0010000 | error }
3121 NAME(ACCESS_DENIED),
3122 NAME(ACCESS_VIOLATION),
3124 NAME(BUFFER_OVERFLOW),
3125 NAME(CHILD_MUST_BE_VOLATILE),
3126 NAME(DIRECTORY_NOT_EMPTY),
3128 NAME(DLL_NOT_FOUND),
3129 NAME(FILE_LOCK_CONFLICT),
3130 NAME(INVALID_FILE_FOR_SECTION),
3131 NAME(INVALID_HANDLE),
3132 NAME(INVALID_PARAMETER),
3134 NAME(MEDIA_WRITE_PROTECTED),
3135 NAME(MUTANT_NOT_OWNED),
3136 NAME(NOT_IMPLEMENTED),
3137 NAME(NOT_REGISTRY_FILE),
3138 NAME(NO_DATA_DETECTED),
3140 NAME(NO_MORE_ENTRIES),
3141 NAME(NO_MORE_FILES),
3143 NAME(OBJECT_NAME_COLLISION),
3144 NAME(OBJECT_NAME_INVALID),
3145 NAME(OBJECT_NAME_NOT_FOUND),
3146 NAME(OBJECT_PATH_INVALID),
3147 NAME(OBJECT_TYPE_MISMATCH),
3150 NAME(PIPE_CONNECTED),
3151 NAME(PIPE_DISCONNECTED),
3152 NAME(PIPE_LISTENING),
3153 NAME(PIPE_NOT_AVAILABLE),
3154 NAME(SEMAPHORE_LIMIT_EXCEEDED),
3155 NAME(SHARING_VIOLATION),
3156 NAME(SUSPEND_COUNT_EXCEEDED),
3160 NAME_WIN32(ERROR_CANNOT_MAKE),
3161 NAME_WIN32(ERROR_INVALID_INDEX),
3162 NAME_WIN32(ERROR_NEGATIVE_SEEK),
3163 NAME_WIN32(ERROR_SEEK),
3164 NAME_WIN32(ERROR_UNKNOWN),
3165 { NULL, 0 } /* terminator */
3170 static char buffer[10];
3174 for (i = 0; status_names[i].name; i++)
3175 if (status_names[i].value == status) return status_names[i].name;
3177 sprintf( buffer, "%x", status );
3181 void trace_request(void)
3183 enum request req = current->req.request_header.req;
3184 if (req < REQ_NB_REQUESTS)
3186 fprintf( stderr, "%04x: %s(", current->id, req_names[req] );
3187 if (req_dumpers[req])
3190 cur_data = get_req_data();
3191 cur_size = get_req_data_size();
3192 req_dumpers[req]( ¤t->req );
3194 fprintf( stderr, " )\n" );
3196 else fprintf( stderr, "%04x: %d(?)\n", current->id, req );
3199 void trace_reply( enum request req, const union generic_reply *reply )
3201 if (req < REQ_NB_REQUESTS)
3203 fprintf( stderr, "%04x: %s() = %s",
3204 current->id, req_names[req], get_status_name(current->error) );
3205 if (reply_dumpers[req])
3207 fprintf( stderr, " {" );
3209 cur_data = current->reply_data;
3210 cur_size = reply->reply_header.reply_size;
3211 reply_dumpers[req]( reply );
3212 fprintf( stderr, " }" );
3214 fputc( '\n', stderr );
3216 else fprintf( stderr, "%04x: %d() = %s\n",
3217 current->id, req, get_status_name(current->error) );