Add Windows 2003 to the versions Wine can return.
[wine.git] / server / trace.c
blob22b542a81c0f664853bf26f24233b13e28909077
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, " pid=%04x,", req->pid );
540 fprintf( stderr, " tid=%04x,", req->tid );
541 fprintf( stderr, " teb=%p,", req->teb );
542 fprintf( stderr, " exit_code=%d,", req->exit_code );
543 fprintf( stderr, " priority=%d,", req->priority );
544 fprintf( stderr, " affinity=%d,", req->affinity );
545 fprintf( stderr, " creation_time=%ld,", req->creation_time );
546 fprintf( stderr, " exit_time=%ld", req->exit_time );
549 static void dump_set_thread_info_request( const struct set_thread_info_request *req )
551 fprintf( stderr, " handle=%p,", req->handle );
552 fprintf( stderr, " mask=%d,", req->mask );
553 fprintf( stderr, " priority=%d,", req->priority );
554 fprintf( stderr, " affinity=%d", req->affinity );
557 static void dump_get_dll_info_request( const struct get_dll_info_request *req )
559 fprintf( stderr, " handle=%p,", req->handle );
560 fprintf( stderr, " base_address=%p", req->base_address );
563 static void dump_get_dll_info_reply( const struct get_dll_info_reply *req )
565 fprintf( stderr, " size=%d,", req->size );
566 fprintf( stderr, " entry_point=%p,", req->entry_point );
567 fprintf( stderr, " filename=" );
568 dump_varargs_string( cur_size );
571 static void dump_suspend_thread_request( const struct suspend_thread_request *req )
573 fprintf( stderr, " handle=%p", req->handle );
576 static void dump_suspend_thread_reply( const struct suspend_thread_reply *req )
578 fprintf( stderr, " count=%d", req->count );
581 static void dump_resume_thread_request( const struct resume_thread_request *req )
583 fprintf( stderr, " handle=%p", req->handle );
586 static void dump_resume_thread_reply( const struct resume_thread_reply *req )
588 fprintf( stderr, " count=%d", req->count );
591 static void dump_load_dll_request( const struct load_dll_request *req )
593 fprintf( stderr, " handle=%p,", req->handle );
594 fprintf( stderr, " base=%p,", req->base );
595 fprintf( stderr, " size=%d,", req->size );
596 fprintf( stderr, " dbg_offset=%d,", req->dbg_offset );
597 fprintf( stderr, " dbg_size=%d,", req->dbg_size );
598 fprintf( stderr, " name=%p,", req->name );
599 fprintf( stderr, " filename=" );
600 dump_varargs_string( cur_size );
603 static void dump_unload_dll_request( const struct unload_dll_request *req )
605 fprintf( stderr, " base=%p", req->base );
608 static void dump_queue_apc_request( const struct queue_apc_request *req )
610 fprintf( stderr, " handle=%p,", req->handle );
611 fprintf( stderr, " user=%d,", req->user );
612 fprintf( stderr, " func=%p,", req->func );
613 fprintf( stderr, " arg1=%p,", req->arg1 );
614 fprintf( stderr, " arg2=%p,", req->arg2 );
615 fprintf( stderr, " arg3=%p", req->arg3 );
618 static void dump_get_apc_request( const struct get_apc_request *req )
620 fprintf( stderr, " alertable=%d", req->alertable );
623 static void dump_get_apc_reply( const struct get_apc_reply *req )
625 fprintf( stderr, " func=%p,", req->func );
626 fprintf( stderr, " type=%d,", req->type );
627 fprintf( stderr, " arg1=%p,", req->arg1 );
628 fprintf( stderr, " arg2=%p,", req->arg2 );
629 fprintf( stderr, " arg3=%p", req->arg3 );
632 static void dump_close_handle_request( const struct close_handle_request *req )
634 fprintf( stderr, " handle=%p", req->handle );
637 static void dump_close_handle_reply( const struct close_handle_reply *req )
639 fprintf( stderr, " fd=%d", req->fd );
642 static void dump_set_handle_info_request( const struct set_handle_info_request *req )
644 fprintf( stderr, " handle=%p,", req->handle );
645 fprintf( stderr, " flags=%d,", req->flags );
646 fprintf( stderr, " mask=%d,", req->mask );
647 fprintf( stderr, " fd=%d", req->fd );
650 static void dump_set_handle_info_reply( const struct set_handle_info_reply *req )
652 fprintf( stderr, " old_flags=%d,", req->old_flags );
653 fprintf( stderr, " cur_fd=%d", req->cur_fd );
656 static void dump_dup_handle_request( const struct dup_handle_request *req )
658 fprintf( stderr, " src_process=%p,", req->src_process );
659 fprintf( stderr, " src_handle=%p,", req->src_handle );
660 fprintf( stderr, " dst_process=%p,", req->dst_process );
661 fprintf( stderr, " access=%08x,", req->access );
662 fprintf( stderr, " inherit=%d,", req->inherit );
663 fprintf( stderr, " options=%d", req->options );
666 static void dump_dup_handle_reply( const struct dup_handle_reply *req )
668 fprintf( stderr, " handle=%p,", req->handle );
669 fprintf( stderr, " fd=%d", req->fd );
672 static void dump_open_process_request( const struct open_process_request *req )
674 fprintf( stderr, " pid=%04x,", req->pid );
675 fprintf( stderr, " access=%08x,", req->access );
676 fprintf( stderr, " inherit=%d", req->inherit );
679 static void dump_open_process_reply( const struct open_process_reply *req )
681 fprintf( stderr, " handle=%p", req->handle );
684 static void dump_open_thread_request( const struct open_thread_request *req )
686 fprintf( stderr, " tid=%04x,", req->tid );
687 fprintf( stderr, " access=%08x,", req->access );
688 fprintf( stderr, " inherit=%d", req->inherit );
691 static void dump_open_thread_reply( const struct open_thread_reply *req )
693 fprintf( stderr, " handle=%p", req->handle );
696 static void dump_select_request( const struct select_request *req )
698 fprintf( stderr, " flags=%d,", req->flags );
699 fprintf( stderr, " cookie=%p,", req->cookie );
700 fprintf( stderr, " timeout=" );
701 dump_abs_time( &req->timeout );
702 fprintf( stderr, "," );
703 fprintf( stderr, " handles=" );
704 dump_varargs_handles( cur_size );
707 static void dump_create_event_request( const struct create_event_request *req )
709 fprintf( stderr, " manual_reset=%d,", req->manual_reset );
710 fprintf( stderr, " initial_state=%d,", req->initial_state );
711 fprintf( stderr, " inherit=%d,", req->inherit );
712 fprintf( stderr, " name=" );
713 dump_varargs_unicode_str( cur_size );
716 static void dump_create_event_reply( const struct create_event_reply *req )
718 fprintf( stderr, " handle=%p", req->handle );
721 static void dump_event_op_request( const struct event_op_request *req )
723 fprintf( stderr, " handle=%p,", req->handle );
724 fprintf( stderr, " op=%d", req->op );
727 static void dump_open_event_request( const struct open_event_request *req )
729 fprintf( stderr, " access=%08x,", req->access );
730 fprintf( stderr, " inherit=%d,", req->inherit );
731 fprintf( stderr, " name=" );
732 dump_varargs_unicode_str( cur_size );
735 static void dump_open_event_reply( const struct open_event_reply *req )
737 fprintf( stderr, " handle=%p", req->handle );
740 static void dump_create_mutex_request( const struct create_mutex_request *req )
742 fprintf( stderr, " owned=%d,", req->owned );
743 fprintf( stderr, " inherit=%d,", req->inherit );
744 fprintf( stderr, " name=" );
745 dump_varargs_unicode_str( cur_size );
748 static void dump_create_mutex_reply( const struct create_mutex_reply *req )
750 fprintf( stderr, " handle=%p", req->handle );
753 static void dump_release_mutex_request( const struct release_mutex_request *req )
755 fprintf( stderr, " handle=%p", req->handle );
758 static void dump_open_mutex_request( const struct open_mutex_request *req )
760 fprintf( stderr, " access=%08x,", req->access );
761 fprintf( stderr, " inherit=%d,", req->inherit );
762 fprintf( stderr, " name=" );
763 dump_varargs_unicode_str( cur_size );
766 static void dump_open_mutex_reply( const struct open_mutex_reply *req )
768 fprintf( stderr, " handle=%p", req->handle );
771 static void dump_create_semaphore_request( const struct create_semaphore_request *req )
773 fprintf( stderr, " initial=%08x,", req->initial );
774 fprintf( stderr, " max=%08x,", req->max );
775 fprintf( stderr, " inherit=%d,", req->inherit );
776 fprintf( stderr, " name=" );
777 dump_varargs_unicode_str( cur_size );
780 static void dump_create_semaphore_reply( const struct create_semaphore_reply *req )
782 fprintf( stderr, " handle=%p", req->handle );
785 static void dump_release_semaphore_request( const struct release_semaphore_request *req )
787 fprintf( stderr, " handle=%p,", req->handle );
788 fprintf( stderr, " count=%08x", req->count );
791 static void dump_release_semaphore_reply( const struct release_semaphore_reply *req )
793 fprintf( stderr, " prev_count=%08x", req->prev_count );
796 static void dump_open_semaphore_request( const struct open_semaphore_request *req )
798 fprintf( stderr, " access=%08x,", req->access );
799 fprintf( stderr, " inherit=%d,", req->inherit );
800 fprintf( stderr, " name=" );
801 dump_varargs_unicode_str( cur_size );
804 static void dump_open_semaphore_reply( const struct open_semaphore_reply *req )
806 fprintf( stderr, " handle=%p", req->handle );
809 static void dump_create_file_request( const struct create_file_request *req )
811 fprintf( stderr, " access=%08x,", req->access );
812 fprintf( stderr, " inherit=%d,", req->inherit );
813 fprintf( stderr, " sharing=%08x,", req->sharing );
814 fprintf( stderr, " create=%d,", req->create );
815 fprintf( stderr, " attrs=%08x,", req->attrs );
816 fprintf( stderr, " drive_type=%d,", req->drive_type );
817 fprintf( stderr, " filename=" );
818 dump_varargs_string( cur_size );
821 static void dump_create_file_reply( const struct create_file_reply *req )
823 fprintf( stderr, " handle=%p", req->handle );
826 static void dump_alloc_file_handle_request( const struct alloc_file_handle_request *req )
828 fprintf( stderr, " access=%08x,", req->access );
829 fprintf( stderr, " inherit=%d,", req->inherit );
830 fprintf( stderr, " fd=%d", req->fd );
833 static void dump_alloc_file_handle_reply( const struct alloc_file_handle_reply *req )
835 fprintf( stderr, " handle=%p", req->handle );
838 static void dump_get_handle_fd_request( const struct get_handle_fd_request *req )
840 fprintf( stderr, " handle=%p,", req->handle );
841 fprintf( stderr, " access=%08x", req->access );
844 static void dump_get_handle_fd_reply( const struct get_handle_fd_reply *req )
846 fprintf( stderr, " fd=%d,", req->fd );
847 fprintf( stderr, " type=%d,", req->type );
848 fprintf( stderr, " flags=%d", req->flags );
851 static void dump_set_file_pointer_request( const struct set_file_pointer_request *req )
853 fprintf( stderr, " handle=%p,", req->handle );
854 fprintf( stderr, " low=%d,", req->low );
855 fprintf( stderr, " high=%d,", req->high );
856 fprintf( stderr, " whence=%d", req->whence );
859 static void dump_set_file_pointer_reply( const struct set_file_pointer_reply *req )
861 fprintf( stderr, " new_low=%d,", req->new_low );
862 fprintf( stderr, " new_high=%d", req->new_high );
865 static void dump_truncate_file_request( const struct truncate_file_request *req )
867 fprintf( stderr, " handle=%p", req->handle );
870 static void dump_set_file_time_request( const struct set_file_time_request *req )
872 fprintf( stderr, " handle=%p,", req->handle );
873 fprintf( stderr, " access_time=%ld,", req->access_time );
874 fprintf( stderr, " write_time=%ld", req->write_time );
877 static void dump_flush_file_request( const struct flush_file_request *req )
879 fprintf( stderr, " handle=%p", req->handle );
882 static void dump_flush_file_reply( const struct flush_file_reply *req )
884 fprintf( stderr, " event=%p", req->event );
887 static void dump_get_file_info_request( const struct get_file_info_request *req )
889 fprintf( stderr, " handle=%p", req->handle );
892 static void dump_get_file_info_reply( const struct get_file_info_reply *req )
894 fprintf( stderr, " type=%d,", req->type );
895 fprintf( stderr, " attr=%d,", req->attr );
896 fprintf( stderr, " access_time=%ld,", req->access_time );
897 fprintf( stderr, " write_time=%ld,", req->write_time );
898 fprintf( stderr, " change_time=%ld,", req->change_time );
899 fprintf( stderr, " size_high=%d,", req->size_high );
900 fprintf( stderr, " size_low=%d,", req->size_low );
901 fprintf( stderr, " alloc_high=%d,", req->alloc_high );
902 fprintf( stderr, " alloc_low=%d,", req->alloc_low );
903 fprintf( stderr, " links=%d,", req->links );
904 fprintf( stderr, " index_high=%d,", req->index_high );
905 fprintf( stderr, " index_low=%d,", req->index_low );
906 fprintf( stderr, " serial=%08x", req->serial );
909 static void dump_lock_file_request( const struct lock_file_request *req )
911 fprintf( stderr, " handle=%p,", req->handle );
912 fprintf( stderr, " offset_low=%08x,", req->offset_low );
913 fprintf( stderr, " offset_high=%08x,", req->offset_high );
914 fprintf( stderr, " count_low=%08x,", req->count_low );
915 fprintf( stderr, " count_high=%08x,", req->count_high );
916 fprintf( stderr, " shared=%d,", req->shared );
917 fprintf( stderr, " wait=%d", req->wait );
920 static void dump_lock_file_reply( const struct lock_file_reply *req )
922 fprintf( stderr, " handle=%p,", req->handle );
923 fprintf( stderr, " overlapped=%d", req->overlapped );
926 static void dump_unlock_file_request( const struct unlock_file_request *req )
928 fprintf( stderr, " handle=%p,", req->handle );
929 fprintf( stderr, " offset_low=%08x,", req->offset_low );
930 fprintf( stderr, " offset_high=%08x,", req->offset_high );
931 fprintf( stderr, " count_low=%08x,", req->count_low );
932 fprintf( stderr, " count_high=%08x", req->count_high );
935 static void dump_create_socket_request( const struct create_socket_request *req )
937 fprintf( stderr, " access=%08x,", req->access );
938 fprintf( stderr, " inherit=%d,", req->inherit );
939 fprintf( stderr, " family=%d,", req->family );
940 fprintf( stderr, " type=%d,", req->type );
941 fprintf( stderr, " protocol=%d,", req->protocol );
942 fprintf( stderr, " flags=%08x", req->flags );
945 static void dump_create_socket_reply( const struct create_socket_reply *req )
947 fprintf( stderr, " handle=%p", req->handle );
950 static void dump_accept_socket_request( const struct accept_socket_request *req )
952 fprintf( stderr, " lhandle=%p,", req->lhandle );
953 fprintf( stderr, " access=%08x,", req->access );
954 fprintf( stderr, " inherit=%d", req->inherit );
957 static void dump_accept_socket_reply( const struct accept_socket_reply *req )
959 fprintf( stderr, " handle=%p", req->handle );
962 static void dump_set_socket_event_request( const struct set_socket_event_request *req )
964 fprintf( stderr, " handle=%p,", req->handle );
965 fprintf( stderr, " mask=%08x,", req->mask );
966 fprintf( stderr, " event=%p,", req->event );
967 fprintf( stderr, " window=%p,", req->window );
968 fprintf( stderr, " msg=%08x", req->msg );
971 static void dump_get_socket_event_request( const struct get_socket_event_request *req )
973 fprintf( stderr, " handle=%p,", req->handle );
974 fprintf( stderr, " service=%d,", req->service );
975 fprintf( stderr, " c_event=%p", req->c_event );
978 static void dump_get_socket_event_reply( const struct get_socket_event_reply *req )
980 fprintf( stderr, " mask=%08x,", req->mask );
981 fprintf( stderr, " pmask=%08x,", req->pmask );
982 fprintf( stderr, " state=%08x,", req->state );
983 fprintf( stderr, " errors=" );
984 dump_varargs_ints( cur_size );
987 static void dump_enable_socket_event_request( const struct enable_socket_event_request *req )
989 fprintf( stderr, " handle=%p,", req->handle );
990 fprintf( stderr, " mask=%08x,", req->mask );
991 fprintf( stderr, " sstate=%08x,", req->sstate );
992 fprintf( stderr, " cstate=%08x", req->cstate );
995 static void dump_set_socket_deferred_request( const struct set_socket_deferred_request *req )
997 fprintf( stderr, " handle=%p,", req->handle );
998 fprintf( stderr, " deferred=%p", req->deferred );
1001 static void dump_alloc_console_request( const struct alloc_console_request *req )
1003 fprintf( stderr, " access=%08x,", req->access );
1004 fprintf( stderr, " inherit=%d,", req->inherit );
1005 fprintf( stderr, " pid=%04x", req->pid );
1008 static void dump_alloc_console_reply( const struct alloc_console_reply *req )
1010 fprintf( stderr, " handle_in=%p,", req->handle_in );
1011 fprintf( stderr, " event=%p", req->event );
1014 static void dump_free_console_request( const struct free_console_request *req )
1018 static void dump_get_console_renderer_events_request( const struct get_console_renderer_events_request *req )
1020 fprintf( stderr, " handle=%p", req->handle );
1023 static void dump_get_console_renderer_events_reply( const struct get_console_renderer_events_reply *req )
1025 fprintf( stderr, " data=" );
1026 dump_varargs_bytes( cur_size );
1029 static void dump_open_console_request( const struct open_console_request *req )
1031 fprintf( stderr, " from=%d,", req->from );
1032 fprintf( stderr, " access=%08x,", req->access );
1033 fprintf( stderr, " inherit=%d,", req->inherit );
1034 fprintf( stderr, " share=%d", req->share );
1037 static void dump_open_console_reply( const struct open_console_reply *req )
1039 fprintf( stderr, " handle=%p", req->handle );
1042 static void dump_get_console_wait_event_request( const struct get_console_wait_event_request *req )
1046 static void dump_get_console_wait_event_reply( const struct get_console_wait_event_reply *req )
1048 fprintf( stderr, " handle=%p", req->handle );
1051 static void dump_get_console_mode_request( const struct get_console_mode_request *req )
1053 fprintf( stderr, " handle=%p", req->handle );
1056 static void dump_get_console_mode_reply( const struct get_console_mode_reply *req )
1058 fprintf( stderr, " mode=%d", req->mode );
1061 static void dump_set_console_mode_request( const struct set_console_mode_request *req )
1063 fprintf( stderr, " handle=%p,", req->handle );
1064 fprintf( stderr, " mode=%d", req->mode );
1067 static void dump_set_console_input_info_request( const struct set_console_input_info_request *req )
1069 fprintf( stderr, " handle=%p,", req->handle );
1070 fprintf( stderr, " mask=%d,", req->mask );
1071 fprintf( stderr, " active_sb=%p,", req->active_sb );
1072 fprintf( stderr, " history_mode=%d,", req->history_mode );
1073 fprintf( stderr, " history_size=%d,", req->history_size );
1074 fprintf( stderr, " edition_mode=%d,", req->edition_mode );
1075 fprintf( stderr, " title=" );
1076 dump_varargs_unicode_str( cur_size );
1079 static void dump_get_console_input_info_request( const struct get_console_input_info_request *req )
1081 fprintf( stderr, " handle=%p", req->handle );
1084 static void dump_get_console_input_info_reply( const struct get_console_input_info_reply *req )
1086 fprintf( stderr, " history_mode=%d,", req->history_mode );
1087 fprintf( stderr, " history_size=%d,", req->history_size );
1088 fprintf( stderr, " history_index=%d,", req->history_index );
1089 fprintf( stderr, " edition_mode=%d,", req->edition_mode );
1090 fprintf( stderr, " title=" );
1091 dump_varargs_unicode_str( cur_size );
1094 static void dump_append_console_input_history_request( const struct append_console_input_history_request *req )
1096 fprintf( stderr, " handle=%p,", req->handle );
1097 fprintf( stderr, " line=" );
1098 dump_varargs_unicode_str( cur_size );
1101 static void dump_get_console_input_history_request( const struct get_console_input_history_request *req )
1103 fprintf( stderr, " handle=%p,", req->handle );
1104 fprintf( stderr, " index=%d", req->index );
1107 static void dump_get_console_input_history_reply( const struct get_console_input_history_reply *req )
1109 fprintf( stderr, " total=%d,", req->total );
1110 fprintf( stderr, " line=" );
1111 dump_varargs_unicode_str( cur_size );
1114 static void dump_create_console_output_request( const struct create_console_output_request *req )
1116 fprintf( stderr, " handle_in=%p,", req->handle_in );
1117 fprintf( stderr, " access=%d,", req->access );
1118 fprintf( stderr, " share=%d,", req->share );
1119 fprintf( stderr, " inherit=%d", req->inherit );
1122 static void dump_create_console_output_reply( const struct create_console_output_reply *req )
1124 fprintf( stderr, " handle_out=%p", req->handle_out );
1127 static void dump_set_console_output_info_request( const struct set_console_output_info_request *req )
1129 fprintf( stderr, " handle=%p,", req->handle );
1130 fprintf( stderr, " mask=%d,", req->mask );
1131 fprintf( stderr, " cursor_size=%d,", req->cursor_size );
1132 fprintf( stderr, " cursor_visible=%d,", req->cursor_visible );
1133 fprintf( stderr, " cursor_x=%d,", req->cursor_x );
1134 fprintf( stderr, " cursor_y=%d,", req->cursor_y );
1135 fprintf( stderr, " width=%d,", req->width );
1136 fprintf( stderr, " height=%d,", req->height );
1137 fprintf( stderr, " attr=%d,", req->attr );
1138 fprintf( stderr, " win_left=%d,", req->win_left );
1139 fprintf( stderr, " win_top=%d,", req->win_top );
1140 fprintf( stderr, " win_right=%d,", req->win_right );
1141 fprintf( stderr, " win_bottom=%d,", req->win_bottom );
1142 fprintf( stderr, " max_width=%d,", req->max_width );
1143 fprintf( stderr, " max_height=%d", req->max_height );
1146 static void dump_get_console_output_info_request( const struct get_console_output_info_request *req )
1148 fprintf( stderr, " handle=%p", req->handle );
1151 static void dump_get_console_output_info_reply( const struct get_console_output_info_reply *req )
1153 fprintf( stderr, " cursor_size=%d,", req->cursor_size );
1154 fprintf( stderr, " cursor_visible=%d,", req->cursor_visible );
1155 fprintf( stderr, " cursor_x=%d,", req->cursor_x );
1156 fprintf( stderr, " cursor_y=%d,", req->cursor_y );
1157 fprintf( stderr, " width=%d,", req->width );
1158 fprintf( stderr, " height=%d,", req->height );
1159 fprintf( stderr, " attr=%d,", req->attr );
1160 fprintf( stderr, " win_left=%d,", req->win_left );
1161 fprintf( stderr, " win_top=%d,", req->win_top );
1162 fprintf( stderr, " win_right=%d,", req->win_right );
1163 fprintf( stderr, " win_bottom=%d,", req->win_bottom );
1164 fprintf( stderr, " max_width=%d,", req->max_width );
1165 fprintf( stderr, " max_height=%d", req->max_height );
1168 static void dump_write_console_input_request( const struct write_console_input_request *req )
1170 fprintf( stderr, " handle=%p,", req->handle );
1171 fprintf( stderr, " rec=" );
1172 dump_varargs_input_records( cur_size );
1175 static void dump_write_console_input_reply( const struct write_console_input_reply *req )
1177 fprintf( stderr, " written=%d", req->written );
1180 static void dump_read_console_input_request( const struct read_console_input_request *req )
1182 fprintf( stderr, " handle=%p,", req->handle );
1183 fprintf( stderr, " flush=%d", req->flush );
1186 static void dump_read_console_input_reply( const struct read_console_input_reply *req )
1188 fprintf( stderr, " read=%d,", req->read );
1189 fprintf( stderr, " rec=" );
1190 dump_varargs_input_records( cur_size );
1193 static void dump_write_console_output_request( const struct write_console_output_request *req )
1195 fprintf( stderr, " handle=%p,", req->handle );
1196 fprintf( stderr, " x=%d,", req->x );
1197 fprintf( stderr, " y=%d,", req->y );
1198 fprintf( stderr, " mode=%d,", req->mode );
1199 fprintf( stderr, " wrap=%d,", req->wrap );
1200 fprintf( stderr, " data=" );
1201 dump_varargs_bytes( cur_size );
1204 static void dump_write_console_output_reply( const struct write_console_output_reply *req )
1206 fprintf( stderr, " written=%d,", req->written );
1207 fprintf( stderr, " width=%d,", req->width );
1208 fprintf( stderr, " height=%d", req->height );
1211 static void dump_fill_console_output_request( const struct fill_console_output_request *req )
1213 fprintf( stderr, " handle=%p,", req->handle );
1214 fprintf( stderr, " x=%d,", req->x );
1215 fprintf( stderr, " y=%d,", req->y );
1216 fprintf( stderr, " mode=%d,", req->mode );
1217 fprintf( stderr, " count=%d,", req->count );
1218 fprintf( stderr, " wrap=%d,", req->wrap );
1219 fprintf( stderr, " data=" );
1220 dump_char_info( &req->data );
1223 static void dump_fill_console_output_reply( const struct fill_console_output_reply *req )
1225 fprintf( stderr, " written=%d", req->written );
1228 static void dump_read_console_output_request( const struct read_console_output_request *req )
1230 fprintf( stderr, " handle=%p,", req->handle );
1231 fprintf( stderr, " x=%d,", req->x );
1232 fprintf( stderr, " y=%d,", req->y );
1233 fprintf( stderr, " mode=%d,", req->mode );
1234 fprintf( stderr, " wrap=%d", req->wrap );
1237 static void dump_read_console_output_reply( const struct read_console_output_reply *req )
1239 fprintf( stderr, " width=%d,", req->width );
1240 fprintf( stderr, " height=%d,", req->height );
1241 fprintf( stderr, " data=" );
1242 dump_varargs_bytes( cur_size );
1245 static void dump_move_console_output_request( const struct move_console_output_request *req )
1247 fprintf( stderr, " handle=%p,", req->handle );
1248 fprintf( stderr, " x_src=%d,", req->x_src );
1249 fprintf( stderr, " y_src=%d,", req->y_src );
1250 fprintf( stderr, " x_dst=%d,", req->x_dst );
1251 fprintf( stderr, " y_dst=%d,", req->y_dst );
1252 fprintf( stderr, " w=%d,", req->w );
1253 fprintf( stderr, " h=%d", req->h );
1256 static void dump_send_console_signal_request( const struct send_console_signal_request *req )
1258 fprintf( stderr, " signal=%d,", req->signal );
1259 fprintf( stderr, " group_id=%04x", req->group_id );
1262 static void dump_create_change_notification_request( const struct create_change_notification_request *req )
1264 fprintf( stderr, " handle=%p,", req->handle );
1265 fprintf( stderr, " subtree=%d,", req->subtree );
1266 fprintf( stderr, " filter=%08x", req->filter );
1269 static void dump_create_change_notification_reply( const struct create_change_notification_reply *req )
1271 fprintf( stderr, " handle=%p", req->handle );
1274 static void dump_next_change_notification_request( const struct next_change_notification_request *req )
1276 fprintf( stderr, " handle=%p", req->handle );
1279 static void dump_create_mapping_request( const struct create_mapping_request *req )
1281 fprintf( stderr, " size_high=%d,", req->size_high );
1282 fprintf( stderr, " size_low=%d,", req->size_low );
1283 fprintf( stderr, " protect=%d,", req->protect );
1284 fprintf( stderr, " access=%08x,", req->access );
1285 fprintf( stderr, " inherit=%d,", req->inherit );
1286 fprintf( stderr, " file_handle=%p,", req->file_handle );
1287 fprintf( stderr, " name=" );
1288 dump_varargs_unicode_str( cur_size );
1291 static void dump_create_mapping_reply( const struct create_mapping_reply *req )
1293 fprintf( stderr, " handle=%p", req->handle );
1296 static void dump_open_mapping_request( const struct open_mapping_request *req )
1298 fprintf( stderr, " access=%08x,", req->access );
1299 fprintf( stderr, " inherit=%d,", req->inherit );
1300 fprintf( stderr, " name=" );
1301 dump_varargs_unicode_str( cur_size );
1304 static void dump_open_mapping_reply( const struct open_mapping_reply *req )
1306 fprintf( stderr, " handle=%p", req->handle );
1309 static void dump_get_mapping_info_request( const struct get_mapping_info_request *req )
1311 fprintf( stderr, " handle=%p", req->handle );
1314 static void dump_get_mapping_info_reply( const struct get_mapping_info_reply *req )
1316 fprintf( stderr, " size_high=%d,", req->size_high );
1317 fprintf( stderr, " size_low=%d,", req->size_low );
1318 fprintf( stderr, " protect=%d,", req->protect );
1319 fprintf( stderr, " header_size=%d,", req->header_size );
1320 fprintf( stderr, " base=%p,", req->base );
1321 fprintf( stderr, " shared_file=%p,", req->shared_file );
1322 fprintf( stderr, " shared_size=%d,", req->shared_size );
1323 fprintf( stderr, " drive_type=%d", req->drive_type );
1326 static void dump_create_device_request( const struct create_device_request *req )
1328 fprintf( stderr, " access=%08x,", req->access );
1329 fprintf( stderr, " inherit=%d,", req->inherit );
1330 fprintf( stderr, " id=%d", req->id );
1333 static void dump_create_device_reply( const struct create_device_reply *req )
1335 fprintf( stderr, " handle=%p", req->handle );
1338 static void dump_get_device_id_request( const struct get_device_id_request *req )
1340 fprintf( stderr, " handle=%p", req->handle );
1343 static void dump_get_device_id_reply( const struct get_device_id_reply *req )
1345 fprintf( stderr, " id=%d", req->id );
1348 static void dump_create_snapshot_request( const struct create_snapshot_request *req )
1350 fprintf( stderr, " inherit=%d,", req->inherit );
1351 fprintf( stderr, " flags=%d,", req->flags );
1352 fprintf( stderr, " pid=%04x", req->pid );
1355 static void dump_create_snapshot_reply( const struct create_snapshot_reply *req )
1357 fprintf( stderr, " handle=%p", req->handle );
1360 static void dump_next_process_request( const struct next_process_request *req )
1362 fprintf( stderr, " handle=%p,", req->handle );
1363 fprintf( stderr, " reset=%d", req->reset );
1366 static void dump_next_process_reply( const struct next_process_reply *req )
1368 fprintf( stderr, " count=%d,", req->count );
1369 fprintf( stderr, " pid=%04x,", req->pid );
1370 fprintf( stderr, " ppid=%04x,", req->ppid );
1371 fprintf( stderr, " heap=%p,", req->heap );
1372 fprintf( stderr, " module=%p,", req->module );
1373 fprintf( stderr, " threads=%d,", req->threads );
1374 fprintf( stderr, " priority=%d,", req->priority );
1375 fprintf( stderr, " filename=" );
1376 dump_varargs_string( cur_size );
1379 static void dump_next_thread_request( const struct next_thread_request *req )
1381 fprintf( stderr, " handle=%p,", req->handle );
1382 fprintf( stderr, " reset=%d", req->reset );
1385 static void dump_next_thread_reply( const struct next_thread_reply *req )
1387 fprintf( stderr, " count=%d,", req->count );
1388 fprintf( stderr, " pid=%04x,", req->pid );
1389 fprintf( stderr, " tid=%04x,", req->tid );
1390 fprintf( stderr, " base_pri=%d,", req->base_pri );
1391 fprintf( stderr, " delta_pri=%d", req->delta_pri );
1394 static void dump_next_module_request( const struct next_module_request *req )
1396 fprintf( stderr, " handle=%p,", req->handle );
1397 fprintf( stderr, " reset=%d", req->reset );
1400 static void dump_next_module_reply( const struct next_module_reply *req )
1402 fprintf( stderr, " pid=%04x,", req->pid );
1403 fprintf( stderr, " base=%p,", req->base );
1404 fprintf( stderr, " size=%d,", req->size );
1405 fprintf( stderr, " filename=" );
1406 dump_varargs_string( cur_size );
1409 static void dump_wait_debug_event_request( const struct wait_debug_event_request *req )
1411 fprintf( stderr, " get_handle=%d", req->get_handle );
1414 static void dump_wait_debug_event_reply( const struct wait_debug_event_reply *req )
1416 fprintf( stderr, " pid=%04x,", req->pid );
1417 fprintf( stderr, " tid=%04x,", req->tid );
1418 fprintf( stderr, " wait=%p,", req->wait );
1419 fprintf( stderr, " event=" );
1420 dump_varargs_debug_event( cur_size );
1423 static void dump_queue_exception_event_request( const struct queue_exception_event_request *req )
1425 fprintf( stderr, " first=%d,", req->first );
1426 fprintf( stderr, " record=" );
1427 dump_varargs_exc_event( cur_size );
1430 static void dump_queue_exception_event_reply( const struct queue_exception_event_reply *req )
1432 fprintf( stderr, " handle=%p", req->handle );
1435 static void dump_get_exception_status_request( const struct get_exception_status_request *req )
1437 fprintf( stderr, " handle=%p", req->handle );
1440 static void dump_get_exception_status_reply( const struct get_exception_status_reply *req )
1442 fprintf( stderr, " status=%d,", req->status );
1443 fprintf( stderr, " context=" );
1444 dump_varargs_context( cur_size );
1447 static void dump_output_debug_string_request( const struct output_debug_string_request *req )
1449 fprintf( stderr, " string=%p,", req->string );
1450 fprintf( stderr, " unicode=%d,", req->unicode );
1451 fprintf( stderr, " length=%d", req->length );
1454 static void dump_continue_debug_event_request( const struct continue_debug_event_request *req )
1456 fprintf( stderr, " pid=%04x,", req->pid );
1457 fprintf( stderr, " tid=%04x,", req->tid );
1458 fprintf( stderr, " status=%d", req->status );
1461 static void dump_debug_process_request( const struct debug_process_request *req )
1463 fprintf( stderr, " pid=%04x,", req->pid );
1464 fprintf( stderr, " attach=%d", req->attach );
1467 static void dump_debug_break_request( const struct debug_break_request *req )
1469 fprintf( stderr, " handle=%p", req->handle );
1472 static void dump_debug_break_reply( const struct debug_break_reply *req )
1474 fprintf( stderr, " self=%d", req->self );
1477 static void dump_set_debugger_kill_on_exit_request( const struct set_debugger_kill_on_exit_request *req )
1479 fprintf( stderr, " kill_on_exit=%d", req->kill_on_exit );
1482 static void dump_read_process_memory_request( const struct read_process_memory_request *req )
1484 fprintf( stderr, " handle=%p,", req->handle );
1485 fprintf( stderr, " addr=%p", req->addr );
1488 static void dump_read_process_memory_reply( const struct read_process_memory_reply *req )
1490 fprintf( stderr, " data=" );
1491 dump_varargs_bytes( cur_size );
1494 static void dump_write_process_memory_request( const struct write_process_memory_request *req )
1496 fprintf( stderr, " handle=%p,", req->handle );
1497 fprintf( stderr, " addr=%p,", req->addr );
1498 fprintf( stderr, " first_mask=%08x,", req->first_mask );
1499 fprintf( stderr, " last_mask=%08x,", req->last_mask );
1500 fprintf( stderr, " data=" );
1501 dump_varargs_bytes( cur_size );
1504 static void dump_create_key_request( const struct create_key_request *req )
1506 fprintf( stderr, " parent=%p,", req->parent );
1507 fprintf( stderr, " access=%08x,", req->access );
1508 fprintf( stderr, " options=%08x,", req->options );
1509 fprintf( stderr, " modif=%ld,", req->modif );
1510 fprintf( stderr, " namelen=%d,", req->namelen );
1511 fprintf( stderr, " name=" );
1512 dump_varargs_unicode_str( min(cur_size,req->namelen) );
1513 fputc( ',', stderr );
1514 fprintf( stderr, " class=" );
1515 dump_varargs_unicode_str( cur_size );
1518 static void dump_create_key_reply( const struct create_key_reply *req )
1520 fprintf( stderr, " hkey=%p,", req->hkey );
1521 fprintf( stderr, " created=%d", req->created );
1524 static void dump_open_key_request( const struct open_key_request *req )
1526 fprintf( stderr, " parent=%p,", req->parent );
1527 fprintf( stderr, " access=%08x,", req->access );
1528 fprintf( stderr, " name=" );
1529 dump_varargs_unicode_str( cur_size );
1532 static void dump_open_key_reply( const struct open_key_reply *req )
1534 fprintf( stderr, " hkey=%p", req->hkey );
1537 static void dump_delete_key_request( const struct delete_key_request *req )
1539 fprintf( stderr, " hkey=%p", req->hkey );
1542 static void dump_enum_key_request( const struct enum_key_request *req )
1544 fprintf( stderr, " hkey=%p,", req->hkey );
1545 fprintf( stderr, " index=%d,", req->index );
1546 fprintf( stderr, " info_class=%d", req->info_class );
1549 static void dump_enum_key_reply( const struct enum_key_reply *req )
1551 fprintf( stderr, " subkeys=%d,", req->subkeys );
1552 fprintf( stderr, " max_subkey=%d,", req->max_subkey );
1553 fprintf( stderr, " max_class=%d,", req->max_class );
1554 fprintf( stderr, " values=%d,", req->values );
1555 fprintf( stderr, " max_value=%d,", req->max_value );
1556 fprintf( stderr, " max_data=%d,", req->max_data );
1557 fprintf( stderr, " modif=%ld,", req->modif );
1558 fprintf( stderr, " total=%d,", req->total );
1559 fprintf( stderr, " namelen=%d,", req->namelen );
1560 fprintf( stderr, " name=" );
1561 dump_varargs_unicode_str( min(cur_size,req->namelen) );
1562 fputc( ',', stderr );
1563 fprintf( stderr, " class=" );
1564 dump_varargs_unicode_str( cur_size );
1567 static void dump_set_key_value_request( const struct set_key_value_request *req )
1569 fprintf( stderr, " hkey=%p,", req->hkey );
1570 fprintf( stderr, " type=%d,", req->type );
1571 fprintf( stderr, " namelen=%d,", req->namelen );
1572 fprintf( stderr, " name=" );
1573 dump_varargs_unicode_str( min(cur_size,req->namelen) );
1574 fputc( ',', stderr );
1575 fprintf( stderr, " data=" );
1576 dump_varargs_bytes( cur_size );
1579 static void dump_get_key_value_request( const struct get_key_value_request *req )
1581 fprintf( stderr, " hkey=%p,", req->hkey );
1582 fprintf( stderr, " name=" );
1583 dump_varargs_unicode_str( cur_size );
1586 static void dump_get_key_value_reply( const struct get_key_value_reply *req )
1588 fprintf( stderr, " type=%d,", req->type );
1589 fprintf( stderr, " total=%d,", req->total );
1590 fprintf( stderr, " data=" );
1591 dump_varargs_bytes( cur_size );
1594 static void dump_enum_key_value_request( const struct enum_key_value_request *req )
1596 fprintf( stderr, " hkey=%p,", req->hkey );
1597 fprintf( stderr, " index=%d,", req->index );
1598 fprintf( stderr, " info_class=%d", req->info_class );
1601 static void dump_enum_key_value_reply( const struct enum_key_value_reply *req )
1603 fprintf( stderr, " type=%d,", req->type );
1604 fprintf( stderr, " total=%d,", req->total );
1605 fprintf( stderr, " namelen=%d,", req->namelen );
1606 fprintf( stderr, " name=" );
1607 dump_varargs_unicode_str( min(cur_size,req->namelen) );
1608 fputc( ',', stderr );
1609 fprintf( stderr, " data=" );
1610 dump_varargs_bytes( cur_size );
1613 static void dump_delete_key_value_request( const struct delete_key_value_request *req )
1615 fprintf( stderr, " hkey=%p,", req->hkey );
1616 fprintf( stderr, " name=" );
1617 dump_varargs_unicode_str( cur_size );
1620 static void dump_load_registry_request( const struct load_registry_request *req )
1622 fprintf( stderr, " hkey=%p,", req->hkey );
1623 fprintf( stderr, " file=%p,", req->file );
1624 fprintf( stderr, " name=" );
1625 dump_varargs_unicode_str( cur_size );
1628 static void dump_save_registry_request( const struct save_registry_request *req )
1630 fprintf( stderr, " hkey=%p,", req->hkey );
1631 fprintf( stderr, " file=%p", req->file );
1634 static void dump_save_registry_atexit_request( const struct save_registry_atexit_request *req )
1636 fprintf( stderr, " hkey=%p,", req->hkey );
1637 fprintf( stderr, " file=" );
1638 dump_varargs_string( cur_size );
1641 static void dump_set_registry_levels_request( const struct set_registry_levels_request *req )
1643 fprintf( stderr, " current=%d,", req->current );
1644 fprintf( stderr, " saving=%d,", req->saving );
1645 fprintf( stderr, " period=%d", req->period );
1648 static void dump_set_registry_notification_request( const struct set_registry_notification_request *req )
1650 fprintf( stderr, " hkey=%p,", req->hkey );
1651 fprintf( stderr, " event=%p,", req->event );
1652 fprintf( stderr, " subtree=%d,", req->subtree );
1653 fprintf( stderr, " filter=%08x", req->filter );
1656 static void dump_create_timer_request( const struct create_timer_request *req )
1658 fprintf( stderr, " inherit=%d,", req->inherit );
1659 fprintf( stderr, " manual=%d,", req->manual );
1660 fprintf( stderr, " name=" );
1661 dump_varargs_unicode_str( cur_size );
1664 static void dump_create_timer_reply( const struct create_timer_reply *req )
1666 fprintf( stderr, " handle=%p", req->handle );
1669 static void dump_open_timer_request( const struct open_timer_request *req )
1671 fprintf( stderr, " access=%08x,", req->access );
1672 fprintf( stderr, " inherit=%d,", req->inherit );
1673 fprintf( stderr, " name=" );
1674 dump_varargs_unicode_str( cur_size );
1677 static void dump_open_timer_reply( const struct open_timer_reply *req )
1679 fprintf( stderr, " handle=%p", req->handle );
1682 static void dump_set_timer_request( const struct set_timer_request *req )
1684 fprintf( stderr, " handle=%p,", req->handle );
1685 fprintf( stderr, " expire=" );
1686 dump_abs_time( &req->expire );
1687 fprintf( stderr, "," );
1688 fprintf( stderr, " period=%d,", req->period );
1689 fprintf( stderr, " callback=%p,", req->callback );
1690 fprintf( stderr, " arg=%p", req->arg );
1693 static void dump_set_timer_reply( const struct set_timer_reply *req )
1695 fprintf( stderr, " signaled=%d", req->signaled );
1698 static void dump_cancel_timer_request( const struct cancel_timer_request *req )
1700 fprintf( stderr, " handle=%p", req->handle );
1703 static void dump_cancel_timer_reply( const struct cancel_timer_reply *req )
1705 fprintf( stderr, " signaled=%d", req->signaled );
1708 static void dump_get_thread_context_request( const struct get_thread_context_request *req )
1710 fprintf( stderr, " handle=%p,", req->handle );
1711 fprintf( stderr, " flags=%08x", req->flags );
1714 static void dump_get_thread_context_reply( const struct get_thread_context_reply *req )
1716 fprintf( stderr, " context=" );
1717 dump_varargs_context( cur_size );
1720 static void dump_set_thread_context_request( const struct set_thread_context_request *req )
1722 fprintf( stderr, " handle=%p,", req->handle );
1723 fprintf( stderr, " flags=%08x,", req->flags );
1724 fprintf( stderr, " context=" );
1725 dump_varargs_context( cur_size );
1728 static void dump_get_selector_entry_request( const struct get_selector_entry_request *req )
1730 fprintf( stderr, " handle=%p,", req->handle );
1731 fprintf( stderr, " entry=%d", req->entry );
1734 static void dump_get_selector_entry_reply( const struct get_selector_entry_reply *req )
1736 fprintf( stderr, " base=%08x,", req->base );
1737 fprintf( stderr, " limit=%08x,", req->limit );
1738 fprintf( stderr, " flags=%02x", req->flags );
1741 static void dump_add_atom_request( const struct add_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_add_atom_reply( const struct add_atom_reply *req )
1750 fprintf( stderr, " atom=%04x", req->atom );
1753 static void dump_delete_atom_request( const struct delete_atom_request *req )
1755 fprintf( stderr, " atom=%04x,", req->atom );
1756 fprintf( stderr, " local=%d", req->local );
1759 static void dump_find_atom_request( const struct find_atom_request *req )
1761 fprintf( stderr, " local=%d,", req->local );
1762 fprintf( stderr, " name=" );
1763 dump_varargs_unicode_str( cur_size );
1766 static void dump_find_atom_reply( const struct find_atom_reply *req )
1768 fprintf( stderr, " atom=%04x", req->atom );
1771 static void dump_get_atom_name_request( const struct get_atom_name_request *req )
1773 fprintf( stderr, " atom=%04x,", req->atom );
1774 fprintf( stderr, " local=%d", req->local );
1777 static void dump_get_atom_name_reply( const struct get_atom_name_reply *req )
1779 fprintf( stderr, " count=%d,", req->count );
1780 fprintf( stderr, " name=" );
1781 dump_varargs_unicode_str( cur_size );
1784 static void dump_init_atom_table_request( const struct init_atom_table_request *req )
1786 fprintf( stderr, " entries=%d", req->entries );
1789 static void dump_get_msg_queue_request( const struct get_msg_queue_request *req )
1793 static void dump_get_msg_queue_reply( const struct get_msg_queue_reply *req )
1795 fprintf( stderr, " handle=%p", req->handle );
1798 static void dump_set_queue_mask_request( const struct set_queue_mask_request *req )
1800 fprintf( stderr, " wake_mask=%08x,", req->wake_mask );
1801 fprintf( stderr, " changed_mask=%08x,", req->changed_mask );
1802 fprintf( stderr, " skip_wait=%d", req->skip_wait );
1805 static void dump_set_queue_mask_reply( const struct set_queue_mask_reply *req )
1807 fprintf( stderr, " wake_bits=%08x,", req->wake_bits );
1808 fprintf( stderr, " changed_bits=%08x", req->changed_bits );
1811 static void dump_get_queue_status_request( const struct get_queue_status_request *req )
1813 fprintf( stderr, " clear=%d", req->clear );
1816 static void dump_get_queue_status_reply( const struct get_queue_status_reply *req )
1818 fprintf( stderr, " wake_bits=%08x,", req->wake_bits );
1819 fprintf( stderr, " changed_bits=%08x", req->changed_bits );
1822 static void dump_wait_input_idle_request( const struct wait_input_idle_request *req )
1824 fprintf( stderr, " handle=%p,", req->handle );
1825 fprintf( stderr, " timeout=%d", req->timeout );
1828 static void dump_wait_input_idle_reply( const struct wait_input_idle_reply *req )
1830 fprintf( stderr, " event=%p", req->event );
1833 static void dump_send_message_request( const struct send_message_request *req )
1835 fprintf( stderr, " id=%04x,", req->id );
1836 fprintf( stderr, " type=%d,", req->type );
1837 fprintf( stderr, " flags=%d,", req->flags );
1838 fprintf( stderr, " win=%p,", req->win );
1839 fprintf( stderr, " msg=%08x,", req->msg );
1840 fprintf( stderr, " wparam=%08x,", req->wparam );
1841 fprintf( stderr, " lparam=%08x,", req->lparam );
1842 fprintf( stderr, " x=%d,", req->x );
1843 fprintf( stderr, " y=%d,", req->y );
1844 fprintf( stderr, " time=%08x,", req->time );
1845 fprintf( stderr, " info=%08x,", req->info );
1846 fprintf( stderr, " timeout=%d,", req->timeout );
1847 fprintf( stderr, " callback=%p,", req->callback );
1848 fprintf( stderr, " data=" );
1849 dump_varargs_bytes( cur_size );
1852 static void dump_get_message_request( const struct get_message_request *req )
1854 fprintf( stderr, " flags=%d,", req->flags );
1855 fprintf( stderr, " get_win=%p,", req->get_win );
1856 fprintf( stderr, " get_first=%08x,", req->get_first );
1857 fprintf( stderr, " get_last=%08x", req->get_last );
1860 static void dump_get_message_reply( const struct get_message_reply *req )
1862 fprintf( stderr, " type=%d,", req->type );
1863 fprintf( stderr, " win=%p,", req->win );
1864 fprintf( stderr, " msg=%08x,", req->msg );
1865 fprintf( stderr, " wparam=%08x,", req->wparam );
1866 fprintf( stderr, " lparam=%08x,", req->lparam );
1867 fprintf( stderr, " x=%d,", req->x );
1868 fprintf( stderr, " y=%d,", req->y );
1869 fprintf( stderr, " time=%08x,", req->time );
1870 fprintf( stderr, " info=%08x,", req->info );
1871 fprintf( stderr, " total=%d,", req->total );
1872 fprintf( stderr, " data=" );
1873 dump_varargs_bytes( cur_size );
1876 static void dump_reply_message_request( const struct reply_message_request *req )
1878 fprintf( stderr, " type=%d,", req->type );
1879 fprintf( stderr, " result=%08x,", req->result );
1880 fprintf( stderr, " remove=%d,", req->remove );
1881 fprintf( stderr, " data=" );
1882 dump_varargs_bytes( cur_size );
1885 static void dump_get_message_reply_request( const struct get_message_reply_request *req )
1887 fprintf( stderr, " cancel=%d", req->cancel );
1890 static void dump_get_message_reply_reply( const struct get_message_reply_reply *req )
1892 fprintf( stderr, " result=%08x,", req->result );
1893 fprintf( stderr, " data=" );
1894 dump_varargs_bytes( cur_size );
1897 static void dump_set_win_timer_request( const struct set_win_timer_request *req )
1899 fprintf( stderr, " win=%p,", req->win );
1900 fprintf( stderr, " msg=%08x,", req->msg );
1901 fprintf( stderr, " id=%08x,", req->id );
1902 fprintf( stderr, " rate=%08x,", req->rate );
1903 fprintf( stderr, " lparam=%08x", req->lparam );
1906 static void dump_kill_win_timer_request( const struct kill_win_timer_request *req )
1908 fprintf( stderr, " win=%p,", req->win );
1909 fprintf( stderr, " msg=%08x,", req->msg );
1910 fprintf( stderr, " id=%08x", req->id );
1913 static void dump_create_serial_request( const struct create_serial_request *req )
1915 fprintf( stderr, " access=%08x,", req->access );
1916 fprintf( stderr, " inherit=%d,", req->inherit );
1917 fprintf( stderr, " attributes=%08x,", req->attributes );
1918 fprintf( stderr, " sharing=%08x,", req->sharing );
1919 fprintf( stderr, " name=" );
1920 dump_varargs_string( cur_size );
1923 static void dump_create_serial_reply( const struct create_serial_reply *req )
1925 fprintf( stderr, " handle=%p", req->handle );
1928 static void dump_get_serial_info_request( const struct get_serial_info_request *req )
1930 fprintf( stderr, " handle=%p", req->handle );
1933 static void dump_get_serial_info_reply( const struct get_serial_info_reply *req )
1935 fprintf( stderr, " readinterval=%08x,", req->readinterval );
1936 fprintf( stderr, " readconst=%08x,", req->readconst );
1937 fprintf( stderr, " readmult=%08x,", req->readmult );
1938 fprintf( stderr, " writeconst=%08x,", req->writeconst );
1939 fprintf( stderr, " writemult=%08x,", req->writemult );
1940 fprintf( stderr, " eventmask=%08x,", req->eventmask );
1941 fprintf( stderr, " commerror=%08x", req->commerror );
1944 static void dump_set_serial_info_request( const struct set_serial_info_request *req )
1946 fprintf( stderr, " handle=%p,", req->handle );
1947 fprintf( stderr, " flags=%d,", req->flags );
1948 fprintf( stderr, " readinterval=%08x,", req->readinterval );
1949 fprintf( stderr, " readconst=%08x,", req->readconst );
1950 fprintf( stderr, " readmult=%08x,", req->readmult );
1951 fprintf( stderr, " writeconst=%08x,", req->writeconst );
1952 fprintf( stderr, " writemult=%08x,", req->writemult );
1953 fprintf( stderr, " eventmask=%08x,", req->eventmask );
1954 fprintf( stderr, " commerror=%08x", req->commerror );
1957 static void dump_register_async_request( const struct register_async_request *req )
1959 fprintf( stderr, " handle=%p,", req->handle );
1960 fprintf( stderr, " type=%d,", req->type );
1961 fprintf( stderr, " overlapped=%p,", req->overlapped );
1962 fprintf( stderr, " count=%d,", req->count );
1963 fprintf( stderr, " status=%08x", req->status );
1966 static void dump_create_named_pipe_request( const struct create_named_pipe_request *req )
1968 fprintf( stderr, " openmode=%08x,", req->openmode );
1969 fprintf( stderr, " pipemode=%08x,", req->pipemode );
1970 fprintf( stderr, " maxinstances=%08x,", req->maxinstances );
1971 fprintf( stderr, " outsize=%08x,", req->outsize );
1972 fprintf( stderr, " insize=%08x,", req->insize );
1973 fprintf( stderr, " timeout=%08x,", req->timeout );
1974 fprintf( stderr, " name=" );
1975 dump_varargs_unicode_str( cur_size );
1978 static void dump_create_named_pipe_reply( const struct create_named_pipe_reply *req )
1980 fprintf( stderr, " handle=%p", req->handle );
1983 static void dump_open_named_pipe_request( const struct open_named_pipe_request *req )
1985 fprintf( stderr, " access=%08x,", req->access );
1986 fprintf( stderr, " inherit=%d,", req->inherit );
1987 fprintf( stderr, " name=" );
1988 dump_varargs_unicode_str( cur_size );
1991 static void dump_open_named_pipe_reply( const struct open_named_pipe_reply *req )
1993 fprintf( stderr, " handle=%p", req->handle );
1996 static void dump_connect_named_pipe_request( const struct connect_named_pipe_request *req )
1998 fprintf( stderr, " handle=%p,", req->handle );
1999 fprintf( stderr, " overlapped=%p,", req->overlapped );
2000 fprintf( stderr, " func=%p", req->func );
2003 static void dump_wait_named_pipe_request( const struct wait_named_pipe_request *req )
2005 fprintf( stderr, " timeout=%08x,", req->timeout );
2006 fprintf( stderr, " overlapped=%p,", req->overlapped );
2007 fprintf( stderr, " func=%p,", req->func );
2008 fprintf( stderr, " name=" );
2009 dump_varargs_unicode_str( cur_size );
2012 static void dump_disconnect_named_pipe_request( const struct disconnect_named_pipe_request *req )
2014 fprintf( stderr, " handle=%p", req->handle );
2017 static void dump_disconnect_named_pipe_reply( const struct disconnect_named_pipe_reply *req )
2019 fprintf( stderr, " fd=%d", req->fd );
2022 static void dump_get_named_pipe_info_request( const struct get_named_pipe_info_request *req )
2024 fprintf( stderr, " handle=%p", req->handle );
2027 static void dump_get_named_pipe_info_reply( const struct get_named_pipe_info_reply *req )
2029 fprintf( stderr, " flags=%08x,", req->flags );
2030 fprintf( stderr, " maxinstances=%08x,", req->maxinstances );
2031 fprintf( stderr, " outsize=%08x,", req->outsize );
2032 fprintf( stderr, " insize=%08x", req->insize );
2035 static void dump_create_smb_request( const struct create_smb_request *req )
2037 fprintf( stderr, " fd=%d,", req->fd );
2038 fprintf( stderr, " tree_id=%08x,", req->tree_id );
2039 fprintf( stderr, " user_id=%08x,", req->user_id );
2040 fprintf( stderr, " file_id=%08x,", req->file_id );
2041 fprintf( stderr, " dialect=%08x", req->dialect );
2044 static void dump_create_smb_reply( const struct create_smb_reply *req )
2046 fprintf( stderr, " handle=%p", req->handle );
2049 static void dump_get_smb_info_request( const struct get_smb_info_request *req )
2051 fprintf( stderr, " handle=%p,", req->handle );
2052 fprintf( stderr, " flags=%08x,", req->flags );
2053 fprintf( stderr, " offset=%08x", req->offset );
2056 static void dump_get_smb_info_reply( const struct get_smb_info_reply *req )
2058 fprintf( stderr, " tree_id=%08x,", req->tree_id );
2059 fprintf( stderr, " user_id=%08x,", req->user_id );
2060 fprintf( stderr, " dialect=%08x,", req->dialect );
2061 fprintf( stderr, " file_id=%08x,", req->file_id );
2062 fprintf( stderr, " offset=%08x", req->offset );
2065 static void dump_create_window_request( const struct create_window_request *req )
2067 fprintf( stderr, " parent=%p,", req->parent );
2068 fprintf( stderr, " owner=%p,", req->owner );
2069 fprintf( stderr, " atom=%04x", req->atom );
2072 static void dump_create_window_reply( const struct create_window_reply *req )
2074 fprintf( stderr, " handle=%p", req->handle );
2077 static void dump_link_window_request( const struct link_window_request *req )
2079 fprintf( stderr, " handle=%p,", req->handle );
2080 fprintf( stderr, " parent=%p,", req->parent );
2081 fprintf( stderr, " previous=%p", req->previous );
2084 static void dump_link_window_reply( const struct link_window_reply *req )
2086 fprintf( stderr, " full_parent=%p", req->full_parent );
2089 static void dump_destroy_window_request( const struct destroy_window_request *req )
2091 fprintf( stderr, " handle=%p", req->handle );
2094 static void dump_set_window_owner_request( const struct set_window_owner_request *req )
2096 fprintf( stderr, " handle=%p,", req->handle );
2097 fprintf( stderr, " owner=%p", req->owner );
2100 static void dump_set_window_owner_reply( const struct set_window_owner_reply *req )
2102 fprintf( stderr, " full_owner=%p,", req->full_owner );
2103 fprintf( stderr, " prev_owner=%p", req->prev_owner );
2106 static void dump_get_window_info_request( const struct get_window_info_request *req )
2108 fprintf( stderr, " handle=%p", req->handle );
2111 static void dump_get_window_info_reply( const struct get_window_info_reply *req )
2113 fprintf( stderr, " full_handle=%p,", req->full_handle );
2114 fprintf( stderr, " last_active=%p,", req->last_active );
2115 fprintf( stderr, " pid=%04x,", req->pid );
2116 fprintf( stderr, " tid=%04x,", req->tid );
2117 fprintf( stderr, " atom=%04x", req->atom );
2120 static void dump_set_window_info_request( const struct set_window_info_request *req )
2122 fprintf( stderr, " handle=%p,", req->handle );
2123 fprintf( stderr, " flags=%08x,", req->flags );
2124 fprintf( stderr, " style=%08x,", req->style );
2125 fprintf( stderr, " ex_style=%08x,", req->ex_style );
2126 fprintf( stderr, " id=%08x,", req->id );
2127 fprintf( stderr, " instance=%p,", req->instance );
2128 fprintf( stderr, " user_data=%p", req->user_data );
2131 static void dump_set_window_info_reply( const struct set_window_info_reply *req )
2133 fprintf( stderr, " old_style=%08x,", req->old_style );
2134 fprintf( stderr, " old_ex_style=%08x,", req->old_ex_style );
2135 fprintf( stderr, " old_id=%08x,", req->old_id );
2136 fprintf( stderr, " old_instance=%p,", req->old_instance );
2137 fprintf( stderr, " old_user_data=%p", req->old_user_data );
2140 static void dump_get_window_parents_request( const struct get_window_parents_request *req )
2142 fprintf( stderr, " handle=%p", req->handle );
2145 static void dump_get_window_parents_reply( const struct get_window_parents_reply *req )
2147 fprintf( stderr, " count=%d,", req->count );
2148 fprintf( stderr, " parents=" );
2149 dump_varargs_user_handles( cur_size );
2152 static void dump_get_window_children_request( const struct get_window_children_request *req )
2154 fprintf( stderr, " parent=%p,", req->parent );
2155 fprintf( stderr, " atom=%04x,", req->atom );
2156 fprintf( stderr, " tid=%04x", req->tid );
2159 static void dump_get_window_children_reply( const struct get_window_children_reply *req )
2161 fprintf( stderr, " count=%d,", req->count );
2162 fprintf( stderr, " children=" );
2163 dump_varargs_user_handles( cur_size );
2166 static void dump_get_window_tree_request( const struct get_window_tree_request *req )
2168 fprintf( stderr, " handle=%p", req->handle );
2171 static void dump_get_window_tree_reply( const struct get_window_tree_reply *req )
2173 fprintf( stderr, " parent=%p,", req->parent );
2174 fprintf( stderr, " owner=%p,", req->owner );
2175 fprintf( stderr, " next_sibling=%p,", req->next_sibling );
2176 fprintf( stderr, " prev_sibling=%p,", req->prev_sibling );
2177 fprintf( stderr, " first_sibling=%p,", req->first_sibling );
2178 fprintf( stderr, " last_sibling=%p,", req->last_sibling );
2179 fprintf( stderr, " first_child=%p,", req->first_child );
2180 fprintf( stderr, " last_child=%p", req->last_child );
2183 static void dump_set_window_rectangles_request( const struct set_window_rectangles_request *req )
2185 fprintf( stderr, " handle=%p,", req->handle );
2186 fprintf( stderr, " window=" );
2187 dump_rectangle( &req->window );
2188 fprintf( stderr, "," );
2189 fprintf( stderr, " client=" );
2190 dump_rectangle( &req->client );
2193 static void dump_get_window_rectangles_request( const struct get_window_rectangles_request *req )
2195 fprintf( stderr, " handle=%p", req->handle );
2198 static void dump_get_window_rectangles_reply( const struct get_window_rectangles_reply *req )
2200 fprintf( stderr, " window=" );
2201 dump_rectangle( &req->window );
2202 fprintf( stderr, "," );
2203 fprintf( stderr, " client=" );
2204 dump_rectangle( &req->client );
2207 static void dump_get_window_text_request( const struct get_window_text_request *req )
2209 fprintf( stderr, " handle=%p", req->handle );
2212 static void dump_get_window_text_reply( const struct get_window_text_reply *req )
2214 fprintf( stderr, " text=" );
2215 dump_varargs_unicode_str( cur_size );
2218 static void dump_set_window_text_request( const struct set_window_text_request *req )
2220 fprintf( stderr, " handle=%p,", req->handle );
2221 fprintf( stderr, " text=" );
2222 dump_varargs_unicode_str( cur_size );
2225 static void dump_inc_window_paint_count_request( const struct inc_window_paint_count_request *req )
2227 fprintf( stderr, " handle=%p,", req->handle );
2228 fprintf( stderr, " incr=%d", req->incr );
2231 static void dump_get_windows_offset_request( const struct get_windows_offset_request *req )
2233 fprintf( stderr, " from=%p,", req->from );
2234 fprintf( stderr, " to=%p", req->to );
2237 static void dump_get_windows_offset_reply( const struct get_windows_offset_reply *req )
2239 fprintf( stderr, " x=%d,", req->x );
2240 fprintf( stderr, " y=%d", req->y );
2243 static void dump_set_window_property_request( const struct set_window_property_request *req )
2245 fprintf( stderr, " window=%p,", req->window );
2246 fprintf( stderr, " atom=%04x,", req->atom );
2247 fprintf( stderr, " string=%d,", req->string );
2248 fprintf( stderr, " handle=%p", req->handle );
2251 static void dump_remove_window_property_request( const struct remove_window_property_request *req )
2253 fprintf( stderr, " window=%p,", req->window );
2254 fprintf( stderr, " atom=%04x", req->atom );
2257 static void dump_remove_window_property_reply( const struct remove_window_property_reply *req )
2259 fprintf( stderr, " handle=%p", req->handle );
2262 static void dump_get_window_property_request( const struct get_window_property_request *req )
2264 fprintf( stderr, " window=%p,", req->window );
2265 fprintf( stderr, " atom=%04x", req->atom );
2268 static void dump_get_window_property_reply( const struct get_window_property_reply *req )
2270 fprintf( stderr, " handle=%p", req->handle );
2273 static void dump_get_window_properties_request( const struct get_window_properties_request *req )
2275 fprintf( stderr, " window=%p", req->window );
2278 static void dump_get_window_properties_reply( const struct get_window_properties_reply *req )
2280 fprintf( stderr, " total=%d,", req->total );
2281 fprintf( stderr, " props=" );
2282 dump_varargs_properties( cur_size );
2285 static void dump_attach_thread_input_request( const struct attach_thread_input_request *req )
2287 fprintf( stderr, " tid_from=%04x,", req->tid_from );
2288 fprintf( stderr, " tid_to=%04x,", req->tid_to );
2289 fprintf( stderr, " attach=%d", req->attach );
2292 static void dump_get_thread_input_request( const struct get_thread_input_request *req )
2294 fprintf( stderr, " tid=%04x", req->tid );
2297 static void dump_get_thread_input_reply( const struct get_thread_input_reply *req )
2299 fprintf( stderr, " focus=%p,", req->focus );
2300 fprintf( stderr, " capture=%p,", req->capture );
2301 fprintf( stderr, " active=%p,", req->active );
2302 fprintf( stderr, " foreground=%p,", req->foreground );
2303 fprintf( stderr, " menu_owner=%p,", req->menu_owner );
2304 fprintf( stderr, " move_size=%p,", req->move_size );
2305 fprintf( stderr, " caret=%p,", req->caret );
2306 fprintf( stderr, " rect=" );
2307 dump_rectangle( &req->rect );
2310 static void dump_get_key_state_request( const struct get_key_state_request *req )
2312 fprintf( stderr, " tid=%04x,", req->tid );
2313 fprintf( stderr, " key=%d", req->key );
2316 static void dump_get_key_state_reply( const struct get_key_state_reply *req )
2318 fprintf( stderr, " state=%02x,", req->state );
2319 fprintf( stderr, " keystate=" );
2320 dump_varargs_bytes( cur_size );
2323 static void dump_set_key_state_request( const struct set_key_state_request *req )
2325 fprintf( stderr, " tid=%04x,", req->tid );
2326 fprintf( stderr, " keystate=" );
2327 dump_varargs_bytes( cur_size );
2330 static void dump_set_foreground_window_request( const struct set_foreground_window_request *req )
2332 fprintf( stderr, " handle=%p", req->handle );
2335 static void dump_set_foreground_window_reply( const struct set_foreground_window_reply *req )
2337 fprintf( stderr, " previous=%p,", req->previous );
2338 fprintf( stderr, " send_msg_old=%d,", req->send_msg_old );
2339 fprintf( stderr, " send_msg_new=%d", req->send_msg_new );
2342 static void dump_set_focus_window_request( const struct set_focus_window_request *req )
2344 fprintf( stderr, " handle=%p", req->handle );
2347 static void dump_set_focus_window_reply( const struct set_focus_window_reply *req )
2349 fprintf( stderr, " previous=%p", req->previous );
2352 static void dump_set_active_window_request( const struct set_active_window_request *req )
2354 fprintf( stderr, " handle=%p", req->handle );
2357 static void dump_set_active_window_reply( const struct set_active_window_reply *req )
2359 fprintf( stderr, " previous=%p", req->previous );
2362 static void dump_set_capture_window_request( const struct set_capture_window_request *req )
2364 fprintf( stderr, " handle=%p,", req->handle );
2365 fprintf( stderr, " flags=%08x", req->flags );
2368 static void dump_set_capture_window_reply( const struct set_capture_window_reply *req )
2370 fprintf( stderr, " previous=%p,", req->previous );
2371 fprintf( stderr, " full_handle=%p", req->full_handle );
2374 static void dump_set_caret_window_request( const struct set_caret_window_request *req )
2376 fprintf( stderr, " handle=%p,", req->handle );
2377 fprintf( stderr, " width=%d,", req->width );
2378 fprintf( stderr, " height=%d", req->height );
2381 static void dump_set_caret_window_reply( const struct set_caret_window_reply *req )
2383 fprintf( stderr, " previous=%p,", req->previous );
2384 fprintf( stderr, " old_rect=" );
2385 dump_rectangle( &req->old_rect );
2386 fprintf( stderr, "," );
2387 fprintf( stderr, " old_hide=%d,", req->old_hide );
2388 fprintf( stderr, " old_state=%d", req->old_state );
2391 static void dump_set_caret_info_request( const struct set_caret_info_request *req )
2393 fprintf( stderr, " flags=%08x,", req->flags );
2394 fprintf( stderr, " handle=%p,", req->handle );
2395 fprintf( stderr, " x=%d,", req->x );
2396 fprintf( stderr, " y=%d,", req->y );
2397 fprintf( stderr, " hide=%d,", req->hide );
2398 fprintf( stderr, " state=%d", req->state );
2401 static void dump_set_caret_info_reply( const struct set_caret_info_reply *req )
2403 fprintf( stderr, " full_handle=%p,", req->full_handle );
2404 fprintf( stderr, " old_rect=" );
2405 dump_rectangle( &req->old_rect );
2406 fprintf( stderr, "," );
2407 fprintf( stderr, " old_hide=%d,", req->old_hide );
2408 fprintf( stderr, " old_state=%d", req->old_state );
2411 static void dump_set_hook_request( const struct set_hook_request *req )
2413 fprintf( stderr, " id=%d,", req->id );
2414 fprintf( stderr, " tid=%04x,", req->tid );
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_set_hook_reply( const struct set_hook_reply *req )
2423 fprintf( stderr, " handle=%p", req->handle );
2426 static void dump_remove_hook_request( const struct remove_hook_request *req )
2428 fprintf( stderr, " handle=%p,", req->handle );
2429 fprintf( stderr, " id=%d,", req->id );
2430 fprintf( stderr, " proc=%p", req->proc );
2433 static void dump_start_hook_chain_request( const struct start_hook_chain_request *req )
2435 fprintf( stderr, " id=%d", req->id );
2438 static void dump_start_hook_chain_reply( const struct start_hook_chain_reply *req )
2440 fprintf( stderr, " handle=%p,", req->handle );
2441 fprintf( stderr, " pid=%04x,", req->pid );
2442 fprintf( stderr, " tid=%04x,", req->tid );
2443 fprintf( stderr, " proc=%p,", req->proc );
2444 fprintf( stderr, " unicode=%d,", req->unicode );
2445 fprintf( stderr, " module=" );
2446 dump_varargs_unicode_str( cur_size );
2449 static void dump_finish_hook_chain_request( const struct finish_hook_chain_request *req )
2451 fprintf( stderr, " id=%d", req->id );
2454 static void dump_get_next_hook_request( const struct get_next_hook_request *req )
2456 fprintf( stderr, " handle=%p", req->handle );
2459 static void dump_get_next_hook_reply( const struct get_next_hook_reply *req )
2461 fprintf( stderr, " next=%p,", req->next );
2462 fprintf( stderr, " id=%d,", req->id );
2463 fprintf( stderr, " pid=%04x,", req->pid );
2464 fprintf( stderr, " tid=%04x,", req->tid );
2465 fprintf( stderr, " proc=%p,", req->proc );
2466 fprintf( stderr, " prev_unicode=%d,", req->prev_unicode );
2467 fprintf( stderr, " next_unicode=%d,", req->next_unicode );
2468 fprintf( stderr, " module=" );
2469 dump_varargs_unicode_str( cur_size );
2472 static void dump_set_clipboard_info_request( const struct set_clipboard_info_request *req )
2474 fprintf( stderr, " flags=%08x,", req->flags );
2475 fprintf( stderr, " clipboard=%p,", req->clipboard );
2476 fprintf( stderr, " owner=%p,", req->owner );
2477 fprintf( stderr, " viewer=%p,", req->viewer );
2478 fprintf( stderr, " seqno=%08x", req->seqno );
2481 static void dump_set_clipboard_info_reply( const struct set_clipboard_info_reply *req )
2483 fprintf( stderr, " flags=%08x,", req->flags );
2484 fprintf( stderr, " old_clipboard=%p,", req->old_clipboard );
2485 fprintf( stderr, " old_owner=%p,", req->old_owner );
2486 fprintf( stderr, " old_viewer=%p,", req->old_viewer );
2487 fprintf( stderr, " seqno=%08x", req->seqno );
2490 static void dump_open_token_request( const struct open_token_request *req )
2492 fprintf( stderr, " handle=%p,", req->handle );
2493 fprintf( stderr, " flags=%08x", req->flags );
2496 static void dump_open_token_reply( const struct open_token_reply *req )
2498 fprintf( stderr, " token=%p", req->token );
2501 static const dump_func req_dumpers[REQ_NB_REQUESTS] = {
2502 (dump_func)dump_new_process_request,
2503 (dump_func)dump_get_new_process_info_request,
2504 (dump_func)dump_new_thread_request,
2505 (dump_func)dump_boot_done_request,
2506 (dump_func)dump_init_process_request,
2507 (dump_func)dump_get_startup_info_request,
2508 (dump_func)dump_init_process_done_request,
2509 (dump_func)dump_init_thread_request,
2510 (dump_func)dump_terminate_process_request,
2511 (dump_func)dump_terminate_thread_request,
2512 (dump_func)dump_get_process_info_request,
2513 (dump_func)dump_set_process_info_request,
2514 (dump_func)dump_get_thread_info_request,
2515 (dump_func)dump_set_thread_info_request,
2516 (dump_func)dump_get_dll_info_request,
2517 (dump_func)dump_suspend_thread_request,
2518 (dump_func)dump_resume_thread_request,
2519 (dump_func)dump_load_dll_request,
2520 (dump_func)dump_unload_dll_request,
2521 (dump_func)dump_queue_apc_request,
2522 (dump_func)dump_get_apc_request,
2523 (dump_func)dump_close_handle_request,
2524 (dump_func)dump_set_handle_info_request,
2525 (dump_func)dump_dup_handle_request,
2526 (dump_func)dump_open_process_request,
2527 (dump_func)dump_open_thread_request,
2528 (dump_func)dump_select_request,
2529 (dump_func)dump_create_event_request,
2530 (dump_func)dump_event_op_request,
2531 (dump_func)dump_open_event_request,
2532 (dump_func)dump_create_mutex_request,
2533 (dump_func)dump_release_mutex_request,
2534 (dump_func)dump_open_mutex_request,
2535 (dump_func)dump_create_semaphore_request,
2536 (dump_func)dump_release_semaphore_request,
2537 (dump_func)dump_open_semaphore_request,
2538 (dump_func)dump_create_file_request,
2539 (dump_func)dump_alloc_file_handle_request,
2540 (dump_func)dump_get_handle_fd_request,
2541 (dump_func)dump_set_file_pointer_request,
2542 (dump_func)dump_truncate_file_request,
2543 (dump_func)dump_set_file_time_request,
2544 (dump_func)dump_flush_file_request,
2545 (dump_func)dump_get_file_info_request,
2546 (dump_func)dump_lock_file_request,
2547 (dump_func)dump_unlock_file_request,
2548 (dump_func)dump_create_socket_request,
2549 (dump_func)dump_accept_socket_request,
2550 (dump_func)dump_set_socket_event_request,
2551 (dump_func)dump_get_socket_event_request,
2552 (dump_func)dump_enable_socket_event_request,
2553 (dump_func)dump_set_socket_deferred_request,
2554 (dump_func)dump_alloc_console_request,
2555 (dump_func)dump_free_console_request,
2556 (dump_func)dump_get_console_renderer_events_request,
2557 (dump_func)dump_open_console_request,
2558 (dump_func)dump_get_console_wait_event_request,
2559 (dump_func)dump_get_console_mode_request,
2560 (dump_func)dump_set_console_mode_request,
2561 (dump_func)dump_set_console_input_info_request,
2562 (dump_func)dump_get_console_input_info_request,
2563 (dump_func)dump_append_console_input_history_request,
2564 (dump_func)dump_get_console_input_history_request,
2565 (dump_func)dump_create_console_output_request,
2566 (dump_func)dump_set_console_output_info_request,
2567 (dump_func)dump_get_console_output_info_request,
2568 (dump_func)dump_write_console_input_request,
2569 (dump_func)dump_read_console_input_request,
2570 (dump_func)dump_write_console_output_request,
2571 (dump_func)dump_fill_console_output_request,
2572 (dump_func)dump_read_console_output_request,
2573 (dump_func)dump_move_console_output_request,
2574 (dump_func)dump_send_console_signal_request,
2575 (dump_func)dump_create_change_notification_request,
2576 (dump_func)dump_next_change_notification_request,
2577 (dump_func)dump_create_mapping_request,
2578 (dump_func)dump_open_mapping_request,
2579 (dump_func)dump_get_mapping_info_request,
2580 (dump_func)dump_create_device_request,
2581 (dump_func)dump_get_device_id_request,
2582 (dump_func)dump_create_snapshot_request,
2583 (dump_func)dump_next_process_request,
2584 (dump_func)dump_next_thread_request,
2585 (dump_func)dump_next_module_request,
2586 (dump_func)dump_wait_debug_event_request,
2587 (dump_func)dump_queue_exception_event_request,
2588 (dump_func)dump_get_exception_status_request,
2589 (dump_func)dump_output_debug_string_request,
2590 (dump_func)dump_continue_debug_event_request,
2591 (dump_func)dump_debug_process_request,
2592 (dump_func)dump_debug_break_request,
2593 (dump_func)dump_set_debugger_kill_on_exit_request,
2594 (dump_func)dump_read_process_memory_request,
2595 (dump_func)dump_write_process_memory_request,
2596 (dump_func)dump_create_key_request,
2597 (dump_func)dump_open_key_request,
2598 (dump_func)dump_delete_key_request,
2599 (dump_func)dump_enum_key_request,
2600 (dump_func)dump_set_key_value_request,
2601 (dump_func)dump_get_key_value_request,
2602 (dump_func)dump_enum_key_value_request,
2603 (dump_func)dump_delete_key_value_request,
2604 (dump_func)dump_load_registry_request,
2605 (dump_func)dump_save_registry_request,
2606 (dump_func)dump_save_registry_atexit_request,
2607 (dump_func)dump_set_registry_levels_request,
2608 (dump_func)dump_set_registry_notification_request,
2609 (dump_func)dump_create_timer_request,
2610 (dump_func)dump_open_timer_request,
2611 (dump_func)dump_set_timer_request,
2612 (dump_func)dump_cancel_timer_request,
2613 (dump_func)dump_get_thread_context_request,
2614 (dump_func)dump_set_thread_context_request,
2615 (dump_func)dump_get_selector_entry_request,
2616 (dump_func)dump_add_atom_request,
2617 (dump_func)dump_delete_atom_request,
2618 (dump_func)dump_find_atom_request,
2619 (dump_func)dump_get_atom_name_request,
2620 (dump_func)dump_init_atom_table_request,
2621 (dump_func)dump_get_msg_queue_request,
2622 (dump_func)dump_set_queue_mask_request,
2623 (dump_func)dump_get_queue_status_request,
2624 (dump_func)dump_wait_input_idle_request,
2625 (dump_func)dump_send_message_request,
2626 (dump_func)dump_get_message_request,
2627 (dump_func)dump_reply_message_request,
2628 (dump_func)dump_get_message_reply_request,
2629 (dump_func)dump_set_win_timer_request,
2630 (dump_func)dump_kill_win_timer_request,
2631 (dump_func)dump_create_serial_request,
2632 (dump_func)dump_get_serial_info_request,
2633 (dump_func)dump_set_serial_info_request,
2634 (dump_func)dump_register_async_request,
2635 (dump_func)dump_create_named_pipe_request,
2636 (dump_func)dump_open_named_pipe_request,
2637 (dump_func)dump_connect_named_pipe_request,
2638 (dump_func)dump_wait_named_pipe_request,
2639 (dump_func)dump_disconnect_named_pipe_request,
2640 (dump_func)dump_get_named_pipe_info_request,
2641 (dump_func)dump_create_smb_request,
2642 (dump_func)dump_get_smb_info_request,
2643 (dump_func)dump_create_window_request,
2644 (dump_func)dump_link_window_request,
2645 (dump_func)dump_destroy_window_request,
2646 (dump_func)dump_set_window_owner_request,
2647 (dump_func)dump_get_window_info_request,
2648 (dump_func)dump_set_window_info_request,
2649 (dump_func)dump_get_window_parents_request,
2650 (dump_func)dump_get_window_children_request,
2651 (dump_func)dump_get_window_tree_request,
2652 (dump_func)dump_set_window_rectangles_request,
2653 (dump_func)dump_get_window_rectangles_request,
2654 (dump_func)dump_get_window_text_request,
2655 (dump_func)dump_set_window_text_request,
2656 (dump_func)dump_inc_window_paint_count_request,
2657 (dump_func)dump_get_windows_offset_request,
2658 (dump_func)dump_set_window_property_request,
2659 (dump_func)dump_remove_window_property_request,
2660 (dump_func)dump_get_window_property_request,
2661 (dump_func)dump_get_window_properties_request,
2662 (dump_func)dump_attach_thread_input_request,
2663 (dump_func)dump_get_thread_input_request,
2664 (dump_func)dump_get_key_state_request,
2665 (dump_func)dump_set_key_state_request,
2666 (dump_func)dump_set_foreground_window_request,
2667 (dump_func)dump_set_focus_window_request,
2668 (dump_func)dump_set_active_window_request,
2669 (dump_func)dump_set_capture_window_request,
2670 (dump_func)dump_set_caret_window_request,
2671 (dump_func)dump_set_caret_info_request,
2672 (dump_func)dump_set_hook_request,
2673 (dump_func)dump_remove_hook_request,
2674 (dump_func)dump_start_hook_chain_request,
2675 (dump_func)dump_finish_hook_chain_request,
2676 (dump_func)dump_get_next_hook_request,
2677 (dump_func)dump_set_clipboard_info_request,
2678 (dump_func)dump_open_token_request,
2681 static const dump_func reply_dumpers[REQ_NB_REQUESTS] = {
2682 (dump_func)dump_new_process_reply,
2683 (dump_func)dump_get_new_process_info_reply,
2684 (dump_func)dump_new_thread_reply,
2685 (dump_func)0,
2686 (dump_func)dump_init_process_reply,
2687 (dump_func)dump_get_startup_info_reply,
2688 (dump_func)dump_init_process_done_reply,
2689 (dump_func)dump_init_thread_reply,
2690 (dump_func)dump_terminate_process_reply,
2691 (dump_func)dump_terminate_thread_reply,
2692 (dump_func)dump_get_process_info_reply,
2693 (dump_func)0,
2694 (dump_func)dump_get_thread_info_reply,
2695 (dump_func)0,
2696 (dump_func)dump_get_dll_info_reply,
2697 (dump_func)dump_suspend_thread_reply,
2698 (dump_func)dump_resume_thread_reply,
2699 (dump_func)0,
2700 (dump_func)0,
2701 (dump_func)0,
2702 (dump_func)dump_get_apc_reply,
2703 (dump_func)dump_close_handle_reply,
2704 (dump_func)dump_set_handle_info_reply,
2705 (dump_func)dump_dup_handle_reply,
2706 (dump_func)dump_open_process_reply,
2707 (dump_func)dump_open_thread_reply,
2708 (dump_func)0,
2709 (dump_func)dump_create_event_reply,
2710 (dump_func)0,
2711 (dump_func)dump_open_event_reply,
2712 (dump_func)dump_create_mutex_reply,
2713 (dump_func)0,
2714 (dump_func)dump_open_mutex_reply,
2715 (dump_func)dump_create_semaphore_reply,
2716 (dump_func)dump_release_semaphore_reply,
2717 (dump_func)dump_open_semaphore_reply,
2718 (dump_func)dump_create_file_reply,
2719 (dump_func)dump_alloc_file_handle_reply,
2720 (dump_func)dump_get_handle_fd_reply,
2721 (dump_func)dump_set_file_pointer_reply,
2722 (dump_func)0,
2723 (dump_func)0,
2724 (dump_func)dump_flush_file_reply,
2725 (dump_func)dump_get_file_info_reply,
2726 (dump_func)dump_lock_file_reply,
2727 (dump_func)0,
2728 (dump_func)dump_create_socket_reply,
2729 (dump_func)dump_accept_socket_reply,
2730 (dump_func)0,
2731 (dump_func)dump_get_socket_event_reply,
2732 (dump_func)0,
2733 (dump_func)0,
2734 (dump_func)dump_alloc_console_reply,
2735 (dump_func)0,
2736 (dump_func)dump_get_console_renderer_events_reply,
2737 (dump_func)dump_open_console_reply,
2738 (dump_func)dump_get_console_wait_event_reply,
2739 (dump_func)dump_get_console_mode_reply,
2740 (dump_func)0,
2741 (dump_func)0,
2742 (dump_func)dump_get_console_input_info_reply,
2743 (dump_func)0,
2744 (dump_func)dump_get_console_input_history_reply,
2745 (dump_func)dump_create_console_output_reply,
2746 (dump_func)0,
2747 (dump_func)dump_get_console_output_info_reply,
2748 (dump_func)dump_write_console_input_reply,
2749 (dump_func)dump_read_console_input_reply,
2750 (dump_func)dump_write_console_output_reply,
2751 (dump_func)dump_fill_console_output_reply,
2752 (dump_func)dump_read_console_output_reply,
2753 (dump_func)0,
2754 (dump_func)0,
2755 (dump_func)dump_create_change_notification_reply,
2756 (dump_func)0,
2757 (dump_func)dump_create_mapping_reply,
2758 (dump_func)dump_open_mapping_reply,
2759 (dump_func)dump_get_mapping_info_reply,
2760 (dump_func)dump_create_device_reply,
2761 (dump_func)dump_get_device_id_reply,
2762 (dump_func)dump_create_snapshot_reply,
2763 (dump_func)dump_next_process_reply,
2764 (dump_func)dump_next_thread_reply,
2765 (dump_func)dump_next_module_reply,
2766 (dump_func)dump_wait_debug_event_reply,
2767 (dump_func)dump_queue_exception_event_reply,
2768 (dump_func)dump_get_exception_status_reply,
2769 (dump_func)0,
2770 (dump_func)0,
2771 (dump_func)0,
2772 (dump_func)dump_debug_break_reply,
2773 (dump_func)0,
2774 (dump_func)dump_read_process_memory_reply,
2775 (dump_func)0,
2776 (dump_func)dump_create_key_reply,
2777 (dump_func)dump_open_key_reply,
2778 (dump_func)0,
2779 (dump_func)dump_enum_key_reply,
2780 (dump_func)0,
2781 (dump_func)dump_get_key_value_reply,
2782 (dump_func)dump_enum_key_value_reply,
2783 (dump_func)0,
2784 (dump_func)0,
2785 (dump_func)0,
2786 (dump_func)0,
2787 (dump_func)0,
2788 (dump_func)0,
2789 (dump_func)dump_create_timer_reply,
2790 (dump_func)dump_open_timer_reply,
2791 (dump_func)dump_set_timer_reply,
2792 (dump_func)dump_cancel_timer_reply,
2793 (dump_func)dump_get_thread_context_reply,
2794 (dump_func)0,
2795 (dump_func)dump_get_selector_entry_reply,
2796 (dump_func)dump_add_atom_reply,
2797 (dump_func)0,
2798 (dump_func)dump_find_atom_reply,
2799 (dump_func)dump_get_atom_name_reply,
2800 (dump_func)0,
2801 (dump_func)dump_get_msg_queue_reply,
2802 (dump_func)dump_set_queue_mask_reply,
2803 (dump_func)dump_get_queue_status_reply,
2804 (dump_func)dump_wait_input_idle_reply,
2805 (dump_func)0,
2806 (dump_func)dump_get_message_reply,
2807 (dump_func)0,
2808 (dump_func)dump_get_message_reply_reply,
2809 (dump_func)0,
2810 (dump_func)0,
2811 (dump_func)dump_create_serial_reply,
2812 (dump_func)dump_get_serial_info_reply,
2813 (dump_func)0,
2814 (dump_func)0,
2815 (dump_func)dump_create_named_pipe_reply,
2816 (dump_func)dump_open_named_pipe_reply,
2817 (dump_func)0,
2818 (dump_func)0,
2819 (dump_func)dump_disconnect_named_pipe_reply,
2820 (dump_func)dump_get_named_pipe_info_reply,
2821 (dump_func)dump_create_smb_reply,
2822 (dump_func)dump_get_smb_info_reply,
2823 (dump_func)dump_create_window_reply,
2824 (dump_func)dump_link_window_reply,
2825 (dump_func)0,
2826 (dump_func)dump_set_window_owner_reply,
2827 (dump_func)dump_get_window_info_reply,
2828 (dump_func)dump_set_window_info_reply,
2829 (dump_func)dump_get_window_parents_reply,
2830 (dump_func)dump_get_window_children_reply,
2831 (dump_func)dump_get_window_tree_reply,
2832 (dump_func)0,
2833 (dump_func)dump_get_window_rectangles_reply,
2834 (dump_func)dump_get_window_text_reply,
2835 (dump_func)0,
2836 (dump_func)0,
2837 (dump_func)dump_get_windows_offset_reply,
2838 (dump_func)0,
2839 (dump_func)dump_remove_window_property_reply,
2840 (dump_func)dump_get_window_property_reply,
2841 (dump_func)dump_get_window_properties_reply,
2842 (dump_func)0,
2843 (dump_func)dump_get_thread_input_reply,
2844 (dump_func)dump_get_key_state_reply,
2845 (dump_func)0,
2846 (dump_func)dump_set_foreground_window_reply,
2847 (dump_func)dump_set_focus_window_reply,
2848 (dump_func)dump_set_active_window_reply,
2849 (dump_func)dump_set_capture_window_reply,
2850 (dump_func)dump_set_caret_window_reply,
2851 (dump_func)dump_set_caret_info_reply,
2852 (dump_func)dump_set_hook_reply,
2853 (dump_func)0,
2854 (dump_func)dump_start_hook_chain_reply,
2855 (dump_func)0,
2856 (dump_func)dump_get_next_hook_reply,
2857 (dump_func)dump_set_clipboard_info_reply,
2858 (dump_func)dump_open_token_reply,
2861 static const char * const req_names[REQ_NB_REQUESTS] = {
2862 "new_process",
2863 "get_new_process_info",
2864 "new_thread",
2865 "boot_done",
2866 "init_process",
2867 "get_startup_info",
2868 "init_process_done",
2869 "init_thread",
2870 "terminate_process",
2871 "terminate_thread",
2872 "get_process_info",
2873 "set_process_info",
2874 "get_thread_info",
2875 "set_thread_info",
2876 "get_dll_info",
2877 "suspend_thread",
2878 "resume_thread",
2879 "load_dll",
2880 "unload_dll",
2881 "queue_apc",
2882 "get_apc",
2883 "close_handle",
2884 "set_handle_info",
2885 "dup_handle",
2886 "open_process",
2887 "open_thread",
2888 "select",
2889 "create_event",
2890 "event_op",
2891 "open_event",
2892 "create_mutex",
2893 "release_mutex",
2894 "open_mutex",
2895 "create_semaphore",
2896 "release_semaphore",
2897 "open_semaphore",
2898 "create_file",
2899 "alloc_file_handle",
2900 "get_handle_fd",
2901 "set_file_pointer",
2902 "truncate_file",
2903 "set_file_time",
2904 "flush_file",
2905 "get_file_info",
2906 "lock_file",
2907 "unlock_file",
2908 "create_socket",
2909 "accept_socket",
2910 "set_socket_event",
2911 "get_socket_event",
2912 "enable_socket_event",
2913 "set_socket_deferred",
2914 "alloc_console",
2915 "free_console",
2916 "get_console_renderer_events",
2917 "open_console",
2918 "get_console_wait_event",
2919 "get_console_mode",
2920 "set_console_mode",
2921 "set_console_input_info",
2922 "get_console_input_info",
2923 "append_console_input_history",
2924 "get_console_input_history",
2925 "create_console_output",
2926 "set_console_output_info",
2927 "get_console_output_info",
2928 "write_console_input",
2929 "read_console_input",
2930 "write_console_output",
2931 "fill_console_output",
2932 "read_console_output",
2933 "move_console_output",
2934 "send_console_signal",
2935 "create_change_notification",
2936 "next_change_notification",
2937 "create_mapping",
2938 "open_mapping",
2939 "get_mapping_info",
2940 "create_device",
2941 "get_device_id",
2942 "create_snapshot",
2943 "next_process",
2944 "next_thread",
2945 "next_module",
2946 "wait_debug_event",
2947 "queue_exception_event",
2948 "get_exception_status",
2949 "output_debug_string",
2950 "continue_debug_event",
2951 "debug_process",
2952 "debug_break",
2953 "set_debugger_kill_on_exit",
2954 "read_process_memory",
2955 "write_process_memory",
2956 "create_key",
2957 "open_key",
2958 "delete_key",
2959 "enum_key",
2960 "set_key_value",
2961 "get_key_value",
2962 "enum_key_value",
2963 "delete_key_value",
2964 "load_registry",
2965 "save_registry",
2966 "save_registry_atexit",
2967 "set_registry_levels",
2968 "set_registry_notification",
2969 "create_timer",
2970 "open_timer",
2971 "set_timer",
2972 "cancel_timer",
2973 "get_thread_context",
2974 "set_thread_context",
2975 "get_selector_entry",
2976 "add_atom",
2977 "delete_atom",
2978 "find_atom",
2979 "get_atom_name",
2980 "init_atom_table",
2981 "get_msg_queue",
2982 "set_queue_mask",
2983 "get_queue_status",
2984 "wait_input_idle",
2985 "send_message",
2986 "get_message",
2987 "reply_message",
2988 "get_message_reply",
2989 "set_win_timer",
2990 "kill_win_timer",
2991 "create_serial",
2992 "get_serial_info",
2993 "set_serial_info",
2994 "register_async",
2995 "create_named_pipe",
2996 "open_named_pipe",
2997 "connect_named_pipe",
2998 "wait_named_pipe",
2999 "disconnect_named_pipe",
3000 "get_named_pipe_info",
3001 "create_smb",
3002 "get_smb_info",
3003 "create_window",
3004 "link_window",
3005 "destroy_window",
3006 "set_window_owner",
3007 "get_window_info",
3008 "set_window_info",
3009 "get_window_parents",
3010 "get_window_children",
3011 "get_window_tree",
3012 "set_window_rectangles",
3013 "get_window_rectangles",
3014 "get_window_text",
3015 "set_window_text",
3016 "inc_window_paint_count",
3017 "get_windows_offset",
3018 "set_window_property",
3019 "remove_window_property",
3020 "get_window_property",
3021 "get_window_properties",
3022 "attach_thread_input",
3023 "get_thread_input",
3024 "get_key_state",
3025 "set_key_state",
3026 "set_foreground_window",
3027 "set_focus_window",
3028 "set_active_window",
3029 "set_capture_window",
3030 "set_caret_window",
3031 "set_caret_info",
3032 "set_hook",
3033 "remove_hook",
3034 "start_hook_chain",
3035 "finish_hook_chain",
3036 "get_next_hook",
3037 "set_clipboard_info",
3038 "open_token",
3041 /* ### make_requests end ### */
3042 /* Everything above this line is generated automatically by tools/make_requests */
3044 static const char *get_status_name( unsigned int status )
3046 #define NAME(status) { #status, STATUS_##status }
3047 static const struct
3049 const char *name;
3050 unsigned int value;
3051 } status_names[] =
3053 NAME(ACCESS_DENIED),
3054 NAME(ACCESS_VIOLATION),
3055 NAME(BUFFER_OVERFLOW),
3056 NAME(CHILD_MUST_BE_VOLATILE),
3057 NAME(DIRECTORY_NOT_EMPTY),
3058 NAME(DISK_FULL),
3059 NAME(FILE_LOCK_CONFLICT),
3060 NAME(INVALID_FILE_FOR_SECTION),
3061 NAME(INVALID_HANDLE),
3062 NAME(INVALID_PARAMETER),
3063 NAME(KEY_DELETED),
3064 NAME(MEDIA_WRITE_PROTECTED),
3065 NAME(MUTANT_NOT_OWNED),
3066 NAME(NOT_REGISTRY_FILE),
3067 NAME(NO_MEMORY),
3068 NAME(NO_MORE_ENTRIES),
3069 NAME(NO_MORE_FILES),
3070 NAME(NO_SUCH_FILE),
3071 NAME(OBJECT_NAME_COLLISION),
3072 NAME(OBJECT_NAME_INVALID),
3073 NAME(OBJECT_NAME_NOT_FOUND),
3074 NAME(OBJECT_PATH_INVALID),
3075 NAME(OBJECT_TYPE_MISMATCH),
3076 NAME(PENDING),
3077 NAME(PIPE_BROKEN),
3078 NAME(SEMAPHORE_LIMIT_EXCEEDED),
3079 NAME(SHARING_VIOLATION),
3080 NAME(SUSPEND_COUNT_EXCEEDED),
3081 NAME(TIMEOUT),
3082 NAME(TOO_MANY_OPENED_FILES),
3083 NAME(UNSUCCESSFUL),
3084 NAME(USER_APC),
3085 { NULL, 0 } /* terminator */
3087 #undef NAME
3089 int i;
3090 static char buffer[10];
3092 if (status)
3094 for (i = 0; status_names[i].name; i++)
3095 if (status_names[i].value == status) return status_names[i].name;
3097 sprintf( buffer, "%x", status );
3098 return buffer;
3101 void trace_request(void)
3103 enum request req = current->req.request_header.req;
3104 if (req < REQ_NB_REQUESTS)
3106 fprintf( stderr, "%04x: %s(", current->id, req_names[req] );
3107 if (req_dumpers[req])
3109 cur_pos = 0;
3110 cur_data = get_req_data();
3111 cur_size = get_req_data_size();
3112 req_dumpers[req]( &current->req );
3114 fprintf( stderr, " )\n" );
3116 else fprintf( stderr, "%04x: %d(?)\n", current->id, req );
3119 void trace_reply( enum request req, const union generic_reply *reply )
3121 if (req < REQ_NB_REQUESTS)
3123 fprintf( stderr, "%04x: %s() = %s",
3124 current->id, req_names[req], get_status_name(current->error) );
3125 if (reply_dumpers[req])
3127 fprintf( stderr, " {" );
3128 cur_pos = 0;
3129 cur_data = current->reply_data;
3130 cur_size = reply->reply_header.reply_size;
3131 reply_dumpers[req]( reply );
3132 fprintf( stderr, " }" );
3134 fputc( '\n', stderr );
3136 else fprintf( stderr, "%04x: %d() = %s\n",
3137 current->id, req, get_status_name(current->error) );