Release 20030408.
[wine/gsoc-2012-control.git] / server / trace.c
blob93b3de829f87ad10cad08d2f72510f7f3206f1aa
1 /*
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
21 #include "config.h"
22 #include "wine/port.h"
24 #include <ctype.h>
25 #include <stdio.h>
26 #include <sys/types.h>
28 #ifdef HAVE_SYS_UIO_H
29 #include <sys/uio.h>
30 #endif
33 #include "windef.h"
34 #include "winbase.h"
35 #include "wincon.h"
36 #include "request.h"
37 #include "unicode.h"
39 static int cur_pos;
40 static const void *cur_data;
41 static int cur_size;
43 /* utility functions */
45 inline static void remove_data( size_t size )
47 cur_data = (const char *)cur_data + size;
48 cur_size -= size;
51 static void dump_uints( const int *ptr, int len )
53 fputc( '{', stderr );
54 while (len > 0)
56 fprintf( stderr, "%08x", *ptr++ );
57 if (--len) fputc( ',', stderr );
59 fputc( '}', stderr );
62 static void dump_abs_time( const abs_time_t *time )
64 struct timeval tv;
65 int secs, usecs;
67 if (!time->sec && !time->usec)
69 fprintf( stderr, "0" );
70 return;
72 gettimeofday( &tv, NULL );
73 secs = time->sec - tv.tv_sec;
74 if ((usecs = time->usec - tv.tv_usec) < 0)
76 usecs += 1000000;
77 secs--;
79 if (secs > 0 || (secs == 0 && usecs >= 0))
80 fprintf( stderr, "%d.%06d (+%d.%06d)", time->sec, time->usec, secs, usecs );
81 else
82 fprintf( stderr, "%d.%06d (-%d.%06d)", time->sec, time->usec, abs(secs+1), 1000000-usecs );
85 static void dump_rectangle( const rectangle_t *rect )
87 fprintf( stderr, "{%d,%d;%d,%d}",
88 rect->left, rect->top, rect->right, rect->bottom );
91 static void dump_char_info( const char_info_t *info )
93 fprintf( stderr, "{'" );
94 dump_strW( &info->ch, 1, stderr, "\'\'" );
95 fprintf( stderr, "',%04x}", info->attr );
98 static void dump_context( const CONTEXT *context )
100 #ifdef __i386__
101 fprintf( stderr, "{flags=%08lx,eax=%08lx,ebx=%08lx,ecx=%08lx,edx=%08lx,esi=%08lx,edi=%08lx,"
102 "ebp=%08lx,eip=%08lx,esp=%08lx,eflags=%08lx,cs=%04lx,ds=%04lx,es=%04lx,"
103 "fs=%04lx,gs=%04lx,dr0=%08lx,dr1=%08lx,dr2=%08lx,dr3=%08lx,dr6=%08lx,dr7=%08lx,",
104 context->ContextFlags, context->Eax, context->Ebx, context->Ecx, context->Edx,
105 context->Esi, context->Edi, context->Ebp, context->Eip, context->Esp, context->EFlags,
106 context->SegCs, context->SegDs, context->SegEs, context->SegFs, context->SegGs,
107 context->Dr0, context->Dr1, context->Dr2, context->Dr3, context->Dr6, context->Dr7 );
108 fprintf( stderr, "float=" );
109 dump_uints( (int *)&context->FloatSave, sizeof(context->FloatSave) / sizeof(int) );
110 fprintf( stderr, "}" );
111 #else
112 dump_uints( (int *)context, sizeof(*context) / sizeof(int) );
113 #endif
116 static void dump_exc_record( const EXCEPTION_RECORD *rec )
118 int i;
119 fprintf( stderr, "{code=%lx,flags=%lx,rec=%p,addr=%p,params={",
120 rec->ExceptionCode, rec->ExceptionFlags, rec->ExceptionRecord,
121 rec->ExceptionAddress );
122 for (i = 0; i < min(rec->NumberParameters,EXCEPTION_MAXIMUM_PARAMETERS); i++)
124 if (i) fputc( ',', stderr );
125 fprintf( stderr, "%lx", rec->ExceptionInformation[i] );
127 fputc( '}', stderr );
130 static void dump_varargs_ints( size_t size )
132 const int *data = cur_data;
133 size_t len = size / sizeof(*data);
135 fputc( '{', stderr );
136 while (len > 0)
138 fprintf( stderr, "%d", *data++ );
139 if (--len) fputc( ',', stderr );
141 fputc( '}', stderr );
142 remove_data( size );
145 static void dump_varargs_handles( size_t size )
147 const obj_handle_t *data = cur_data;
148 size_t len = size / sizeof(*data);
150 fputc( '{', stderr );
151 while (len > 0)
153 fprintf( stderr, "%p", *data++ );
154 if (--len) fputc( ',', stderr );
156 fputc( '}', stderr );
157 remove_data( size );
160 static void dump_varargs_user_handles( size_t size )
162 const user_handle_t *data = cur_data;
163 size_t len = size / sizeof(*data);
165 fputc( '{', stderr );
166 while (len > 0)
168 fprintf( stderr, "%p", *data++ );
169 if (--len) fputc( ',', stderr );
171 fputc( '}', stderr );
172 remove_data( size );
175 static void dump_varargs_bytes( size_t size )
177 const unsigned char *data = cur_data;
178 size_t len = size;
180 fputc( '{', stderr );
181 while (len > 0)
183 fprintf( stderr, "%02x", *data++ );
184 if (--len) fputc( ',', stderr );
186 fputc( '}', stderr );
187 remove_data( size );
190 static void dump_varargs_string( size_t size )
192 fprintf( stderr, "\"%.*s\"", (int)size, (char *)cur_data );
193 remove_data( size );
196 static void dump_varargs_unicode_str( size_t size )
198 fprintf( stderr, "L\"" );
199 dump_strW( cur_data, size / sizeof(WCHAR), stderr, "\"\"" );
200 fputc( '\"', stderr );
201 remove_data( size );
204 static void dump_varargs_context( size_t size )
206 if (!size)
208 fprintf( stderr, "{}" );
209 return;
211 dump_context( cur_data );
212 remove_data( size );
215 static void dump_varargs_exc_event( size_t size )
217 const CONTEXT *ptr = cur_data;
219 if (!size)
221 fprintf( stderr, "{}" );
222 return;
224 fprintf( stderr, "{context=" );
225 dump_context( ptr );
226 fprintf( stderr, ",rec=" );
227 dump_exc_record( (EXCEPTION_RECORD *)(ptr + 1) );
228 fputc( '}', stderr );
229 remove_data( size );
232 static void dump_varargs_debug_event( size_t size )
234 const debug_event_t *event = cur_data;
236 if (!size)
238 fprintf( stderr, "{}" );
239 return;
241 switch(event->code)
243 case EXCEPTION_DEBUG_EVENT:
244 fprintf( stderr, "{exception," );
245 dump_exc_record( &event->info.exception.record );
246 fprintf( stderr, ",first=%d}", event->info.exception.first );
247 break;
248 case CREATE_THREAD_DEBUG_EVENT:
249 fprintf( stderr, "{create_thread,thread=%p,teb=%p,start=%p}",
250 event->info.create_thread.handle, event->info.create_thread.teb,
251 event->info.create_thread.start );
252 break;
253 case CREATE_PROCESS_DEBUG_EVENT:
254 fprintf( stderr, "{create_process,file=%p,process=%p,thread=%p,base=%p,offset=%d,"
255 "size=%d,teb=%p,start=%p,name=%p,unicode=%d}",
256 event->info.create_process.file, event->info.create_process.process,
257 event->info.create_process.thread, event->info.create_process.base,
258 event->info.create_process.dbg_offset, event->info.create_process.dbg_size,
259 event->info.create_process.teb, event->info.create_process.start,
260 event->info.create_process.name, event->info.create_process.unicode );
261 break;
262 case EXIT_THREAD_DEBUG_EVENT:
263 fprintf( stderr, "{exit_thread,code=%d}", event->info.exit.exit_code );
264 break;
265 case EXIT_PROCESS_DEBUG_EVENT:
266 fprintf( stderr, "{exit_process,code=%d}", event->info.exit.exit_code );
267 break;
268 case LOAD_DLL_DEBUG_EVENT:
269 fprintf( stderr, "{load_dll,file=%p,base=%p,offset=%d,size=%d,name=%p,unicode=%d}",
270 event->info.load_dll.handle, event->info.load_dll.base,
271 event->info.load_dll.dbg_offset, event->info.load_dll.dbg_size,
272 event->info.load_dll.name, event->info.load_dll.unicode );
273 break;
274 case UNLOAD_DLL_DEBUG_EVENT:
275 fprintf( stderr, "{unload_dll,base=%p}", event->info.unload_dll.base );
276 break;
277 case OUTPUT_DEBUG_STRING_EVENT:
278 fprintf( stderr, "{output_string,data=%p,unicode=%d,len=%d}",
279 event->info.output_string.string, event->info.output_string.unicode,
280 event->info.output_string.length );
281 break;
282 case RIP_EVENT:
283 fprintf( stderr, "{rip,err=%d,type=%d}",
284 event->info.rip_info.error, event->info.rip_info.type );
285 break;
286 case 0: /* zero is the code returned on timeouts */
287 fprintf( stderr, "{}" );
288 break;
289 default:
290 fprintf( stderr, "{code=??? (%d)}", event->code );
291 break;
293 remove_data( size );
296 static void dump_varargs_startup_info( size_t size )
298 const startup_info_t *ptr = cur_data;
299 startup_info_t info;
301 if (size < sizeof(info.size))
303 fprintf( stderr, "{}" );
304 return;
306 if (size > ptr->size) size = ptr->size;
307 memset( &info, 0, sizeof(info) );
308 memcpy( &info, ptr, min( size, sizeof(info) ));
310 fprintf( stderr, "{size=%d", info.size );
311 fprintf( stderr, ",x=%d", info.x );
312 fprintf( stderr, ",y=%d", info.y );
313 fprintf( stderr, ",cx=%d", info.cx );
314 fprintf( stderr, ",cy=%d", info.cy );
315 fprintf( stderr, ",x_chars=%d", info.x_chars );
316 fprintf( stderr, ",y_chars=%d", info.y_chars );
317 fprintf( stderr, ",attr=%d", info.attribute );
318 fprintf( stderr, ",cmd_show=%d", info.cmd_show );
319 fprintf( stderr, ",flags=%x", info.flags );
320 remove_data( size );
321 fprintf( stderr, ",filename=" );
322 /* FIXME: these should be unicode */
323 dump_varargs_string( min(cur_size,info.filename_len) );
324 fprintf( stderr, ",cmdline=" );
325 dump_varargs_string( min(cur_size,info.cmdline_len) );
326 fprintf( stderr, ",desktop=" );
327 dump_varargs_string( min(cur_size,info.desktop_len) );
328 fprintf( stderr, ",title=" );
329 dump_varargs_string( min(cur_size,info.title_len) );
330 fputc( '}', stderr );
333 static void dump_varargs_input_records( size_t size )
335 const INPUT_RECORD *rec = cur_data;
336 size_t len = size / sizeof(*rec);
338 fputc( '{', stderr );
339 while (len > 0)
341 fprintf( stderr, "{%04x,...}", rec->EventType );
342 rec++;
343 if (--len) fputc( ',', stderr );
345 fputc( '}', stderr );
346 remove_data( size );
349 static void dump_varargs_properties( size_t size )
351 const property_data_t *prop = cur_data;
352 size_t len = size / sizeof(*prop);
354 fputc( '{', stderr );
355 while (len > 0)
357 fprintf( stderr, "{atom=%04x,str=%d,handle=%p}",
358 prop->atom, prop->string, prop->handle );
359 prop++;
360 if (--len) fputc( ',', stderr );
362 fputc( '}', stderr );
363 remove_data( size );
366 typedef void (*dump_func)( const void *req );
368 /* Everything below this line is generated automatically by tools/make_requests */
369 /* ### make_requests begin ### */
371 static void dump_new_process_request( const struct new_process_request *req )
373 fprintf( stderr, " inherit_all=%d,", req->inherit_all );
374 fprintf( stderr, " use_handles=%d,", req->use_handles );
375 fprintf( stderr, " create_flags=%d,", req->create_flags );
376 fprintf( stderr, " unix_pid=%d,", req->unix_pid );
377 fprintf( stderr, " exe_file=%p,", req->exe_file );
378 fprintf( stderr, " hstdin=%p,", req->hstdin );
379 fprintf( stderr, " hstdout=%p,", req->hstdout );
380 fprintf( stderr, " hstderr=%p,", req->hstderr );
381 fprintf( stderr, " info=" );
382 dump_varargs_startup_info( cur_size );
385 static void dump_new_process_reply( const struct new_process_reply *req )
387 fprintf( stderr, " info=%p", req->info );
390 static void dump_get_new_process_info_request( const struct get_new_process_info_request *req )
392 fprintf( stderr, " info=%p,", req->info );
393 fprintf( stderr, " pinherit=%d,", req->pinherit );
394 fprintf( stderr, " tinherit=%d", req->tinherit );
397 static void dump_get_new_process_info_reply( const struct get_new_process_info_reply *req )
399 fprintf( stderr, " pid=%04x,", req->pid );
400 fprintf( stderr, " phandle=%p,", req->phandle );
401 fprintf( stderr, " tid=%04x,", req->tid );
402 fprintf( stderr, " thandle=%p,", req->thandle );
403 fprintf( stderr, " success=%d", req->success );
406 static void dump_new_thread_request( const struct new_thread_request *req )
408 fprintf( stderr, " suspend=%d,", req->suspend );
409 fprintf( stderr, " inherit=%d,", req->inherit );
410 fprintf( stderr, " request_fd=%d", req->request_fd );
413 static void dump_new_thread_reply( const struct new_thread_reply *req )
415 fprintf( stderr, " tid=%04x,", req->tid );
416 fprintf( stderr, " handle=%p", req->handle );
419 static void dump_boot_done_request( const struct boot_done_request *req )
421 fprintf( stderr, " debug_level=%d", req->debug_level );
424 static void dump_init_process_request( const struct init_process_request *req )
426 fprintf( stderr, " ldt_copy=%p", req->ldt_copy );
429 static void dump_init_process_reply( const struct init_process_reply *req )
431 fprintf( stderr, " create_flags=%d,", req->create_flags );
432 fprintf( stderr, " server_start=%08x,", req->server_start );
433 fprintf( stderr, " info_size=%d,", req->info_size );
434 fprintf( stderr, " exe_file=%p,", req->exe_file );
435 fprintf( stderr, " hstdin=%p,", req->hstdin );
436 fprintf( stderr, " hstdout=%p,", req->hstdout );
437 fprintf( stderr, " hstderr=%p", req->hstderr );
440 static void dump_get_startup_info_request( const struct get_startup_info_request *req )
444 static void dump_get_startup_info_reply( const struct get_startup_info_reply *req )
446 fprintf( stderr, " info=" );
447 dump_varargs_startup_info( cur_size );
450 static void dump_init_process_done_request( const struct init_process_done_request *req )
452 fprintf( stderr, " module=%p,", req->module );
453 fprintf( stderr, " module_size=%d,", req->module_size );
454 fprintf( stderr, " entry=%p,", req->entry );
455 fprintf( stderr, " name=%p,", req->name );
456 fprintf( stderr, " exe_file=%p,", req->exe_file );
457 fprintf( stderr, " gui=%d,", req->gui );
458 fprintf( stderr, " filename=" );
459 dump_varargs_string( cur_size );
462 static void dump_init_process_done_reply( const struct init_process_done_reply *req )
464 fprintf( stderr, " debugged=%d", req->debugged );
467 static void dump_init_thread_request( const struct init_thread_request *req )
469 fprintf( stderr, " unix_pid=%d,", req->unix_pid );
470 fprintf( stderr, " unix_tid=%d,", req->unix_tid );
471 fprintf( stderr, " teb=%p,", req->teb );
472 fprintf( stderr, " entry=%p,", req->entry );
473 fprintf( stderr, " reply_fd=%d,", req->reply_fd );
474 fprintf( stderr, " wait_fd=%d", req->wait_fd );
477 static void dump_init_thread_reply( const struct init_thread_reply *req )
479 fprintf( stderr, " pid=%04x,", req->pid );
480 fprintf( stderr, " tid=%04x,", req->tid );
481 fprintf( stderr, " boot=%d,", req->boot );
482 fprintf( stderr, " version=%d", req->version );
485 static void dump_terminate_process_request( const struct terminate_process_request *req )
487 fprintf( stderr, " handle=%p,", req->handle );
488 fprintf( stderr, " exit_code=%d", req->exit_code );
491 static void dump_terminate_process_reply( const struct terminate_process_reply *req )
493 fprintf( stderr, " self=%d", req->self );
496 static void dump_terminate_thread_request( const struct terminate_thread_request *req )
498 fprintf( stderr, " handle=%p,", req->handle );
499 fprintf( stderr, " exit_code=%d", req->exit_code );
502 static void dump_terminate_thread_reply( const struct terminate_thread_reply *req )
504 fprintf( stderr, " self=%d,", req->self );
505 fprintf( stderr, " last=%d", req->last );
508 static void dump_get_process_info_request( const struct get_process_info_request *req )
510 fprintf( stderr, " handle=%p", req->handle );
513 static void dump_get_process_info_reply( const struct get_process_info_reply *req )
515 fprintf( stderr, " pid=%04x,", req->pid );
516 fprintf( stderr, " debugged=%d,", req->debugged );
517 fprintf( stderr, " exit_code=%d,", req->exit_code );
518 fprintf( stderr, " priority=%d,", req->priority );
519 fprintf( stderr, " process_affinity=%d,", req->process_affinity );
520 fprintf( stderr, " system_affinity=%d", req->system_affinity );
523 static void dump_set_process_info_request( const struct set_process_info_request *req )
525 fprintf( stderr, " handle=%p,", req->handle );
526 fprintf( stderr, " mask=%d,", req->mask );
527 fprintf( stderr, " priority=%d,", req->priority );
528 fprintf( stderr, " affinity=%d", req->affinity );
531 static void dump_get_thread_info_request( const struct get_thread_info_request *req )
533 fprintf( stderr, " handle=%p,", req->handle );
534 fprintf( stderr, " tid_in=%04x", req->tid_in );
537 static void dump_get_thread_info_reply( const struct get_thread_info_reply *req )
539 fprintf( stderr, " tid=%04x,", req->tid );
540 fprintf( stderr, " teb=%p,", req->teb );
541 fprintf( stderr, " exit_code=%d,", req->exit_code );
542 fprintf( stderr, " priority=%d,", req->priority );
543 fprintf( stderr, " creation_time=%ld,", req->creation_time );
544 fprintf( stderr, " exit_time=%ld", req->exit_time );
547 static void dump_set_thread_info_request( const struct set_thread_info_request *req )
549 fprintf( stderr, " handle=%p,", req->handle );
550 fprintf( stderr, " mask=%d,", req->mask );
551 fprintf( stderr, " priority=%d,", req->priority );
552 fprintf( stderr, " affinity=%d", req->affinity );
555 static void dump_get_dll_info_request( const struct get_dll_info_request *req )
557 fprintf( stderr, " handle=%p,", req->handle );
558 fprintf( stderr, " base_address=%p", req->base_address );
561 static void dump_get_dll_info_reply( const struct get_dll_info_reply *req )
563 fprintf( stderr, " size=%d,", req->size );
564 fprintf( stderr, " entry_point=%p,", req->entry_point );
565 fprintf( stderr, " filename=" );
566 dump_varargs_string( cur_size );
569 static void dump_suspend_thread_request( const struct suspend_thread_request *req )
571 fprintf( stderr, " handle=%p", req->handle );
574 static void dump_suspend_thread_reply( const struct suspend_thread_reply *req )
576 fprintf( stderr, " count=%d", req->count );
579 static void dump_resume_thread_request( const struct resume_thread_request *req )
581 fprintf( stderr, " handle=%p", req->handle );
584 static void dump_resume_thread_reply( const struct resume_thread_reply *req )
586 fprintf( stderr, " count=%d", req->count );
589 static void dump_load_dll_request( const struct load_dll_request *req )
591 fprintf( stderr, " handle=%p,", req->handle );
592 fprintf( stderr, " base=%p,", req->base );
593 fprintf( stderr, " size=%d,", req->size );
594 fprintf( stderr, " dbg_offset=%d,", req->dbg_offset );
595 fprintf( stderr, " dbg_size=%d,", req->dbg_size );
596 fprintf( stderr, " name=%p,", req->name );
597 fprintf( stderr, " filename=" );
598 dump_varargs_string( cur_size );
601 static void dump_unload_dll_request( const struct unload_dll_request *req )
603 fprintf( stderr, " base=%p", req->base );
606 static void dump_queue_apc_request( const struct queue_apc_request *req )
608 fprintf( stderr, " handle=%p,", req->handle );
609 fprintf( stderr, " user=%d,", req->user );
610 fprintf( stderr, " func=%p,", req->func );
611 fprintf( stderr, " arg1=%p,", req->arg1 );
612 fprintf( stderr, " arg2=%p,", req->arg2 );
613 fprintf( stderr, " arg3=%p", req->arg3 );
616 static void dump_get_apc_request( const struct get_apc_request *req )
618 fprintf( stderr, " alertable=%d", req->alertable );
621 static void dump_get_apc_reply( const struct get_apc_reply *req )
623 fprintf( stderr, " func=%p,", req->func );
624 fprintf( stderr, " type=%d,", req->type );
625 fprintf( stderr, " arg1=%p,", req->arg1 );
626 fprintf( stderr, " arg2=%p,", req->arg2 );
627 fprintf( stderr, " arg3=%p", req->arg3 );
630 static void dump_close_handle_request( const struct close_handle_request *req )
632 fprintf( stderr, " handle=%p", req->handle );
635 static void dump_close_handle_reply( const struct close_handle_reply *req )
637 fprintf( stderr, " fd=%d", req->fd );
640 static void dump_set_handle_info_request( const struct set_handle_info_request *req )
642 fprintf( stderr, " handle=%p,", req->handle );
643 fprintf( stderr, " flags=%d,", req->flags );
644 fprintf( stderr, " mask=%d,", req->mask );
645 fprintf( stderr, " fd=%d", req->fd );
648 static void dump_set_handle_info_reply( const struct set_handle_info_reply *req )
650 fprintf( stderr, " old_flags=%d,", req->old_flags );
651 fprintf( stderr, " cur_fd=%d", req->cur_fd );
654 static void dump_dup_handle_request( const struct dup_handle_request *req )
656 fprintf( stderr, " src_process=%p,", req->src_process );
657 fprintf( stderr, " src_handle=%p,", req->src_handle );
658 fprintf( stderr, " dst_process=%p,", req->dst_process );
659 fprintf( stderr, " access=%08x,", req->access );
660 fprintf( stderr, " inherit=%d,", req->inherit );
661 fprintf( stderr, " options=%d", req->options );
664 static void dump_dup_handle_reply( const struct dup_handle_reply *req )
666 fprintf( stderr, " handle=%p,", req->handle );
667 fprintf( stderr, " fd=%d", req->fd );
670 static void dump_open_process_request( const struct open_process_request *req )
672 fprintf( stderr, " pid=%04x,", req->pid );
673 fprintf( stderr, " access=%08x,", req->access );
674 fprintf( stderr, " inherit=%d", req->inherit );
677 static void dump_open_process_reply( const struct open_process_reply *req )
679 fprintf( stderr, " handle=%p", req->handle );
682 static void dump_open_thread_request( const struct open_thread_request *req )
684 fprintf( stderr, " tid=%04x,", req->tid );
685 fprintf( stderr, " access=%08x,", req->access );
686 fprintf( stderr, " inherit=%d", req->inherit );
689 static void dump_open_thread_reply( const struct open_thread_reply *req )
691 fprintf( stderr, " handle=%p", req->handle );
694 static void dump_select_request( const struct select_request *req )
696 fprintf( stderr, " flags=%d,", req->flags );
697 fprintf( stderr, " cookie=%p,", req->cookie );
698 fprintf( stderr, " timeout=" );
699 dump_abs_time( &req->timeout );
700 fprintf( stderr, "," );
701 fprintf( stderr, " handles=" );
702 dump_varargs_handles( cur_size );
705 static void dump_create_event_request( const struct create_event_request *req )
707 fprintf( stderr, " manual_reset=%d,", req->manual_reset );
708 fprintf( stderr, " initial_state=%d,", req->initial_state );
709 fprintf( stderr, " inherit=%d,", req->inherit );
710 fprintf( stderr, " name=" );
711 dump_varargs_unicode_str( cur_size );
714 static void dump_create_event_reply( const struct create_event_reply *req )
716 fprintf( stderr, " handle=%p", req->handle );
719 static void dump_event_op_request( const struct event_op_request *req )
721 fprintf( stderr, " handle=%p,", req->handle );
722 fprintf( stderr, " op=%d", req->op );
725 static void dump_open_event_request( const struct open_event_request *req )
727 fprintf( stderr, " access=%08x,", req->access );
728 fprintf( stderr, " inherit=%d,", req->inherit );
729 fprintf( stderr, " name=" );
730 dump_varargs_unicode_str( cur_size );
733 static void dump_open_event_reply( const struct open_event_reply *req )
735 fprintf( stderr, " handle=%p", req->handle );
738 static void dump_create_mutex_request( const struct create_mutex_request *req )
740 fprintf( stderr, " owned=%d,", req->owned );
741 fprintf( stderr, " inherit=%d,", req->inherit );
742 fprintf( stderr, " name=" );
743 dump_varargs_unicode_str( cur_size );
746 static void dump_create_mutex_reply( const struct create_mutex_reply *req )
748 fprintf( stderr, " handle=%p", req->handle );
751 static void dump_release_mutex_request( const struct release_mutex_request *req )
753 fprintf( stderr, " handle=%p", req->handle );
756 static void dump_open_mutex_request( const struct open_mutex_request *req )
758 fprintf( stderr, " access=%08x,", req->access );
759 fprintf( stderr, " inherit=%d,", req->inherit );
760 fprintf( stderr, " name=" );
761 dump_varargs_unicode_str( cur_size );
764 static void dump_open_mutex_reply( const struct open_mutex_reply *req )
766 fprintf( stderr, " handle=%p", req->handle );
769 static void dump_create_semaphore_request( const struct create_semaphore_request *req )
771 fprintf( stderr, " initial=%08x,", req->initial );
772 fprintf( stderr, " max=%08x,", req->max );
773 fprintf( stderr, " inherit=%d,", req->inherit );
774 fprintf( stderr, " name=" );
775 dump_varargs_unicode_str( cur_size );
778 static void dump_create_semaphore_reply( const struct create_semaphore_reply *req )
780 fprintf( stderr, " handle=%p", req->handle );
783 static void dump_release_semaphore_request( const struct release_semaphore_request *req )
785 fprintf( stderr, " handle=%p,", req->handle );
786 fprintf( stderr, " count=%08x", req->count );
789 static void dump_release_semaphore_reply( const struct release_semaphore_reply *req )
791 fprintf( stderr, " prev_count=%08x", req->prev_count );
794 static void dump_open_semaphore_request( const struct open_semaphore_request *req )
796 fprintf( stderr, " access=%08x,", req->access );
797 fprintf( stderr, " inherit=%d,", req->inherit );
798 fprintf( stderr, " name=" );
799 dump_varargs_unicode_str( cur_size );
802 static void dump_open_semaphore_reply( const struct open_semaphore_reply *req )
804 fprintf( stderr, " handle=%p", req->handle );
807 static void dump_create_file_request( const struct create_file_request *req )
809 fprintf( stderr, " access=%08x,", req->access );
810 fprintf( stderr, " inherit=%d,", req->inherit );
811 fprintf( stderr, " sharing=%08x,", req->sharing );
812 fprintf( stderr, " create=%d,", req->create );
813 fprintf( stderr, " attrs=%08x,", req->attrs );
814 fprintf( stderr, " drive_type=%d,", req->drive_type );
815 fprintf( stderr, " filename=" );
816 dump_varargs_string( cur_size );
819 static void dump_create_file_reply( const struct create_file_reply *req )
821 fprintf( stderr, " handle=%p", req->handle );
824 static void dump_alloc_file_handle_request( const struct alloc_file_handle_request *req )
826 fprintf( stderr, " access=%08x,", req->access );
827 fprintf( stderr, " inherit=%d,", req->inherit );
828 fprintf( stderr, " fd=%d", req->fd );
831 static void dump_alloc_file_handle_reply( const struct alloc_file_handle_reply *req )
833 fprintf( stderr, " handle=%p", req->handle );
836 static void dump_get_handle_fd_request( const struct get_handle_fd_request *req )
838 fprintf( stderr, " handle=%p,", req->handle );
839 fprintf( stderr, " access=%08x", req->access );
842 static void dump_get_handle_fd_reply( const struct get_handle_fd_reply *req )
844 fprintf( stderr, " fd=%d,", req->fd );
845 fprintf( stderr, " type=%d,", req->type );
846 fprintf( stderr, " flags=%d", req->flags );
849 static void dump_set_file_pointer_request( const struct set_file_pointer_request *req )
851 fprintf( stderr, " handle=%p,", req->handle );
852 fprintf( stderr, " low=%d,", req->low );
853 fprintf( stderr, " high=%d,", req->high );
854 fprintf( stderr, " whence=%d", req->whence );
857 static void dump_set_file_pointer_reply( const struct set_file_pointer_reply *req )
859 fprintf( stderr, " new_low=%d,", req->new_low );
860 fprintf( stderr, " new_high=%d", req->new_high );
863 static void dump_truncate_file_request( const struct truncate_file_request *req )
865 fprintf( stderr, " handle=%p", req->handle );
868 static void dump_set_file_time_request( const struct set_file_time_request *req )
870 fprintf( stderr, " handle=%p,", req->handle );
871 fprintf( stderr, " access_time=%ld,", req->access_time );
872 fprintf( stderr, " write_time=%ld", req->write_time );
875 static void dump_flush_file_request( const struct flush_file_request *req )
877 fprintf( stderr, " handle=%p", req->handle );
880 static void dump_get_file_info_request( const struct get_file_info_request *req )
882 fprintf( stderr, " handle=%p", req->handle );
885 static void dump_get_file_info_reply( const struct get_file_info_reply *req )
887 fprintf( stderr, " type=%d,", req->type );
888 fprintf( stderr, " attr=%d,", req->attr );
889 fprintf( stderr, " access_time=%ld,", req->access_time );
890 fprintf( stderr, " write_time=%ld,", req->write_time );
891 fprintf( stderr, " size_high=%d,", req->size_high );
892 fprintf( stderr, " size_low=%d,", req->size_low );
893 fprintf( stderr, " links=%d,", req->links );
894 fprintf( stderr, " index_high=%d,", req->index_high );
895 fprintf( stderr, " index_low=%d,", req->index_low );
896 fprintf( stderr, " serial=%08x", req->serial );
899 static void dump_lock_file_request( const struct lock_file_request *req )
901 fprintf( stderr, " handle=%p,", req->handle );
902 fprintf( stderr, " offset_low=%08x,", req->offset_low );
903 fprintf( stderr, " offset_high=%08x,", req->offset_high );
904 fprintf( stderr, " count_low=%08x,", req->count_low );
905 fprintf( stderr, " count_high=%08x,", req->count_high );
906 fprintf( stderr, " shared=%d,", req->shared );
907 fprintf( stderr, " wait=%d", req->wait );
910 static void dump_lock_file_reply( const struct lock_file_reply *req )
912 fprintf( stderr, " handle=%p,", req->handle );
913 fprintf( stderr, " overlapped=%d", req->overlapped );
916 static void dump_unlock_file_request( const struct unlock_file_request *req )
918 fprintf( stderr, " handle=%p,", req->handle );
919 fprintf( stderr, " offset_low=%08x,", req->offset_low );
920 fprintf( stderr, " offset_high=%08x,", req->offset_high );
921 fprintf( stderr, " count_low=%08x,", req->count_low );
922 fprintf( stderr, " count_high=%08x", req->count_high );
925 static void dump_create_pipe_request( const struct create_pipe_request *req )
927 fprintf( stderr, " inherit=%d", req->inherit );
930 static void dump_create_pipe_reply( const struct create_pipe_reply *req )
932 fprintf( stderr, " handle_read=%p,", req->handle_read );
933 fprintf( stderr, " handle_write=%p", req->handle_write );
936 static void dump_create_socket_request( const struct create_socket_request *req )
938 fprintf( stderr, " access=%08x,", req->access );
939 fprintf( stderr, " inherit=%d,", req->inherit );
940 fprintf( stderr, " family=%d,", req->family );
941 fprintf( stderr, " type=%d,", req->type );
942 fprintf( stderr, " protocol=%d,", req->protocol );
943 fprintf( stderr, " flags=%08x", req->flags );
946 static void dump_create_socket_reply( const struct create_socket_reply *req )
948 fprintf( stderr, " handle=%p", req->handle );
951 static void dump_accept_socket_request( const struct accept_socket_request *req )
953 fprintf( stderr, " lhandle=%p,", req->lhandle );
954 fprintf( stderr, " access=%08x,", req->access );
955 fprintf( stderr, " inherit=%d", req->inherit );
958 static void dump_accept_socket_reply( const struct accept_socket_reply *req )
960 fprintf( stderr, " handle=%p", req->handle );
963 static void dump_set_socket_event_request( const struct set_socket_event_request *req )
965 fprintf( stderr, " handle=%p,", req->handle );
966 fprintf( stderr, " mask=%08x,", req->mask );
967 fprintf( stderr, " event=%p,", req->event );
968 fprintf( stderr, " window=%p,", req->window );
969 fprintf( stderr, " msg=%08x", req->msg );
972 static void dump_get_socket_event_request( const struct get_socket_event_request *req )
974 fprintf( stderr, " handle=%p,", req->handle );
975 fprintf( stderr, " service=%d,", req->service );
976 fprintf( stderr, " c_event=%p", req->c_event );
979 static void dump_get_socket_event_reply( const struct get_socket_event_reply *req )
981 fprintf( stderr, " mask=%08x,", req->mask );
982 fprintf( stderr, " pmask=%08x,", req->pmask );
983 fprintf( stderr, " state=%08x,", req->state );
984 fprintf( stderr, " errors=" );
985 dump_varargs_ints( cur_size );
988 static void dump_enable_socket_event_request( const struct enable_socket_event_request *req )
990 fprintf( stderr, " handle=%p,", req->handle );
991 fprintf( stderr, " mask=%08x,", req->mask );
992 fprintf( stderr, " sstate=%08x,", req->sstate );
993 fprintf( stderr, " cstate=%08x", req->cstate );
996 static void dump_set_socket_deferred_request( const struct set_socket_deferred_request *req )
998 fprintf( stderr, " handle=%p,", req->handle );
999 fprintf( stderr, " deferred=%p", req->deferred );
1002 static void dump_alloc_console_request( const struct alloc_console_request *req )
1004 fprintf( stderr, " access=%08x,", req->access );
1005 fprintf( stderr, " inherit=%d,", req->inherit );
1006 fprintf( stderr, " pid=%04x", req->pid );
1009 static void dump_alloc_console_reply( const struct alloc_console_reply *req )
1011 fprintf( stderr, " handle_in=%p,", req->handle_in );
1012 fprintf( stderr, " event=%p", req->event );
1015 static void dump_free_console_request( const struct free_console_request *req )
1019 static void dump_get_console_renderer_events_request( const struct get_console_renderer_events_request *req )
1021 fprintf( stderr, " handle=%p", req->handle );
1024 static void dump_get_console_renderer_events_reply( const struct get_console_renderer_events_reply *req )
1026 fprintf( stderr, " data=" );
1027 dump_varargs_bytes( cur_size );
1030 static void dump_open_console_request( const struct open_console_request *req )
1032 fprintf( stderr, " from=%d,", req->from );
1033 fprintf( stderr, " access=%08x,", req->access );
1034 fprintf( stderr, " inherit=%d,", req->inherit );
1035 fprintf( stderr, " share=%d", req->share );
1038 static void dump_open_console_reply( const struct open_console_reply *req )
1040 fprintf( stderr, " handle=%p", req->handle );
1043 static void dump_get_console_mode_request( const struct get_console_mode_request *req )
1045 fprintf( stderr, " handle=%p", req->handle );
1048 static void dump_get_console_mode_reply( const struct get_console_mode_reply *req )
1050 fprintf( stderr, " mode=%d", req->mode );
1053 static void dump_set_console_mode_request( const struct set_console_mode_request *req )
1055 fprintf( stderr, " handle=%p,", req->handle );
1056 fprintf( stderr, " mode=%d", req->mode );
1059 static void dump_set_console_input_info_request( const struct set_console_input_info_request *req )
1061 fprintf( stderr, " handle=%p,", req->handle );
1062 fprintf( stderr, " mask=%d,", req->mask );
1063 fprintf( stderr, " active_sb=%p,", req->active_sb );
1064 fprintf( stderr, " history_mode=%d,", req->history_mode );
1065 fprintf( stderr, " history_size=%d,", req->history_size );
1066 fprintf( stderr, " edition_mode=%d,", req->edition_mode );
1067 fprintf( stderr, " title=" );
1068 dump_varargs_unicode_str( cur_size );
1071 static void dump_get_console_input_info_request( const struct get_console_input_info_request *req )
1073 fprintf( stderr, " handle=%p", req->handle );
1076 static void dump_get_console_input_info_reply( const struct get_console_input_info_reply *req )
1078 fprintf( stderr, " history_mode=%d,", req->history_mode );
1079 fprintf( stderr, " history_size=%d,", req->history_size );
1080 fprintf( stderr, " history_index=%d,", req->history_index );
1081 fprintf( stderr, " edition_mode=%d,", req->edition_mode );
1082 fprintf( stderr, " title=" );
1083 dump_varargs_unicode_str( cur_size );
1086 static void dump_append_console_input_history_request( const struct append_console_input_history_request *req )
1088 fprintf( stderr, " handle=%p,", req->handle );
1089 fprintf( stderr, " line=" );
1090 dump_varargs_unicode_str( cur_size );
1093 static void dump_get_console_input_history_request( const struct get_console_input_history_request *req )
1095 fprintf( stderr, " handle=%p,", req->handle );
1096 fprintf( stderr, " index=%d", req->index );
1099 static void dump_get_console_input_history_reply( const struct get_console_input_history_reply *req )
1101 fprintf( stderr, " total=%d,", req->total );
1102 fprintf( stderr, " line=" );
1103 dump_varargs_unicode_str( cur_size );
1106 static void dump_create_console_output_request( const struct create_console_output_request *req )
1108 fprintf( stderr, " handle_in=%p,", req->handle_in );
1109 fprintf( stderr, " access=%d,", req->access );
1110 fprintf( stderr, " share=%d,", req->share );
1111 fprintf( stderr, " inherit=%d", req->inherit );
1114 static void dump_create_console_output_reply( const struct create_console_output_reply *req )
1116 fprintf( stderr, " handle_out=%p", req->handle_out );
1119 static void dump_set_console_output_info_request( const struct set_console_output_info_request *req )
1121 fprintf( stderr, " handle=%p,", req->handle );
1122 fprintf( stderr, " mask=%d,", req->mask );
1123 fprintf( stderr, " cursor_size=%d,", req->cursor_size );
1124 fprintf( stderr, " cursor_visible=%d,", req->cursor_visible );
1125 fprintf( stderr, " cursor_x=%d,", req->cursor_x );
1126 fprintf( stderr, " cursor_y=%d,", req->cursor_y );
1127 fprintf( stderr, " width=%d,", req->width );
1128 fprintf( stderr, " height=%d,", req->height );
1129 fprintf( stderr, " attr=%d,", req->attr );
1130 fprintf( stderr, " win_left=%d,", req->win_left );
1131 fprintf( stderr, " win_top=%d,", req->win_top );
1132 fprintf( stderr, " win_right=%d,", req->win_right );
1133 fprintf( stderr, " win_bottom=%d,", req->win_bottom );
1134 fprintf( stderr, " max_width=%d,", req->max_width );
1135 fprintf( stderr, " max_height=%d", req->max_height );
1138 static void dump_get_console_output_info_request( const struct get_console_output_info_request *req )
1140 fprintf( stderr, " handle=%p", req->handle );
1143 static void dump_get_console_output_info_reply( const struct get_console_output_info_reply *req )
1145 fprintf( stderr, " cursor_size=%d,", req->cursor_size );
1146 fprintf( stderr, " cursor_visible=%d,", req->cursor_visible );
1147 fprintf( stderr, " cursor_x=%d,", req->cursor_x );
1148 fprintf( stderr, " cursor_y=%d,", req->cursor_y );
1149 fprintf( stderr, " width=%d,", req->width );
1150 fprintf( stderr, " height=%d,", req->height );
1151 fprintf( stderr, " attr=%d,", req->attr );
1152 fprintf( stderr, " win_left=%d,", req->win_left );
1153 fprintf( stderr, " win_top=%d,", req->win_top );
1154 fprintf( stderr, " win_right=%d,", req->win_right );
1155 fprintf( stderr, " win_bottom=%d,", req->win_bottom );
1156 fprintf( stderr, " max_width=%d,", req->max_width );
1157 fprintf( stderr, " max_height=%d", req->max_height );
1160 static void dump_write_console_input_request( const struct write_console_input_request *req )
1162 fprintf( stderr, " handle=%p,", req->handle );
1163 fprintf( stderr, " rec=" );
1164 dump_varargs_input_records( cur_size );
1167 static void dump_write_console_input_reply( const struct write_console_input_reply *req )
1169 fprintf( stderr, " written=%d", req->written );
1172 static void dump_read_console_input_request( const struct read_console_input_request *req )
1174 fprintf( stderr, " handle=%p,", req->handle );
1175 fprintf( stderr, " flush=%d", req->flush );
1178 static void dump_read_console_input_reply( const struct read_console_input_reply *req )
1180 fprintf( stderr, " read=%d,", req->read );
1181 fprintf( stderr, " rec=" );
1182 dump_varargs_input_records( cur_size );
1185 static void dump_write_console_output_request( const struct write_console_output_request *req )
1187 fprintf( stderr, " handle=%p,", req->handle );
1188 fprintf( stderr, " x=%d,", req->x );
1189 fprintf( stderr, " y=%d,", req->y );
1190 fprintf( stderr, " mode=%d,", req->mode );
1191 fprintf( stderr, " wrap=%d,", req->wrap );
1192 fprintf( stderr, " data=" );
1193 dump_varargs_bytes( cur_size );
1196 static void dump_write_console_output_reply( const struct write_console_output_reply *req )
1198 fprintf( stderr, " written=%d,", req->written );
1199 fprintf( stderr, " width=%d,", req->width );
1200 fprintf( stderr, " height=%d", req->height );
1203 static void dump_fill_console_output_request( const struct fill_console_output_request *req )
1205 fprintf( stderr, " handle=%p,", req->handle );
1206 fprintf( stderr, " x=%d,", req->x );
1207 fprintf( stderr, " y=%d,", req->y );
1208 fprintf( stderr, " mode=%d,", req->mode );
1209 fprintf( stderr, " count=%d,", req->count );
1210 fprintf( stderr, " wrap=%d,", req->wrap );
1211 fprintf( stderr, " data=" );
1212 dump_char_info( &req->data );
1215 static void dump_fill_console_output_reply( const struct fill_console_output_reply *req )
1217 fprintf( stderr, " written=%d", req->written );
1220 static void dump_read_console_output_request( const struct read_console_output_request *req )
1222 fprintf( stderr, " handle=%p,", req->handle );
1223 fprintf( stderr, " x=%d,", req->x );
1224 fprintf( stderr, " y=%d,", req->y );
1225 fprintf( stderr, " mode=%d,", req->mode );
1226 fprintf( stderr, " wrap=%d", req->wrap );
1229 static void dump_read_console_output_reply( const struct read_console_output_reply *req )
1231 fprintf( stderr, " width=%d,", req->width );
1232 fprintf( stderr, " height=%d,", req->height );
1233 fprintf( stderr, " data=" );
1234 dump_varargs_bytes( cur_size );
1237 static void dump_move_console_output_request( const struct move_console_output_request *req )
1239 fprintf( stderr, " handle=%p,", req->handle );
1240 fprintf( stderr, " x_src=%d,", req->x_src );
1241 fprintf( stderr, " y_src=%d,", req->y_src );
1242 fprintf( stderr, " x_dst=%d,", req->x_dst );
1243 fprintf( stderr, " y_dst=%d,", req->y_dst );
1244 fprintf( stderr, " w=%d,", req->w );
1245 fprintf( stderr, " h=%d", req->h );
1248 static void dump_send_console_signal_request( const struct send_console_signal_request *req )
1250 fprintf( stderr, " signal=%d,", req->signal );
1251 fprintf( stderr, " group_id=%04x", req->group_id );
1254 static void dump_create_change_notification_request( const struct create_change_notification_request *req )
1256 fprintf( stderr, " handle=%p,", req->handle );
1257 fprintf( stderr, " subtree=%d,", req->subtree );
1258 fprintf( stderr, " filter=%08x", req->filter );
1261 static void dump_create_change_notification_reply( const struct create_change_notification_reply *req )
1263 fprintf( stderr, " handle=%p", req->handle );
1266 static void dump_next_change_notification_request( const struct next_change_notification_request *req )
1268 fprintf( stderr, " handle=%p", req->handle );
1271 static void dump_create_mapping_request( const struct create_mapping_request *req )
1273 fprintf( stderr, " size_high=%d,", req->size_high );
1274 fprintf( stderr, " size_low=%d,", req->size_low );
1275 fprintf( stderr, " protect=%d,", req->protect );
1276 fprintf( stderr, " access=%08x,", req->access );
1277 fprintf( stderr, " inherit=%d,", req->inherit );
1278 fprintf( stderr, " file_handle=%p,", req->file_handle );
1279 fprintf( stderr, " name=" );
1280 dump_varargs_unicode_str( cur_size );
1283 static void dump_create_mapping_reply( const struct create_mapping_reply *req )
1285 fprintf( stderr, " handle=%p", req->handle );
1288 static void dump_open_mapping_request( const struct open_mapping_request *req )
1290 fprintf( stderr, " access=%08x,", req->access );
1291 fprintf( stderr, " inherit=%d,", req->inherit );
1292 fprintf( stderr, " name=" );
1293 dump_varargs_unicode_str( cur_size );
1296 static void dump_open_mapping_reply( const struct open_mapping_reply *req )
1298 fprintf( stderr, " handle=%p", req->handle );
1301 static void dump_get_mapping_info_request( const struct get_mapping_info_request *req )
1303 fprintf( stderr, " handle=%p", req->handle );
1306 static void dump_get_mapping_info_reply( const struct get_mapping_info_reply *req )
1308 fprintf( stderr, " size_high=%d,", req->size_high );
1309 fprintf( stderr, " size_low=%d,", req->size_low );
1310 fprintf( stderr, " protect=%d,", req->protect );
1311 fprintf( stderr, " header_size=%d,", req->header_size );
1312 fprintf( stderr, " base=%p,", req->base );
1313 fprintf( stderr, " shared_file=%p,", req->shared_file );
1314 fprintf( stderr, " shared_size=%d,", req->shared_size );
1315 fprintf( stderr, " drive_type=%d", req->drive_type );
1318 static void dump_create_device_request( const struct create_device_request *req )
1320 fprintf( stderr, " access=%08x,", req->access );
1321 fprintf( stderr, " inherit=%d,", req->inherit );
1322 fprintf( stderr, " id=%d", req->id );
1325 static void dump_create_device_reply( const struct create_device_reply *req )
1327 fprintf( stderr, " handle=%p", req->handle );
1330 static void dump_get_device_id_request( const struct get_device_id_request *req )
1332 fprintf( stderr, " handle=%p", req->handle );
1335 static void dump_get_device_id_reply( const struct get_device_id_reply *req )
1337 fprintf( stderr, " id=%d", req->id );
1340 static void dump_create_snapshot_request( const struct create_snapshot_request *req )
1342 fprintf( stderr, " inherit=%d,", req->inherit );
1343 fprintf( stderr, " flags=%d,", req->flags );
1344 fprintf( stderr, " pid=%04x", req->pid );
1347 static void dump_create_snapshot_reply( const struct create_snapshot_reply *req )
1349 fprintf( stderr, " handle=%p", req->handle );
1352 static void dump_next_process_request( const struct next_process_request *req )
1354 fprintf( stderr, " handle=%p,", req->handle );
1355 fprintf( stderr, " reset=%d", req->reset );
1358 static void dump_next_process_reply( const struct next_process_reply *req )
1360 fprintf( stderr, " count=%d,", req->count );
1361 fprintf( stderr, " pid=%04x,", req->pid );
1362 fprintf( stderr, " ppid=%04x,", req->ppid );
1363 fprintf( stderr, " heap=%p,", req->heap );
1364 fprintf( stderr, " module=%p,", req->module );
1365 fprintf( stderr, " threads=%d,", req->threads );
1366 fprintf( stderr, " priority=%d,", req->priority );
1367 fprintf( stderr, " filename=" );
1368 dump_varargs_string( cur_size );
1371 static void dump_next_thread_request( const struct next_thread_request *req )
1373 fprintf( stderr, " handle=%p,", req->handle );
1374 fprintf( stderr, " reset=%d", req->reset );
1377 static void dump_next_thread_reply( const struct next_thread_reply *req )
1379 fprintf( stderr, " count=%d,", req->count );
1380 fprintf( stderr, " pid=%04x,", req->pid );
1381 fprintf( stderr, " tid=%04x,", req->tid );
1382 fprintf( stderr, " base_pri=%d,", req->base_pri );
1383 fprintf( stderr, " delta_pri=%d", req->delta_pri );
1386 static void dump_next_module_request( const struct next_module_request *req )
1388 fprintf( stderr, " handle=%p,", req->handle );
1389 fprintf( stderr, " reset=%d", req->reset );
1392 static void dump_next_module_reply( const struct next_module_reply *req )
1394 fprintf( stderr, " pid=%04x,", req->pid );
1395 fprintf( stderr, " base=%p,", req->base );
1396 fprintf( stderr, " size=%d,", req->size );
1397 fprintf( stderr, " filename=" );
1398 dump_varargs_string( cur_size );
1401 static void dump_wait_debug_event_request( const struct wait_debug_event_request *req )
1403 fprintf( stderr, " get_handle=%d", req->get_handle );
1406 static void dump_wait_debug_event_reply( const struct wait_debug_event_reply *req )
1408 fprintf( stderr, " pid=%04x,", req->pid );
1409 fprintf( stderr, " tid=%04x,", req->tid );
1410 fprintf( stderr, " wait=%p,", req->wait );
1411 fprintf( stderr, " event=" );
1412 dump_varargs_debug_event( cur_size );
1415 static void dump_queue_exception_event_request( const struct queue_exception_event_request *req )
1417 fprintf( stderr, " first=%d,", req->first );
1418 fprintf( stderr, " record=" );
1419 dump_varargs_exc_event( cur_size );
1422 static void dump_queue_exception_event_reply( const struct queue_exception_event_reply *req )
1424 fprintf( stderr, " handle=%p", req->handle );
1427 static void dump_get_exception_status_request( const struct get_exception_status_request *req )
1429 fprintf( stderr, " handle=%p", req->handle );
1432 static void dump_get_exception_status_reply( const struct get_exception_status_reply *req )
1434 fprintf( stderr, " status=%d,", req->status );
1435 fprintf( stderr, " context=" );
1436 dump_varargs_context( cur_size );
1439 static void dump_output_debug_string_request( const struct output_debug_string_request *req )
1441 fprintf( stderr, " string=%p,", req->string );
1442 fprintf( stderr, " unicode=%d,", req->unicode );
1443 fprintf( stderr, " length=%d", req->length );
1446 static void dump_continue_debug_event_request( const struct continue_debug_event_request *req )
1448 fprintf( stderr, " pid=%04x,", req->pid );
1449 fprintf( stderr, " tid=%04x,", req->tid );
1450 fprintf( stderr, " status=%d", req->status );
1453 static void dump_debug_process_request( const struct debug_process_request *req )
1455 fprintf( stderr, " pid=%04x,", req->pid );
1456 fprintf( stderr, " attach=%d", req->attach );
1459 static void dump_debug_break_request( const struct debug_break_request *req )
1461 fprintf( stderr, " handle=%p", req->handle );
1464 static void dump_debug_break_reply( const struct debug_break_reply *req )
1466 fprintf( stderr, " self=%d", req->self );
1469 static void dump_set_debugger_kill_on_exit_request( const struct set_debugger_kill_on_exit_request *req )
1471 fprintf( stderr, " kill_on_exit=%d", req->kill_on_exit );
1474 static void dump_read_process_memory_request( const struct read_process_memory_request *req )
1476 fprintf( stderr, " handle=%p,", req->handle );
1477 fprintf( stderr, " addr=%p", req->addr );
1480 static void dump_read_process_memory_reply( const struct read_process_memory_reply *req )
1482 fprintf( stderr, " data=" );
1483 dump_varargs_bytes( cur_size );
1486 static void dump_write_process_memory_request( const struct write_process_memory_request *req )
1488 fprintf( stderr, " handle=%p,", req->handle );
1489 fprintf( stderr, " addr=%p,", req->addr );
1490 fprintf( stderr, " first_mask=%08x,", req->first_mask );
1491 fprintf( stderr, " last_mask=%08x,", req->last_mask );
1492 fprintf( stderr, " data=" );
1493 dump_varargs_bytes( cur_size );
1496 static void dump_create_key_request( const struct create_key_request *req )
1498 fprintf( stderr, " parent=%p,", req->parent );
1499 fprintf( stderr, " access=%08x,", req->access );
1500 fprintf( stderr, " options=%08x,", req->options );
1501 fprintf( stderr, " modif=%ld,", req->modif );
1502 fprintf( stderr, " namelen=%d,", req->namelen );
1503 fprintf( stderr, " name=" );
1504 dump_varargs_unicode_str( min(cur_size,req->namelen) );
1505 fputc( ',', stderr );
1506 fprintf( stderr, " class=" );
1507 dump_varargs_unicode_str( cur_size );
1510 static void dump_create_key_reply( const struct create_key_reply *req )
1512 fprintf( stderr, " hkey=%p,", req->hkey );
1513 fprintf( stderr, " created=%d", req->created );
1516 static void dump_open_key_request( const struct open_key_request *req )
1518 fprintf( stderr, " parent=%p,", req->parent );
1519 fprintf( stderr, " access=%08x,", req->access );
1520 fprintf( stderr, " name=" );
1521 dump_varargs_unicode_str( cur_size );
1524 static void dump_open_key_reply( const struct open_key_reply *req )
1526 fprintf( stderr, " hkey=%p", req->hkey );
1529 static void dump_delete_key_request( const struct delete_key_request *req )
1531 fprintf( stderr, " hkey=%p", req->hkey );
1534 static void dump_enum_key_request( const struct enum_key_request *req )
1536 fprintf( stderr, " hkey=%p,", req->hkey );
1537 fprintf( stderr, " index=%d,", req->index );
1538 fprintf( stderr, " info_class=%d", req->info_class );
1541 static void dump_enum_key_reply( const struct enum_key_reply *req )
1543 fprintf( stderr, " subkeys=%d,", req->subkeys );
1544 fprintf( stderr, " max_subkey=%d,", req->max_subkey );
1545 fprintf( stderr, " max_class=%d,", req->max_class );
1546 fprintf( stderr, " values=%d,", req->values );
1547 fprintf( stderr, " max_value=%d,", req->max_value );
1548 fprintf( stderr, " max_data=%d,", req->max_data );
1549 fprintf( stderr, " modif=%ld,", req->modif );
1550 fprintf( stderr, " total=%d,", req->total );
1551 fprintf( stderr, " namelen=%d,", req->namelen );
1552 fprintf( stderr, " name=" );
1553 dump_varargs_unicode_str( min(cur_size,req->namelen) );
1554 fputc( ',', stderr );
1555 fprintf( stderr, " class=" );
1556 dump_varargs_unicode_str( cur_size );
1559 static void dump_set_key_value_request( const struct set_key_value_request *req )
1561 fprintf( stderr, " hkey=%p,", req->hkey );
1562 fprintf( stderr, " type=%d,", req->type );
1563 fprintf( stderr, " namelen=%d,", req->namelen );
1564 fprintf( stderr, " name=" );
1565 dump_varargs_unicode_str( min(cur_size,req->namelen) );
1566 fputc( ',', stderr );
1567 fprintf( stderr, " data=" );
1568 dump_varargs_bytes( cur_size );
1571 static void dump_get_key_value_request( const struct get_key_value_request *req )
1573 fprintf( stderr, " hkey=%p,", req->hkey );
1574 fprintf( stderr, " name=" );
1575 dump_varargs_unicode_str( cur_size );
1578 static void dump_get_key_value_reply( const struct get_key_value_reply *req )
1580 fprintf( stderr, " type=%d,", req->type );
1581 fprintf( stderr, " total=%d,", req->total );
1582 fprintf( stderr, " data=" );
1583 dump_varargs_bytes( cur_size );
1586 static void dump_enum_key_value_request( const struct enum_key_value_request *req )
1588 fprintf( stderr, " hkey=%p,", req->hkey );
1589 fprintf( stderr, " index=%d,", req->index );
1590 fprintf( stderr, " info_class=%d", req->info_class );
1593 static void dump_enum_key_value_reply( const struct enum_key_value_reply *req )
1595 fprintf( stderr, " type=%d,", req->type );
1596 fprintf( stderr, " total=%d,", req->total );
1597 fprintf( stderr, " namelen=%d,", req->namelen );
1598 fprintf( stderr, " name=" );
1599 dump_varargs_unicode_str( min(cur_size,req->namelen) );
1600 fputc( ',', stderr );
1601 fprintf( stderr, " data=" );
1602 dump_varargs_bytes( cur_size );
1605 static void dump_delete_key_value_request( const struct delete_key_value_request *req )
1607 fprintf( stderr, " hkey=%p,", req->hkey );
1608 fprintf( stderr, " name=" );
1609 dump_varargs_unicode_str( cur_size );
1612 static void dump_load_registry_request( const struct load_registry_request *req )
1614 fprintf( stderr, " hkey=%p,", req->hkey );
1615 fprintf( stderr, " file=%p,", req->file );
1616 fprintf( stderr, " name=" );
1617 dump_varargs_unicode_str( cur_size );
1620 static void dump_save_registry_request( const struct save_registry_request *req )
1622 fprintf( stderr, " hkey=%p,", req->hkey );
1623 fprintf( stderr, " file=%p", req->file );
1626 static void dump_save_registry_atexit_request( const struct save_registry_atexit_request *req )
1628 fprintf( stderr, " hkey=%p,", req->hkey );
1629 fprintf( stderr, " file=" );
1630 dump_varargs_string( cur_size );
1633 static void dump_set_registry_levels_request( const struct set_registry_levels_request *req )
1635 fprintf( stderr, " current=%d,", req->current );
1636 fprintf( stderr, " saving=%d,", req->saving );
1637 fprintf( stderr, " period=%d", req->period );
1640 static void dump_set_registry_notification_request( const struct set_registry_notification_request *req )
1642 fprintf( stderr, " hkey=%p,", req->hkey );
1643 fprintf( stderr, " event=%p,", req->event );
1644 fprintf( stderr, " subtree=%d,", req->subtree );
1645 fprintf( stderr, " filter=%08x", req->filter );
1648 static void dump_create_timer_request( const struct create_timer_request *req )
1650 fprintf( stderr, " inherit=%d,", req->inherit );
1651 fprintf( stderr, " manual=%d,", req->manual );
1652 fprintf( stderr, " name=" );
1653 dump_varargs_unicode_str( cur_size );
1656 static void dump_create_timer_reply( const struct create_timer_reply *req )
1658 fprintf( stderr, " handle=%p", req->handle );
1661 static void dump_open_timer_request( const struct open_timer_request *req )
1663 fprintf( stderr, " access=%08x,", req->access );
1664 fprintf( stderr, " inherit=%d,", req->inherit );
1665 fprintf( stderr, " name=" );
1666 dump_varargs_unicode_str( cur_size );
1669 static void dump_open_timer_reply( const struct open_timer_reply *req )
1671 fprintf( stderr, " handle=%p", req->handle );
1674 static void dump_set_timer_request( const struct set_timer_request *req )
1676 fprintf( stderr, " handle=%p,", req->handle );
1677 fprintf( stderr, " expire=" );
1678 dump_abs_time( &req->expire );
1679 fprintf( stderr, "," );
1680 fprintf( stderr, " period=%d,", req->period );
1681 fprintf( stderr, " callback=%p,", req->callback );
1682 fprintf( stderr, " arg=%p", req->arg );
1685 static void dump_cancel_timer_request( const struct cancel_timer_request *req )
1687 fprintf( stderr, " handle=%p", req->handle );
1690 static void dump_get_thread_context_request( const struct get_thread_context_request *req )
1692 fprintf( stderr, " handle=%p,", req->handle );
1693 fprintf( stderr, " flags=%08x", req->flags );
1696 static void dump_get_thread_context_reply( const struct get_thread_context_reply *req )
1698 fprintf( stderr, " context=" );
1699 dump_varargs_context( cur_size );
1702 static void dump_set_thread_context_request( const struct set_thread_context_request *req )
1704 fprintf( stderr, " handle=%p,", req->handle );
1705 fprintf( stderr, " flags=%08x,", req->flags );
1706 fprintf( stderr, " context=" );
1707 dump_varargs_context( cur_size );
1710 static void dump_get_selector_entry_request( const struct get_selector_entry_request *req )
1712 fprintf( stderr, " handle=%p,", req->handle );
1713 fprintf( stderr, " entry=%d", req->entry );
1716 static void dump_get_selector_entry_reply( const struct get_selector_entry_reply *req )
1718 fprintf( stderr, " base=%08x,", req->base );
1719 fprintf( stderr, " limit=%08x,", req->limit );
1720 fprintf( stderr, " flags=%02x", req->flags );
1723 static void dump_add_atom_request( const struct add_atom_request *req )
1725 fprintf( stderr, " local=%d,", req->local );
1726 fprintf( stderr, " name=" );
1727 dump_varargs_unicode_str( cur_size );
1730 static void dump_add_atom_reply( const struct add_atom_reply *req )
1732 fprintf( stderr, " atom=%04x", req->atom );
1735 static void dump_delete_atom_request( const struct delete_atom_request *req )
1737 fprintf( stderr, " atom=%04x,", req->atom );
1738 fprintf( stderr, " local=%d", req->local );
1741 static void dump_find_atom_request( const struct find_atom_request *req )
1743 fprintf( stderr, " local=%d,", req->local );
1744 fprintf( stderr, " name=" );
1745 dump_varargs_unicode_str( cur_size );
1748 static void dump_find_atom_reply( const struct find_atom_reply *req )
1750 fprintf( stderr, " atom=%04x", req->atom );
1753 static void dump_get_atom_name_request( const struct get_atom_name_request *req )
1755 fprintf( stderr, " atom=%04x,", req->atom );
1756 fprintf( stderr, " local=%d", req->local );
1759 static void dump_get_atom_name_reply( const struct get_atom_name_reply *req )
1761 fprintf( stderr, " count=%d,", req->count );
1762 fprintf( stderr, " name=" );
1763 dump_varargs_unicode_str( cur_size );
1766 static void dump_init_atom_table_request( const struct init_atom_table_request *req )
1768 fprintf( stderr, " entries=%d", req->entries );
1771 static void dump_get_msg_queue_request( const struct get_msg_queue_request *req )
1775 static void dump_get_msg_queue_reply( const struct get_msg_queue_reply *req )
1777 fprintf( stderr, " handle=%p", req->handle );
1780 static void dump_set_queue_mask_request( const struct set_queue_mask_request *req )
1782 fprintf( stderr, " wake_mask=%08x,", req->wake_mask );
1783 fprintf( stderr, " changed_mask=%08x,", req->changed_mask );
1784 fprintf( stderr, " skip_wait=%d", req->skip_wait );
1787 static void dump_set_queue_mask_reply( const struct set_queue_mask_reply *req )
1789 fprintf( stderr, " wake_bits=%08x,", req->wake_bits );
1790 fprintf( stderr, " changed_bits=%08x", req->changed_bits );
1793 static void dump_get_queue_status_request( const struct get_queue_status_request *req )
1795 fprintf( stderr, " clear=%d", req->clear );
1798 static void dump_get_queue_status_reply( const struct get_queue_status_reply *req )
1800 fprintf( stderr, " wake_bits=%08x,", req->wake_bits );
1801 fprintf( stderr, " changed_bits=%08x", req->changed_bits );
1804 static void dump_wait_input_idle_request( const struct wait_input_idle_request *req )
1806 fprintf( stderr, " handle=%p,", req->handle );
1807 fprintf( stderr, " timeout=%d", req->timeout );
1810 static void dump_wait_input_idle_reply( const struct wait_input_idle_reply *req )
1812 fprintf( stderr, " event=%p", req->event );
1815 static void dump_send_message_request( const struct send_message_request *req )
1817 fprintf( stderr, " id=%04x,", req->id );
1818 fprintf( stderr, " type=%d,", req->type );
1819 fprintf( stderr, " win=%p,", req->win );
1820 fprintf( stderr, " msg=%08x,", req->msg );
1821 fprintf( stderr, " wparam=%08x,", req->wparam );
1822 fprintf( stderr, " lparam=%08x,", req->lparam );
1823 fprintf( stderr, " x=%d,", req->x );
1824 fprintf( stderr, " y=%d,", req->y );
1825 fprintf( stderr, " time=%08x,", req->time );
1826 fprintf( stderr, " info=%08x,", req->info );
1827 fprintf( stderr, " timeout=%d,", req->timeout );
1828 fprintf( stderr, " data=" );
1829 dump_varargs_bytes( cur_size );
1832 static void dump_get_message_request( const struct get_message_request *req )
1834 fprintf( stderr, " flags=%d,", req->flags );
1835 fprintf( stderr, " get_win=%p,", req->get_win );
1836 fprintf( stderr, " get_first=%08x,", req->get_first );
1837 fprintf( stderr, " get_last=%08x", req->get_last );
1840 static void dump_get_message_reply( const struct get_message_reply *req )
1842 fprintf( stderr, " type=%d,", req->type );
1843 fprintf( stderr, " win=%p,", req->win );
1844 fprintf( stderr, " msg=%08x,", req->msg );
1845 fprintf( stderr, " wparam=%08x,", req->wparam );
1846 fprintf( stderr, " lparam=%08x,", req->lparam );
1847 fprintf( stderr, " x=%d,", req->x );
1848 fprintf( stderr, " y=%d,", req->y );
1849 fprintf( stderr, " time=%08x,", req->time );
1850 fprintf( stderr, " info=%08x,", req->info );
1851 fprintf( stderr, " total=%d,", req->total );
1852 fprintf( stderr, " data=" );
1853 dump_varargs_bytes( cur_size );
1856 static void dump_reply_message_request( const struct reply_message_request *req )
1858 fprintf( stderr, " type=%d,", req->type );
1859 fprintf( stderr, " result=%08x,", req->result );
1860 fprintf( stderr, " remove=%d,", req->remove );
1861 fprintf( stderr, " data=" );
1862 dump_varargs_bytes( cur_size );
1865 static void dump_get_message_reply_request( const struct get_message_reply_request *req )
1867 fprintf( stderr, " cancel=%d", req->cancel );
1870 static void dump_get_message_reply_reply( const struct get_message_reply_reply *req )
1872 fprintf( stderr, " result=%08x,", req->result );
1873 fprintf( stderr, " data=" );
1874 dump_varargs_bytes( cur_size );
1877 static void dump_set_win_timer_request( const struct set_win_timer_request *req )
1879 fprintf( stderr, " win=%p,", req->win );
1880 fprintf( stderr, " msg=%08x,", req->msg );
1881 fprintf( stderr, " id=%08x,", req->id );
1882 fprintf( stderr, " rate=%08x,", req->rate );
1883 fprintf( stderr, " lparam=%08x", req->lparam );
1886 static void dump_kill_win_timer_request( const struct kill_win_timer_request *req )
1888 fprintf( stderr, " win=%p,", req->win );
1889 fprintf( stderr, " msg=%08x,", req->msg );
1890 fprintf( stderr, " id=%08x", req->id );
1893 static void dump_create_serial_request( const struct create_serial_request *req )
1895 fprintf( stderr, " access=%08x,", req->access );
1896 fprintf( stderr, " inherit=%d,", req->inherit );
1897 fprintf( stderr, " attributes=%08x,", req->attributes );
1898 fprintf( stderr, " sharing=%08x,", req->sharing );
1899 fprintf( stderr, " name=" );
1900 dump_varargs_string( cur_size );
1903 static void dump_create_serial_reply( const struct create_serial_reply *req )
1905 fprintf( stderr, " handle=%p", req->handle );
1908 static void dump_get_serial_info_request( const struct get_serial_info_request *req )
1910 fprintf( stderr, " handle=%p", req->handle );
1913 static void dump_get_serial_info_reply( const struct get_serial_info_reply *req )
1915 fprintf( stderr, " readinterval=%08x,", req->readinterval );
1916 fprintf( stderr, " readconst=%08x,", req->readconst );
1917 fprintf( stderr, " readmult=%08x,", req->readmult );
1918 fprintf( stderr, " writeconst=%08x,", req->writeconst );
1919 fprintf( stderr, " writemult=%08x,", req->writemult );
1920 fprintf( stderr, " eventmask=%08x,", req->eventmask );
1921 fprintf( stderr, " commerror=%08x", req->commerror );
1924 static void dump_set_serial_info_request( const struct set_serial_info_request *req )
1926 fprintf( stderr, " handle=%p,", req->handle );
1927 fprintf( stderr, " flags=%d,", req->flags );
1928 fprintf( stderr, " readinterval=%08x,", req->readinterval );
1929 fprintf( stderr, " readconst=%08x,", req->readconst );
1930 fprintf( stderr, " readmult=%08x,", req->readmult );
1931 fprintf( stderr, " writeconst=%08x,", req->writeconst );
1932 fprintf( stderr, " writemult=%08x,", req->writemult );
1933 fprintf( stderr, " eventmask=%08x,", req->eventmask );
1934 fprintf( stderr, " commerror=%08x", req->commerror );
1937 static void dump_register_async_request( const struct register_async_request *req )
1939 fprintf( stderr, " handle=%p,", req->handle );
1940 fprintf( stderr, " type=%d,", req->type );
1941 fprintf( stderr, " overlapped=%p,", req->overlapped );
1942 fprintf( stderr, " count=%d,", req->count );
1943 fprintf( stderr, " status=%08x", req->status );
1946 static void dump_create_named_pipe_request( const struct create_named_pipe_request *req )
1948 fprintf( stderr, " openmode=%08x,", req->openmode );
1949 fprintf( stderr, " pipemode=%08x,", req->pipemode );
1950 fprintf( stderr, " maxinstances=%08x,", req->maxinstances );
1951 fprintf( stderr, " outsize=%08x,", req->outsize );
1952 fprintf( stderr, " insize=%08x,", req->insize );
1953 fprintf( stderr, " timeout=%08x,", req->timeout );
1954 fprintf( stderr, " name=" );
1955 dump_varargs_unicode_str( cur_size );
1958 static void dump_create_named_pipe_reply( const struct create_named_pipe_reply *req )
1960 fprintf( stderr, " handle=%p", req->handle );
1963 static void dump_open_named_pipe_request( const struct open_named_pipe_request *req )
1965 fprintf( stderr, " access=%08x,", req->access );
1966 fprintf( stderr, " name=" );
1967 dump_varargs_unicode_str( cur_size );
1970 static void dump_open_named_pipe_reply( const struct open_named_pipe_reply *req )
1972 fprintf( stderr, " handle=%p", req->handle );
1975 static void dump_connect_named_pipe_request( const struct connect_named_pipe_request *req )
1977 fprintf( stderr, " handle=%p,", req->handle );
1978 fprintf( stderr, " overlapped=%p,", req->overlapped );
1979 fprintf( stderr, " func=%p", req->func );
1982 static void dump_wait_named_pipe_request( const struct wait_named_pipe_request *req )
1984 fprintf( stderr, " timeout=%08x,", req->timeout );
1985 fprintf( stderr, " overlapped=%p,", req->overlapped );
1986 fprintf( stderr, " func=%p,", req->func );
1987 fprintf( stderr, " name=" );
1988 dump_varargs_unicode_str( cur_size );
1991 static void dump_disconnect_named_pipe_request( const struct disconnect_named_pipe_request *req )
1993 fprintf( stderr, " handle=%p", req->handle );
1996 static void dump_get_named_pipe_info_request( const struct get_named_pipe_info_request *req )
1998 fprintf( stderr, " handle=%p", req->handle );
2001 static void dump_get_named_pipe_info_reply( const struct get_named_pipe_info_reply *req )
2003 fprintf( stderr, " flags=%08x,", req->flags );
2004 fprintf( stderr, " maxinstances=%08x,", req->maxinstances );
2005 fprintf( stderr, " outsize=%08x,", req->outsize );
2006 fprintf( stderr, " insize=%08x", req->insize );
2009 static void dump_create_smb_request( const struct create_smb_request *req )
2011 fprintf( stderr, " fd=%d,", req->fd );
2012 fprintf( stderr, " tree_id=%08x,", req->tree_id );
2013 fprintf( stderr, " user_id=%08x,", req->user_id );
2014 fprintf( stderr, " file_id=%08x,", req->file_id );
2015 fprintf( stderr, " dialect=%08x", req->dialect );
2018 static void dump_create_smb_reply( const struct create_smb_reply *req )
2020 fprintf( stderr, " handle=%p", req->handle );
2023 static void dump_get_smb_info_request( const struct get_smb_info_request *req )
2025 fprintf( stderr, " handle=%p,", req->handle );
2026 fprintf( stderr, " flags=%08x,", req->flags );
2027 fprintf( stderr, " offset=%08x", req->offset );
2030 static void dump_get_smb_info_reply( const struct get_smb_info_reply *req )
2032 fprintf( stderr, " tree_id=%08x,", req->tree_id );
2033 fprintf( stderr, " user_id=%08x,", req->user_id );
2034 fprintf( stderr, " dialect=%08x,", req->dialect );
2035 fprintf( stderr, " file_id=%08x,", req->file_id );
2036 fprintf( stderr, " offset=%08x", req->offset );
2039 static void dump_create_window_request( const struct create_window_request *req )
2041 fprintf( stderr, " parent=%p,", req->parent );
2042 fprintf( stderr, " owner=%p,", req->owner );
2043 fprintf( stderr, " atom=%04x", req->atom );
2046 static void dump_create_window_reply( const struct create_window_reply *req )
2048 fprintf( stderr, " handle=%p", req->handle );
2051 static void dump_link_window_request( const struct link_window_request *req )
2053 fprintf( stderr, " handle=%p,", req->handle );
2054 fprintf( stderr, " parent=%p,", req->parent );
2055 fprintf( stderr, " previous=%p", req->previous );
2058 static void dump_link_window_reply( const struct link_window_reply *req )
2060 fprintf( stderr, " full_parent=%p", req->full_parent );
2063 static void dump_destroy_window_request( const struct destroy_window_request *req )
2065 fprintf( stderr, " handle=%p", req->handle );
2068 static void dump_set_window_owner_request( const struct set_window_owner_request *req )
2070 fprintf( stderr, " handle=%p,", req->handle );
2071 fprintf( stderr, " owner=%p", req->owner );
2074 static void dump_set_window_owner_reply( const struct set_window_owner_reply *req )
2076 fprintf( stderr, " full_owner=%p,", req->full_owner );
2077 fprintf( stderr, " prev_owner=%p", req->prev_owner );
2080 static void dump_get_window_info_request( const struct get_window_info_request *req )
2082 fprintf( stderr, " handle=%p", req->handle );
2085 static void dump_get_window_info_reply( const struct get_window_info_reply *req )
2087 fprintf( stderr, " full_handle=%p,", req->full_handle );
2088 fprintf( stderr, " last_active=%p,", req->last_active );
2089 fprintf( stderr, " pid=%04x,", req->pid );
2090 fprintf( stderr, " tid=%04x,", req->tid );
2091 fprintf( stderr, " atom=%04x", req->atom );
2094 static void dump_set_window_info_request( const struct set_window_info_request *req )
2096 fprintf( stderr, " handle=%p,", req->handle );
2097 fprintf( stderr, " flags=%08x,", req->flags );
2098 fprintf( stderr, " style=%08x,", req->style );
2099 fprintf( stderr, " ex_style=%08x,", req->ex_style );
2100 fprintf( stderr, " id=%08x,", req->id );
2101 fprintf( stderr, " instance=%p,", req->instance );
2102 fprintf( stderr, " user_data=%p", req->user_data );
2105 static void dump_set_window_info_reply( const struct set_window_info_reply *req )
2107 fprintf( stderr, " old_style=%08x,", req->old_style );
2108 fprintf( stderr, " old_ex_style=%08x,", req->old_ex_style );
2109 fprintf( stderr, " old_id=%08x,", req->old_id );
2110 fprintf( stderr, " old_instance=%p,", req->old_instance );
2111 fprintf( stderr, " old_user_data=%p", req->old_user_data );
2114 static void dump_get_window_parents_request( const struct get_window_parents_request *req )
2116 fprintf( stderr, " handle=%p", req->handle );
2119 static void dump_get_window_parents_reply( const struct get_window_parents_reply *req )
2121 fprintf( stderr, " count=%d,", req->count );
2122 fprintf( stderr, " parents=" );
2123 dump_varargs_user_handles( cur_size );
2126 static void dump_get_window_children_request( const struct get_window_children_request *req )
2128 fprintf( stderr, " parent=%p,", req->parent );
2129 fprintf( stderr, " atom=%04x,", req->atom );
2130 fprintf( stderr, " tid=%04x", req->tid );
2133 static void dump_get_window_children_reply( const struct get_window_children_reply *req )
2135 fprintf( stderr, " count=%d,", req->count );
2136 fprintf( stderr, " children=" );
2137 dump_varargs_user_handles( cur_size );
2140 static void dump_get_window_tree_request( const struct get_window_tree_request *req )
2142 fprintf( stderr, " handle=%p", req->handle );
2145 static void dump_get_window_tree_reply( const struct get_window_tree_reply *req )
2147 fprintf( stderr, " parent=%p,", req->parent );
2148 fprintf( stderr, " owner=%p,", req->owner );
2149 fprintf( stderr, " next_sibling=%p,", req->next_sibling );
2150 fprintf( stderr, " prev_sibling=%p,", req->prev_sibling );
2151 fprintf( stderr, " first_sibling=%p,", req->first_sibling );
2152 fprintf( stderr, " last_sibling=%p,", req->last_sibling );
2153 fprintf( stderr, " first_child=%p,", req->first_child );
2154 fprintf( stderr, " last_child=%p", req->last_child );
2157 static void dump_set_window_rectangles_request( const struct set_window_rectangles_request *req )
2159 fprintf( stderr, " handle=%p,", req->handle );
2160 fprintf( stderr, " window=" );
2161 dump_rectangle( &req->window );
2162 fprintf( stderr, "," );
2163 fprintf( stderr, " client=" );
2164 dump_rectangle( &req->client );
2167 static void dump_get_window_rectangles_request( const struct get_window_rectangles_request *req )
2169 fprintf( stderr, " handle=%p", req->handle );
2172 static void dump_get_window_rectangles_reply( const struct get_window_rectangles_reply *req )
2174 fprintf( stderr, " window=" );
2175 dump_rectangle( &req->window );
2176 fprintf( stderr, "," );
2177 fprintf( stderr, " client=" );
2178 dump_rectangle( &req->client );
2181 static void dump_get_window_text_request( const struct get_window_text_request *req )
2183 fprintf( stderr, " handle=%p", req->handle );
2186 static void dump_get_window_text_reply( const struct get_window_text_reply *req )
2188 fprintf( stderr, " text=" );
2189 dump_varargs_unicode_str( cur_size );
2192 static void dump_set_window_text_request( const struct set_window_text_request *req )
2194 fprintf( stderr, " handle=%p,", req->handle );
2195 fprintf( stderr, " text=" );
2196 dump_varargs_unicode_str( cur_size );
2199 static void dump_inc_window_paint_count_request( const struct inc_window_paint_count_request *req )
2201 fprintf( stderr, " handle=%p,", req->handle );
2202 fprintf( stderr, " incr=%d", req->incr );
2205 static void dump_get_windows_offset_request( const struct get_windows_offset_request *req )
2207 fprintf( stderr, " from=%p,", req->from );
2208 fprintf( stderr, " to=%p", req->to );
2211 static void dump_get_windows_offset_reply( const struct get_windows_offset_reply *req )
2213 fprintf( stderr, " x=%d,", req->x );
2214 fprintf( stderr, " y=%d", req->y );
2217 static void dump_set_window_property_request( const struct set_window_property_request *req )
2219 fprintf( stderr, " window=%p,", req->window );
2220 fprintf( stderr, " atom=%04x,", req->atom );
2221 fprintf( stderr, " string=%d,", req->string );
2222 fprintf( stderr, " handle=%p", req->handle );
2225 static void dump_remove_window_property_request( const struct remove_window_property_request *req )
2227 fprintf( stderr, " window=%p,", req->window );
2228 fprintf( stderr, " atom=%04x", req->atom );
2231 static void dump_remove_window_property_reply( const struct remove_window_property_reply *req )
2233 fprintf( stderr, " handle=%p", req->handle );
2236 static void dump_get_window_property_request( const struct get_window_property_request *req )
2238 fprintf( stderr, " window=%p,", req->window );
2239 fprintf( stderr, " atom=%04x", req->atom );
2242 static void dump_get_window_property_reply( const struct get_window_property_reply *req )
2244 fprintf( stderr, " handle=%p", req->handle );
2247 static void dump_get_window_properties_request( const struct get_window_properties_request *req )
2249 fprintf( stderr, " window=%p", req->window );
2252 static void dump_get_window_properties_reply( const struct get_window_properties_reply *req )
2254 fprintf( stderr, " total=%d,", req->total );
2255 fprintf( stderr, " props=" );
2256 dump_varargs_properties( cur_size );
2259 static void dump_attach_thread_input_request( const struct attach_thread_input_request *req )
2261 fprintf( stderr, " tid_from=%04x,", req->tid_from );
2262 fprintf( stderr, " tid_to=%04x,", req->tid_to );
2263 fprintf( stderr, " attach=%d", req->attach );
2266 static void dump_get_thread_input_request( const struct get_thread_input_request *req )
2268 fprintf( stderr, " tid=%04x", req->tid );
2271 static void dump_get_thread_input_reply( const struct get_thread_input_reply *req )
2273 fprintf( stderr, " focus=%p,", req->focus );
2274 fprintf( stderr, " capture=%p,", req->capture );
2275 fprintf( stderr, " active=%p,", req->active );
2276 fprintf( stderr, " foreground=%p,", req->foreground );
2277 fprintf( stderr, " menu_owner=%p,", req->menu_owner );
2278 fprintf( stderr, " move_size=%p,", req->move_size );
2279 fprintf( stderr, " caret=%p,", req->caret );
2280 fprintf( stderr, " rect=" );
2281 dump_rectangle( &req->rect );
2284 static void dump_get_key_state_request( const struct get_key_state_request *req )
2286 fprintf( stderr, " tid=%04x,", req->tid );
2287 fprintf( stderr, " key=%d", req->key );
2290 static void dump_get_key_state_reply( const struct get_key_state_reply *req )
2292 fprintf( stderr, " state=%02x,", req->state );
2293 fprintf( stderr, " keystate=" );
2294 dump_varargs_bytes( cur_size );
2297 static void dump_set_key_state_request( const struct set_key_state_request *req )
2299 fprintf( stderr, " tid=%04x,", req->tid );
2300 fprintf( stderr, " keystate=" );
2301 dump_varargs_bytes( cur_size );
2304 static void dump_set_foreground_window_request( const struct set_foreground_window_request *req )
2306 fprintf( stderr, " handle=%p", req->handle );
2309 static void dump_set_foreground_window_reply( const struct set_foreground_window_reply *req )
2311 fprintf( stderr, " previous=%p,", req->previous );
2312 fprintf( stderr, " send_msg_old=%d,", req->send_msg_old );
2313 fprintf( stderr, " send_msg_new=%d", req->send_msg_new );
2316 static void dump_set_focus_window_request( const struct set_focus_window_request *req )
2318 fprintf( stderr, " handle=%p", req->handle );
2321 static void dump_set_focus_window_reply( const struct set_focus_window_reply *req )
2323 fprintf( stderr, " previous=%p", req->previous );
2326 static void dump_set_active_window_request( const struct set_active_window_request *req )
2328 fprintf( stderr, " handle=%p", req->handle );
2331 static void dump_set_active_window_reply( const struct set_active_window_reply *req )
2333 fprintf( stderr, " previous=%p", req->previous );
2336 static void dump_set_capture_window_request( const struct set_capture_window_request *req )
2338 fprintf( stderr, " handle=%p,", req->handle );
2339 fprintf( stderr, " flags=%08x", req->flags );
2342 static void dump_set_capture_window_reply( const struct set_capture_window_reply *req )
2344 fprintf( stderr, " previous=%p,", req->previous );
2345 fprintf( stderr, " full_handle=%p", req->full_handle );
2348 static void dump_set_caret_window_request( const struct set_caret_window_request *req )
2350 fprintf( stderr, " handle=%p,", req->handle );
2351 fprintf( stderr, " width=%d,", req->width );
2352 fprintf( stderr, " height=%d", req->height );
2355 static void dump_set_caret_window_reply( const struct set_caret_window_reply *req )
2357 fprintf( stderr, " previous=%p,", req->previous );
2358 fprintf( stderr, " old_rect=" );
2359 dump_rectangle( &req->old_rect );
2360 fprintf( stderr, "," );
2361 fprintf( stderr, " old_hide=%d,", req->old_hide );
2362 fprintf( stderr, " old_state=%d", req->old_state );
2365 static void dump_set_caret_info_request( const struct set_caret_info_request *req )
2367 fprintf( stderr, " flags=%08x,", req->flags );
2368 fprintf( stderr, " handle=%p,", req->handle );
2369 fprintf( stderr, " x=%d,", req->x );
2370 fprintf( stderr, " y=%d,", req->y );
2371 fprintf( stderr, " hide=%d,", req->hide );
2372 fprintf( stderr, " state=%d", req->state );
2375 static void dump_set_caret_info_reply( const struct set_caret_info_reply *req )
2377 fprintf( stderr, " full_handle=%p,", req->full_handle );
2378 fprintf( stderr, " old_rect=" );
2379 dump_rectangle( &req->old_rect );
2380 fprintf( stderr, "," );
2381 fprintf( stderr, " old_hide=%d,", req->old_hide );
2382 fprintf( stderr, " old_state=%d", req->old_state );
2385 static void dump_set_hook_request( const struct set_hook_request *req )
2387 fprintf( stderr, " id=%d,", req->id );
2388 fprintf( stderr, " tid=%04x,", req->tid );
2389 fprintf( stderr, " proc=%p,", req->proc );
2390 fprintf( stderr, " unicode=%d,", req->unicode );
2391 fprintf( stderr, " module=" );
2392 dump_varargs_unicode_str( cur_size );
2395 static void dump_set_hook_reply( const struct set_hook_reply *req )
2397 fprintf( stderr, " handle=%p", req->handle );
2400 static void dump_remove_hook_request( const struct remove_hook_request *req )
2402 fprintf( stderr, " handle=%p,", req->handle );
2403 fprintf( stderr, " id=%d,", req->id );
2404 fprintf( stderr, " proc=%p", req->proc );
2407 static void dump_start_hook_chain_request( const struct start_hook_chain_request *req )
2409 fprintf( stderr, " id=%d", req->id );
2412 static void dump_start_hook_chain_reply( const struct start_hook_chain_reply *req )
2414 fprintf( stderr, " handle=%p,", req->handle );
2415 fprintf( stderr, " proc=%p,", req->proc );
2416 fprintf( stderr, " unicode=%d,", req->unicode );
2417 fprintf( stderr, " module=" );
2418 dump_varargs_unicode_str( cur_size );
2421 static void dump_finish_hook_chain_request( const struct finish_hook_chain_request *req )
2423 fprintf( stderr, " id=%d", req->id );
2426 static void dump_get_next_hook_request( const struct get_next_hook_request *req )
2428 fprintf( stderr, " handle=%p", req->handle );
2431 static void dump_get_next_hook_reply( const struct get_next_hook_reply *req )
2433 fprintf( stderr, " next=%p,", req->next );
2434 fprintf( stderr, " id=%d,", req->id );
2435 fprintf( stderr, " proc=%p,", req->proc );
2436 fprintf( stderr, " prev_unicode=%d,", req->prev_unicode );
2437 fprintf( stderr, " next_unicode=%d,", req->next_unicode );
2438 fprintf( stderr, " module=" );
2439 dump_varargs_unicode_str( cur_size );
2442 static const dump_func req_dumpers[REQ_NB_REQUESTS] = {
2443 (dump_func)dump_new_process_request,
2444 (dump_func)dump_get_new_process_info_request,
2445 (dump_func)dump_new_thread_request,
2446 (dump_func)dump_boot_done_request,
2447 (dump_func)dump_init_process_request,
2448 (dump_func)dump_get_startup_info_request,
2449 (dump_func)dump_init_process_done_request,
2450 (dump_func)dump_init_thread_request,
2451 (dump_func)dump_terminate_process_request,
2452 (dump_func)dump_terminate_thread_request,
2453 (dump_func)dump_get_process_info_request,
2454 (dump_func)dump_set_process_info_request,
2455 (dump_func)dump_get_thread_info_request,
2456 (dump_func)dump_set_thread_info_request,
2457 (dump_func)dump_get_dll_info_request,
2458 (dump_func)dump_suspend_thread_request,
2459 (dump_func)dump_resume_thread_request,
2460 (dump_func)dump_load_dll_request,
2461 (dump_func)dump_unload_dll_request,
2462 (dump_func)dump_queue_apc_request,
2463 (dump_func)dump_get_apc_request,
2464 (dump_func)dump_close_handle_request,
2465 (dump_func)dump_set_handle_info_request,
2466 (dump_func)dump_dup_handle_request,
2467 (dump_func)dump_open_process_request,
2468 (dump_func)dump_open_thread_request,
2469 (dump_func)dump_select_request,
2470 (dump_func)dump_create_event_request,
2471 (dump_func)dump_event_op_request,
2472 (dump_func)dump_open_event_request,
2473 (dump_func)dump_create_mutex_request,
2474 (dump_func)dump_release_mutex_request,
2475 (dump_func)dump_open_mutex_request,
2476 (dump_func)dump_create_semaphore_request,
2477 (dump_func)dump_release_semaphore_request,
2478 (dump_func)dump_open_semaphore_request,
2479 (dump_func)dump_create_file_request,
2480 (dump_func)dump_alloc_file_handle_request,
2481 (dump_func)dump_get_handle_fd_request,
2482 (dump_func)dump_set_file_pointer_request,
2483 (dump_func)dump_truncate_file_request,
2484 (dump_func)dump_set_file_time_request,
2485 (dump_func)dump_flush_file_request,
2486 (dump_func)dump_get_file_info_request,
2487 (dump_func)dump_lock_file_request,
2488 (dump_func)dump_unlock_file_request,
2489 (dump_func)dump_create_pipe_request,
2490 (dump_func)dump_create_socket_request,
2491 (dump_func)dump_accept_socket_request,
2492 (dump_func)dump_set_socket_event_request,
2493 (dump_func)dump_get_socket_event_request,
2494 (dump_func)dump_enable_socket_event_request,
2495 (dump_func)dump_set_socket_deferred_request,
2496 (dump_func)dump_alloc_console_request,
2497 (dump_func)dump_free_console_request,
2498 (dump_func)dump_get_console_renderer_events_request,
2499 (dump_func)dump_open_console_request,
2500 (dump_func)dump_get_console_mode_request,
2501 (dump_func)dump_set_console_mode_request,
2502 (dump_func)dump_set_console_input_info_request,
2503 (dump_func)dump_get_console_input_info_request,
2504 (dump_func)dump_append_console_input_history_request,
2505 (dump_func)dump_get_console_input_history_request,
2506 (dump_func)dump_create_console_output_request,
2507 (dump_func)dump_set_console_output_info_request,
2508 (dump_func)dump_get_console_output_info_request,
2509 (dump_func)dump_write_console_input_request,
2510 (dump_func)dump_read_console_input_request,
2511 (dump_func)dump_write_console_output_request,
2512 (dump_func)dump_fill_console_output_request,
2513 (dump_func)dump_read_console_output_request,
2514 (dump_func)dump_move_console_output_request,
2515 (dump_func)dump_send_console_signal_request,
2516 (dump_func)dump_create_change_notification_request,
2517 (dump_func)dump_next_change_notification_request,
2518 (dump_func)dump_create_mapping_request,
2519 (dump_func)dump_open_mapping_request,
2520 (dump_func)dump_get_mapping_info_request,
2521 (dump_func)dump_create_device_request,
2522 (dump_func)dump_get_device_id_request,
2523 (dump_func)dump_create_snapshot_request,
2524 (dump_func)dump_next_process_request,
2525 (dump_func)dump_next_thread_request,
2526 (dump_func)dump_next_module_request,
2527 (dump_func)dump_wait_debug_event_request,
2528 (dump_func)dump_queue_exception_event_request,
2529 (dump_func)dump_get_exception_status_request,
2530 (dump_func)dump_output_debug_string_request,
2531 (dump_func)dump_continue_debug_event_request,
2532 (dump_func)dump_debug_process_request,
2533 (dump_func)dump_debug_break_request,
2534 (dump_func)dump_set_debugger_kill_on_exit_request,
2535 (dump_func)dump_read_process_memory_request,
2536 (dump_func)dump_write_process_memory_request,
2537 (dump_func)dump_create_key_request,
2538 (dump_func)dump_open_key_request,
2539 (dump_func)dump_delete_key_request,
2540 (dump_func)dump_enum_key_request,
2541 (dump_func)dump_set_key_value_request,
2542 (dump_func)dump_get_key_value_request,
2543 (dump_func)dump_enum_key_value_request,
2544 (dump_func)dump_delete_key_value_request,
2545 (dump_func)dump_load_registry_request,
2546 (dump_func)dump_save_registry_request,
2547 (dump_func)dump_save_registry_atexit_request,
2548 (dump_func)dump_set_registry_levels_request,
2549 (dump_func)dump_set_registry_notification_request,
2550 (dump_func)dump_create_timer_request,
2551 (dump_func)dump_open_timer_request,
2552 (dump_func)dump_set_timer_request,
2553 (dump_func)dump_cancel_timer_request,
2554 (dump_func)dump_get_thread_context_request,
2555 (dump_func)dump_set_thread_context_request,
2556 (dump_func)dump_get_selector_entry_request,
2557 (dump_func)dump_add_atom_request,
2558 (dump_func)dump_delete_atom_request,
2559 (dump_func)dump_find_atom_request,
2560 (dump_func)dump_get_atom_name_request,
2561 (dump_func)dump_init_atom_table_request,
2562 (dump_func)dump_get_msg_queue_request,
2563 (dump_func)dump_set_queue_mask_request,
2564 (dump_func)dump_get_queue_status_request,
2565 (dump_func)dump_wait_input_idle_request,
2566 (dump_func)dump_send_message_request,
2567 (dump_func)dump_get_message_request,
2568 (dump_func)dump_reply_message_request,
2569 (dump_func)dump_get_message_reply_request,
2570 (dump_func)dump_set_win_timer_request,
2571 (dump_func)dump_kill_win_timer_request,
2572 (dump_func)dump_create_serial_request,
2573 (dump_func)dump_get_serial_info_request,
2574 (dump_func)dump_set_serial_info_request,
2575 (dump_func)dump_register_async_request,
2576 (dump_func)dump_create_named_pipe_request,
2577 (dump_func)dump_open_named_pipe_request,
2578 (dump_func)dump_connect_named_pipe_request,
2579 (dump_func)dump_wait_named_pipe_request,
2580 (dump_func)dump_disconnect_named_pipe_request,
2581 (dump_func)dump_get_named_pipe_info_request,
2582 (dump_func)dump_create_smb_request,
2583 (dump_func)dump_get_smb_info_request,
2584 (dump_func)dump_create_window_request,
2585 (dump_func)dump_link_window_request,
2586 (dump_func)dump_destroy_window_request,
2587 (dump_func)dump_set_window_owner_request,
2588 (dump_func)dump_get_window_info_request,
2589 (dump_func)dump_set_window_info_request,
2590 (dump_func)dump_get_window_parents_request,
2591 (dump_func)dump_get_window_children_request,
2592 (dump_func)dump_get_window_tree_request,
2593 (dump_func)dump_set_window_rectangles_request,
2594 (dump_func)dump_get_window_rectangles_request,
2595 (dump_func)dump_get_window_text_request,
2596 (dump_func)dump_set_window_text_request,
2597 (dump_func)dump_inc_window_paint_count_request,
2598 (dump_func)dump_get_windows_offset_request,
2599 (dump_func)dump_set_window_property_request,
2600 (dump_func)dump_remove_window_property_request,
2601 (dump_func)dump_get_window_property_request,
2602 (dump_func)dump_get_window_properties_request,
2603 (dump_func)dump_attach_thread_input_request,
2604 (dump_func)dump_get_thread_input_request,
2605 (dump_func)dump_get_key_state_request,
2606 (dump_func)dump_set_key_state_request,
2607 (dump_func)dump_set_foreground_window_request,
2608 (dump_func)dump_set_focus_window_request,
2609 (dump_func)dump_set_active_window_request,
2610 (dump_func)dump_set_capture_window_request,
2611 (dump_func)dump_set_caret_window_request,
2612 (dump_func)dump_set_caret_info_request,
2613 (dump_func)dump_set_hook_request,
2614 (dump_func)dump_remove_hook_request,
2615 (dump_func)dump_start_hook_chain_request,
2616 (dump_func)dump_finish_hook_chain_request,
2617 (dump_func)dump_get_next_hook_request,
2620 static const dump_func reply_dumpers[REQ_NB_REQUESTS] = {
2621 (dump_func)dump_new_process_reply,
2622 (dump_func)dump_get_new_process_info_reply,
2623 (dump_func)dump_new_thread_reply,
2624 (dump_func)0,
2625 (dump_func)dump_init_process_reply,
2626 (dump_func)dump_get_startup_info_reply,
2627 (dump_func)dump_init_process_done_reply,
2628 (dump_func)dump_init_thread_reply,
2629 (dump_func)dump_terminate_process_reply,
2630 (dump_func)dump_terminate_thread_reply,
2631 (dump_func)dump_get_process_info_reply,
2632 (dump_func)0,
2633 (dump_func)dump_get_thread_info_reply,
2634 (dump_func)0,
2635 (dump_func)dump_get_dll_info_reply,
2636 (dump_func)dump_suspend_thread_reply,
2637 (dump_func)dump_resume_thread_reply,
2638 (dump_func)0,
2639 (dump_func)0,
2640 (dump_func)0,
2641 (dump_func)dump_get_apc_reply,
2642 (dump_func)dump_close_handle_reply,
2643 (dump_func)dump_set_handle_info_reply,
2644 (dump_func)dump_dup_handle_reply,
2645 (dump_func)dump_open_process_reply,
2646 (dump_func)dump_open_thread_reply,
2647 (dump_func)0,
2648 (dump_func)dump_create_event_reply,
2649 (dump_func)0,
2650 (dump_func)dump_open_event_reply,
2651 (dump_func)dump_create_mutex_reply,
2652 (dump_func)0,
2653 (dump_func)dump_open_mutex_reply,
2654 (dump_func)dump_create_semaphore_reply,
2655 (dump_func)dump_release_semaphore_reply,
2656 (dump_func)dump_open_semaphore_reply,
2657 (dump_func)dump_create_file_reply,
2658 (dump_func)dump_alloc_file_handle_reply,
2659 (dump_func)dump_get_handle_fd_reply,
2660 (dump_func)dump_set_file_pointer_reply,
2661 (dump_func)0,
2662 (dump_func)0,
2663 (dump_func)0,
2664 (dump_func)dump_get_file_info_reply,
2665 (dump_func)dump_lock_file_reply,
2666 (dump_func)0,
2667 (dump_func)dump_create_pipe_reply,
2668 (dump_func)dump_create_socket_reply,
2669 (dump_func)dump_accept_socket_reply,
2670 (dump_func)0,
2671 (dump_func)dump_get_socket_event_reply,
2672 (dump_func)0,
2673 (dump_func)0,
2674 (dump_func)dump_alloc_console_reply,
2675 (dump_func)0,
2676 (dump_func)dump_get_console_renderer_events_reply,
2677 (dump_func)dump_open_console_reply,
2678 (dump_func)dump_get_console_mode_reply,
2679 (dump_func)0,
2680 (dump_func)0,
2681 (dump_func)dump_get_console_input_info_reply,
2682 (dump_func)0,
2683 (dump_func)dump_get_console_input_history_reply,
2684 (dump_func)dump_create_console_output_reply,
2685 (dump_func)0,
2686 (dump_func)dump_get_console_output_info_reply,
2687 (dump_func)dump_write_console_input_reply,
2688 (dump_func)dump_read_console_input_reply,
2689 (dump_func)dump_write_console_output_reply,
2690 (dump_func)dump_fill_console_output_reply,
2691 (dump_func)dump_read_console_output_reply,
2692 (dump_func)0,
2693 (dump_func)0,
2694 (dump_func)dump_create_change_notification_reply,
2695 (dump_func)0,
2696 (dump_func)dump_create_mapping_reply,
2697 (dump_func)dump_open_mapping_reply,
2698 (dump_func)dump_get_mapping_info_reply,
2699 (dump_func)dump_create_device_reply,
2700 (dump_func)dump_get_device_id_reply,
2701 (dump_func)dump_create_snapshot_reply,
2702 (dump_func)dump_next_process_reply,
2703 (dump_func)dump_next_thread_reply,
2704 (dump_func)dump_next_module_reply,
2705 (dump_func)dump_wait_debug_event_reply,
2706 (dump_func)dump_queue_exception_event_reply,
2707 (dump_func)dump_get_exception_status_reply,
2708 (dump_func)0,
2709 (dump_func)0,
2710 (dump_func)0,
2711 (dump_func)dump_debug_break_reply,
2712 (dump_func)0,
2713 (dump_func)dump_read_process_memory_reply,
2714 (dump_func)0,
2715 (dump_func)dump_create_key_reply,
2716 (dump_func)dump_open_key_reply,
2717 (dump_func)0,
2718 (dump_func)dump_enum_key_reply,
2719 (dump_func)0,
2720 (dump_func)dump_get_key_value_reply,
2721 (dump_func)dump_enum_key_value_reply,
2722 (dump_func)0,
2723 (dump_func)0,
2724 (dump_func)0,
2725 (dump_func)0,
2726 (dump_func)0,
2727 (dump_func)0,
2728 (dump_func)dump_create_timer_reply,
2729 (dump_func)dump_open_timer_reply,
2730 (dump_func)0,
2731 (dump_func)0,
2732 (dump_func)dump_get_thread_context_reply,
2733 (dump_func)0,
2734 (dump_func)dump_get_selector_entry_reply,
2735 (dump_func)dump_add_atom_reply,
2736 (dump_func)0,
2737 (dump_func)dump_find_atom_reply,
2738 (dump_func)dump_get_atom_name_reply,
2739 (dump_func)0,
2740 (dump_func)dump_get_msg_queue_reply,
2741 (dump_func)dump_set_queue_mask_reply,
2742 (dump_func)dump_get_queue_status_reply,
2743 (dump_func)dump_wait_input_idle_reply,
2744 (dump_func)0,
2745 (dump_func)dump_get_message_reply,
2746 (dump_func)0,
2747 (dump_func)dump_get_message_reply_reply,
2748 (dump_func)0,
2749 (dump_func)0,
2750 (dump_func)dump_create_serial_reply,
2751 (dump_func)dump_get_serial_info_reply,
2752 (dump_func)0,
2753 (dump_func)0,
2754 (dump_func)dump_create_named_pipe_reply,
2755 (dump_func)dump_open_named_pipe_reply,
2756 (dump_func)0,
2757 (dump_func)0,
2758 (dump_func)0,
2759 (dump_func)dump_get_named_pipe_info_reply,
2760 (dump_func)dump_create_smb_reply,
2761 (dump_func)dump_get_smb_info_reply,
2762 (dump_func)dump_create_window_reply,
2763 (dump_func)dump_link_window_reply,
2764 (dump_func)0,
2765 (dump_func)dump_set_window_owner_reply,
2766 (dump_func)dump_get_window_info_reply,
2767 (dump_func)dump_set_window_info_reply,
2768 (dump_func)dump_get_window_parents_reply,
2769 (dump_func)dump_get_window_children_reply,
2770 (dump_func)dump_get_window_tree_reply,
2771 (dump_func)0,
2772 (dump_func)dump_get_window_rectangles_reply,
2773 (dump_func)dump_get_window_text_reply,
2774 (dump_func)0,
2775 (dump_func)0,
2776 (dump_func)dump_get_windows_offset_reply,
2777 (dump_func)0,
2778 (dump_func)dump_remove_window_property_reply,
2779 (dump_func)dump_get_window_property_reply,
2780 (dump_func)dump_get_window_properties_reply,
2781 (dump_func)0,
2782 (dump_func)dump_get_thread_input_reply,
2783 (dump_func)dump_get_key_state_reply,
2784 (dump_func)0,
2785 (dump_func)dump_set_foreground_window_reply,
2786 (dump_func)dump_set_focus_window_reply,
2787 (dump_func)dump_set_active_window_reply,
2788 (dump_func)dump_set_capture_window_reply,
2789 (dump_func)dump_set_caret_window_reply,
2790 (dump_func)dump_set_caret_info_reply,
2791 (dump_func)dump_set_hook_reply,
2792 (dump_func)0,
2793 (dump_func)dump_start_hook_chain_reply,
2794 (dump_func)0,
2795 (dump_func)dump_get_next_hook_reply,
2798 static const char * const req_names[REQ_NB_REQUESTS] = {
2799 "new_process",
2800 "get_new_process_info",
2801 "new_thread",
2802 "boot_done",
2803 "init_process",
2804 "get_startup_info",
2805 "init_process_done",
2806 "init_thread",
2807 "terminate_process",
2808 "terminate_thread",
2809 "get_process_info",
2810 "set_process_info",
2811 "get_thread_info",
2812 "set_thread_info",
2813 "get_dll_info",
2814 "suspend_thread",
2815 "resume_thread",
2816 "load_dll",
2817 "unload_dll",
2818 "queue_apc",
2819 "get_apc",
2820 "close_handle",
2821 "set_handle_info",
2822 "dup_handle",
2823 "open_process",
2824 "open_thread",
2825 "select",
2826 "create_event",
2827 "event_op",
2828 "open_event",
2829 "create_mutex",
2830 "release_mutex",
2831 "open_mutex",
2832 "create_semaphore",
2833 "release_semaphore",
2834 "open_semaphore",
2835 "create_file",
2836 "alloc_file_handle",
2837 "get_handle_fd",
2838 "set_file_pointer",
2839 "truncate_file",
2840 "set_file_time",
2841 "flush_file",
2842 "get_file_info",
2843 "lock_file",
2844 "unlock_file",
2845 "create_pipe",
2846 "create_socket",
2847 "accept_socket",
2848 "set_socket_event",
2849 "get_socket_event",
2850 "enable_socket_event",
2851 "set_socket_deferred",
2852 "alloc_console",
2853 "free_console",
2854 "get_console_renderer_events",
2855 "open_console",
2856 "get_console_mode",
2857 "set_console_mode",
2858 "set_console_input_info",
2859 "get_console_input_info",
2860 "append_console_input_history",
2861 "get_console_input_history",
2862 "create_console_output",
2863 "set_console_output_info",
2864 "get_console_output_info",
2865 "write_console_input",
2866 "read_console_input",
2867 "write_console_output",
2868 "fill_console_output",
2869 "read_console_output",
2870 "move_console_output",
2871 "send_console_signal",
2872 "create_change_notification",
2873 "next_change_notification",
2874 "create_mapping",
2875 "open_mapping",
2876 "get_mapping_info",
2877 "create_device",
2878 "get_device_id",
2879 "create_snapshot",
2880 "next_process",
2881 "next_thread",
2882 "next_module",
2883 "wait_debug_event",
2884 "queue_exception_event",
2885 "get_exception_status",
2886 "output_debug_string",
2887 "continue_debug_event",
2888 "debug_process",
2889 "debug_break",
2890 "set_debugger_kill_on_exit",
2891 "read_process_memory",
2892 "write_process_memory",
2893 "create_key",
2894 "open_key",
2895 "delete_key",
2896 "enum_key",
2897 "set_key_value",
2898 "get_key_value",
2899 "enum_key_value",
2900 "delete_key_value",
2901 "load_registry",
2902 "save_registry",
2903 "save_registry_atexit",
2904 "set_registry_levels",
2905 "set_registry_notification",
2906 "create_timer",
2907 "open_timer",
2908 "set_timer",
2909 "cancel_timer",
2910 "get_thread_context",
2911 "set_thread_context",
2912 "get_selector_entry",
2913 "add_atom",
2914 "delete_atom",
2915 "find_atom",
2916 "get_atom_name",
2917 "init_atom_table",
2918 "get_msg_queue",
2919 "set_queue_mask",
2920 "get_queue_status",
2921 "wait_input_idle",
2922 "send_message",
2923 "get_message",
2924 "reply_message",
2925 "get_message_reply",
2926 "set_win_timer",
2927 "kill_win_timer",
2928 "create_serial",
2929 "get_serial_info",
2930 "set_serial_info",
2931 "register_async",
2932 "create_named_pipe",
2933 "open_named_pipe",
2934 "connect_named_pipe",
2935 "wait_named_pipe",
2936 "disconnect_named_pipe",
2937 "get_named_pipe_info",
2938 "create_smb",
2939 "get_smb_info",
2940 "create_window",
2941 "link_window",
2942 "destroy_window",
2943 "set_window_owner",
2944 "get_window_info",
2945 "set_window_info",
2946 "get_window_parents",
2947 "get_window_children",
2948 "get_window_tree",
2949 "set_window_rectangles",
2950 "get_window_rectangles",
2951 "get_window_text",
2952 "set_window_text",
2953 "inc_window_paint_count",
2954 "get_windows_offset",
2955 "set_window_property",
2956 "remove_window_property",
2957 "get_window_property",
2958 "get_window_properties",
2959 "attach_thread_input",
2960 "get_thread_input",
2961 "get_key_state",
2962 "set_key_state",
2963 "set_foreground_window",
2964 "set_focus_window",
2965 "set_active_window",
2966 "set_capture_window",
2967 "set_caret_window",
2968 "set_caret_info",
2969 "set_hook",
2970 "remove_hook",
2971 "start_hook_chain",
2972 "finish_hook_chain",
2973 "get_next_hook",
2976 /* ### make_requests end ### */
2977 /* Everything above this line is generated automatically by tools/make_requests */
2979 static const char *get_status_name( unsigned int status )
2981 #define NAME(status) { #status, STATUS_##status }
2982 static const struct
2984 const char *name;
2985 unsigned int value;
2986 } status_names[] =
2988 NAME(ACCESS_DENIED),
2989 NAME(ACCESS_VIOLATION),
2990 NAME(BUFFER_OVERFLOW),
2991 NAME(CHILD_MUST_BE_VOLATILE),
2992 NAME(DIRECTORY_NOT_EMPTY),
2993 NAME(DISK_FULL),
2994 NAME(FILE_LOCK_CONFLICT),
2995 NAME(INVALID_FILE_FOR_SECTION),
2996 NAME(INVALID_HANDLE),
2997 NAME(INVALID_PARAMETER),
2998 NAME(KEY_DELETED),
2999 NAME(MEDIA_WRITE_PROTECTED),
3000 NAME(MUTANT_NOT_OWNED),
3001 NAME(NOT_REGISTRY_FILE),
3002 NAME(NO_MEMORY),
3003 NAME(NO_MORE_ENTRIES),
3004 NAME(NO_MORE_FILES),
3005 NAME(NO_SUCH_FILE),
3006 NAME(OBJECT_NAME_COLLISION),
3007 NAME(OBJECT_NAME_INVALID),
3008 NAME(OBJECT_NAME_NOT_FOUND),
3009 NAME(OBJECT_PATH_INVALID),
3010 NAME(OBJECT_TYPE_MISMATCH),
3011 NAME(PENDING),
3012 NAME(PIPE_BROKEN),
3013 NAME(SEMAPHORE_LIMIT_EXCEEDED),
3014 NAME(SHARING_VIOLATION),
3015 NAME(SUSPEND_COUNT_EXCEEDED),
3016 NAME(TIMEOUT),
3017 NAME(TOO_MANY_OPENED_FILES),
3018 NAME(UNSUCCESSFUL),
3019 NAME(USER_APC),
3020 { NULL, 0 } /* terminator */
3022 #undef NAME
3024 int i;
3025 static char buffer[10];
3027 if (status)
3029 for (i = 0; status_names[i].name; i++)
3030 if (status_names[i].value == status) return status_names[i].name;
3032 sprintf( buffer, "%x", status );
3033 return buffer;
3036 void trace_request(void)
3038 enum request req = current->req.request_header.req;
3039 if (req < REQ_NB_REQUESTS)
3041 fprintf( stderr, "%04x: %s(", current->id, req_names[req] );
3042 if (req_dumpers[req])
3044 cur_pos = 0;
3045 cur_data = get_req_data();
3046 cur_size = get_req_data_size();
3047 req_dumpers[req]( &current->req );
3049 fprintf( stderr, " )\n" );
3051 else fprintf( stderr, "%04x: %d(?)\n", current->id, req );
3054 void trace_reply( enum request req, const union generic_reply *reply )
3056 if (req < REQ_NB_REQUESTS)
3058 fprintf( stderr, "%04x: %s() = %s",
3059 current->id, req_names[req], get_status_name(current->error) );
3060 if (reply_dumpers[req])
3062 fprintf( stderr, " {" );
3063 cur_pos = 0;
3064 cur_data = current->reply_data;
3065 cur_size = reply->reply_header.reply_size;
3066 reply_dumpers[req]( reply );
3067 fprintf( stderr, " }" );
3069 fputc( '\n', stderr );
3071 else fprintf( stderr, "%04x: %d() = %s\n",
3072 current->id, req, get_status_name(current->error) );