server: Change cancel_async to take an optional iosb and only_thread.
[wine.git] / server / trace.c
blobbe3f1c68f23148bda2e50341ed068d1425160c43
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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 #include "config.h"
22 #include "wine/port.h"
24 #include <ctype.h>
25 #include <stdarg.h>
26 #include <stdio.h>
27 #include <sys/types.h>
29 #ifdef HAVE_SYS_UIO_H
30 #include <sys/uio.h>
31 #endif
33 #include "ntstatus.h"
34 #define WIN32_NO_STATUS
35 #include "windef.h"
36 #include "winbase.h"
37 #include "wincon.h"
38 #include "winternl.h"
39 #include "winioctl.h"
40 #include "file.h"
41 #include "request.h"
42 #include "unicode.h"
44 static const void *cur_data;
45 static data_size_t cur_size;
47 static const char *get_status_name( unsigned int status );
49 /* utility functions */
51 static inline void remove_data( data_size_t size )
53 cur_data = (const char *)cur_data + size;
54 cur_size -= size;
57 static void dump_uints( const int *ptr, int len )
59 fputc( '{', stderr );
60 while (len > 0)
62 fprintf( stderr, "%08x", *ptr++ );
63 if (--len) fputc( ',', stderr );
65 fputc( '}', stderr );
68 static void dump_timeout( const char *prefix, const timeout_t *time )
70 fprintf( stderr, "%s%s", prefix, get_timeout_str(*time) );
73 static void dump_uint64( const char *prefix, const unsigned __int64 *val )
75 if ((unsigned int)*val != *val)
76 fprintf( stderr, "%s%x%08x", prefix, (unsigned int)(*val >> 32), (unsigned int)*val );
77 else
78 fprintf( stderr, "%s%08x", prefix, (unsigned int)*val );
81 static void dump_rectangle( const char *prefix, const rectangle_t *rect )
83 fprintf( stderr, "%s{%d,%d;%d,%d}", prefix,
84 rect->left, rect->top, rect->right, rect->bottom );
87 static void dump_char_info( const char *prefix, const char_info_t *info )
89 fprintf( stderr, "%s{'", prefix );
90 dump_strW( &info->ch, 1, stderr, "\'\'" );
91 fprintf( stderr, "',%04x}", info->attr );
94 static void dump_ioctl_code( const char *prefix, const ioctl_code_t *code )
96 switch(*code)
98 #define CASE(c) case c: fprintf( stderr, "%s%s", prefix, #c ); break
99 CASE(FSCTL_DISMOUNT_VOLUME);
100 CASE(FSCTL_PIPE_DISCONNECT);
101 CASE(FSCTL_PIPE_LISTEN);
102 CASE(FSCTL_PIPE_WAIT);
103 default: fprintf( stderr, "%s%08x", prefix, *code ); break;
104 #undef CASE
108 static void dump_cpu_type( const char *prefix, const cpu_type_t *code )
110 switch (*code)
112 #define CASE(c) case CPU_##c: fprintf( stderr, "%s%s", prefix, #c ); break
113 CASE(x86);
114 CASE(x86_64);
115 CASE(ALPHA);
116 CASE(POWERPC);
117 CASE(SPARC);
118 default: fprintf( stderr, "%s%u", prefix, *code ); break;
119 #undef CASE
123 static void dump_apc_call( const char *prefix, const apc_call_t *call )
125 fprintf( stderr, "%s{", prefix );
126 switch(call->type)
128 case APC_NONE:
129 fprintf( stderr, "APC_NONE" );
130 break;
131 case APC_USER:
132 dump_uint64( "APC_USER,func=", &call->user.func );
133 dump_uint64( ",args={", &call->user.args[0] );
134 dump_uint64( ",", &call->user.args[1] );
135 dump_uint64( ",", &call->user.args[2] );
136 fputc( '}', stderr );
137 break;
138 case APC_TIMER:
139 dump_timeout( "APC_TIMER,time=", &call->timer.time );
140 dump_uint64( ",arg=", &call->timer.arg );
141 break;
142 case APC_ASYNC_IO:
143 dump_uint64( "APC_ASYNC_IO,func=", &call->async_io.func );
144 dump_uint64( ",user=", &call->async_io.user );
145 dump_uint64( ",sb=", &call->async_io.sb );
146 fprintf( stderr, ",status=%s", get_status_name(call->async_io.status) );
147 break;
148 case APC_VIRTUAL_ALLOC:
149 dump_uint64( "APC_VIRTUAL_ALLOC,addr==", &call->virtual_alloc.addr );
150 dump_uint64( ",size=", &call->virtual_alloc.size );
151 fprintf( stderr, ",zero_bits=%u,op_type=%x,prot=%x",
152 call->virtual_alloc.zero_bits, call->virtual_alloc.op_type,
153 call->virtual_alloc.prot );
154 break;
155 case APC_VIRTUAL_FREE:
156 dump_uint64( "APC_VIRTUAL_FREE,addr=", &call->virtual_free.addr );
157 dump_uint64( ",size=", &call->virtual_free.size );
158 fprintf( stderr, ",op_type=%x", call->virtual_free.op_type );
159 break;
160 case APC_VIRTUAL_QUERY:
161 dump_uint64( "APC_VIRTUAL_QUERY,addr=", &call->virtual_query.addr );
162 break;
163 case APC_VIRTUAL_PROTECT:
164 dump_uint64( "APC_VIRTUAL_PROTECT,addr=", &call->virtual_protect.addr );
165 dump_uint64( ",size=", &call->virtual_protect.size );
166 fprintf( stderr, ",prot=%x", call->virtual_protect.prot );
167 break;
168 case APC_VIRTUAL_FLUSH:
169 dump_uint64( "APC_VIRTUAL_FLUSH,addr=", &call->virtual_flush.addr );
170 dump_uint64( ",size=", &call->virtual_flush.size );
171 break;
172 case APC_VIRTUAL_LOCK:
173 dump_uint64( "APC_VIRTUAL_LOCK,addr=", &call->virtual_lock.addr );
174 dump_uint64( ",size=", &call->virtual_lock.size );
175 break;
176 case APC_VIRTUAL_UNLOCK:
177 dump_uint64( "APC_VIRTUAL_UNLOCK,addr=", &call->virtual_unlock.addr );
178 dump_uint64( ",size=", &call->virtual_unlock.size );
179 break;
180 case APC_MAP_VIEW:
181 fprintf( stderr, "APC_MAP_VIEW,handle=%04x", call->map_view.handle );
182 dump_uint64( ",addr=", &call->map_view.addr );
183 dump_uint64( ",size=", &call->map_view.size );
184 dump_uint64( ",offset=", &call->map_view.offset );
185 fprintf( stderr, ",zero_bits=%u,alloc_type=%x,prot=%x",
186 call->map_view.zero_bits, call->map_view.alloc_type, call->map_view.prot );
187 break;
188 case APC_UNMAP_VIEW:
189 dump_uint64( "APC_UNMAP_VIEW,addr=", &call->unmap_view.addr );
190 break;
191 case APC_CREATE_THREAD:
192 dump_uint64( "APC_CREATE_THREAD,func=", &call->create_thread.func );
193 dump_uint64( ",arg=", &call->create_thread.arg );
194 dump_uint64( ",reserve=", &call->create_thread.reserve );
195 dump_uint64( ",commit=", &call->create_thread.commit );
196 fprintf( stderr, ",suspend=%u", call->create_thread.suspend );
197 break;
198 default:
199 fprintf( stderr, "type=%u", call->type );
200 break;
202 fputc( '}', stderr );
205 static void dump_apc_result( const char *prefix, const apc_result_t *result )
207 fprintf( stderr, "%s{", prefix );
208 switch(result->type)
210 case APC_NONE:
211 break;
212 case APC_ASYNC_IO:
213 fprintf( stderr, "APC_ASYNC_IO,status=%s,total=%u",
214 get_status_name( result->async_io.status ), result->async_io.total );
215 dump_uint64( ",apc=", &result->async_io.apc );
216 break;
217 case APC_VIRTUAL_ALLOC:
218 fprintf( stderr, "APC_VIRTUAL_ALLOC,status=%s",
219 get_status_name( result->virtual_alloc.status ));
220 dump_uint64( ",addr=", &result->virtual_alloc.addr );
221 dump_uint64( ",size=", &result->virtual_alloc.size );
222 break;
223 case APC_VIRTUAL_FREE:
224 fprintf( stderr, "APC_VIRTUAL_FREE,status=%s",
225 get_status_name( result->virtual_free.status ));
226 dump_uint64( ",addr=", &result->virtual_free.addr );
227 dump_uint64( ",size=", &result->virtual_free.size );
228 break;
229 case APC_VIRTUAL_QUERY:
230 fprintf( stderr, "APC_VIRTUAL_QUERY,status=%s",
231 get_status_name( result->virtual_query.status ));
232 dump_uint64( ",base=", &result->virtual_query.base );
233 dump_uint64( ",alloc_base=", &result->virtual_query.alloc_base );
234 dump_uint64( ",size=", &result->virtual_query.size );
235 fprintf( stderr, ",state=%x,prot=%x,alloc_prot=%x,alloc_type=%x",
236 result->virtual_query.state, result->virtual_query.prot,
237 result->virtual_query.alloc_prot, result->virtual_query.alloc_type );
238 break;
239 case APC_VIRTUAL_PROTECT:
240 fprintf( stderr, "APC_VIRTUAL_PROTECT,status=%s",
241 get_status_name( result->virtual_protect.status ));
242 dump_uint64( ",addr=", &result->virtual_protect.addr );
243 dump_uint64( ",size=", &result->virtual_protect.size );
244 fprintf( stderr, ",prot=%x", result->virtual_protect.prot );
245 break;
246 case APC_VIRTUAL_FLUSH:
247 fprintf( stderr, "APC_VIRTUAL_FLUSH,status=%s",
248 get_status_name( result->virtual_flush.status ));
249 dump_uint64( ",addr=", &result->virtual_flush.addr );
250 dump_uint64( ",size=", &result->virtual_flush.size );
251 break;
252 case APC_VIRTUAL_LOCK:
253 fprintf( stderr, "APC_VIRTUAL_LOCK,status=%s",
254 get_status_name( result->virtual_lock.status ));
255 dump_uint64( ",addr=", &result->virtual_lock.addr );
256 dump_uint64( ",size=", &result->virtual_lock.size );
257 break;
258 case APC_VIRTUAL_UNLOCK:
259 fprintf( stderr, "APC_VIRTUAL_UNLOCK,status=%s",
260 get_status_name( result->virtual_unlock.status ));
261 dump_uint64( ",addr=", &result->virtual_unlock.addr );
262 dump_uint64( ",size=", &result->virtual_unlock.size );
263 break;
264 case APC_MAP_VIEW:
265 fprintf( stderr, "APC_MAP_VIEW,status=%s",
266 get_status_name( result->map_view.status ));
267 dump_uint64( ",addr=", &result->map_view.addr );
268 dump_uint64( ",size=", &result->map_view.size );
269 break;
270 case APC_UNMAP_VIEW:
271 fprintf( stderr, "APC_UNMAP_VIEW,status=%s",
272 get_status_name( result->unmap_view.status ) );
273 break;
274 case APC_CREATE_THREAD:
275 fprintf( stderr, "APC_CREATE_THREAD,status=%s,tid=%04x,handle=%04x",
276 get_status_name( result->create_thread.status ),
277 result->create_thread.tid, result->create_thread.handle );
278 break;
279 default:
280 fprintf( stderr, "type=%u", result->type );
281 break;
283 fputc( '}', stderr );
286 static void dump_async_data( const char *prefix, const async_data_t *data )
288 fprintf( stderr, "%s{handle=%04x,event=%04x", prefix, data->handle, data->event );
289 dump_uint64( ",callback=", &data->callback );
290 dump_uint64( ",iosb=", &data->iosb );
291 dump_uint64( ",arg=", &data->arg );
292 dump_uint64( ",cvalue=", &data->cvalue );
293 fputc( '}', stderr );
296 static void dump_luid( const char *prefix, const luid_t *luid )
298 fprintf( stderr, "%s%d.%u", prefix, luid->high_part, luid->low_part );
301 static void dump_varargs_ints( const char *prefix, data_size_t size )
303 const int *data = cur_data;
304 data_size_t len = size / sizeof(*data);
306 fprintf( stderr,"%s{", prefix );
307 while (len > 0)
309 fprintf( stderr, "%d", *data++ );
310 if (--len) fputc( ',', stderr );
312 fputc( '}', stderr );
313 remove_data( size );
316 static void dump_varargs_uints64( const char *prefix, data_size_t size )
318 const unsigned __int64 *data = cur_data;
319 data_size_t len = size / sizeof(*data);
321 fprintf( stderr,"%s{", prefix );
322 while (len > 0)
324 dump_uint64( "", data++ );
325 if (--len) fputc( ',', stderr );
327 fputc( '}', stderr );
328 remove_data( size );
331 static void dump_varargs_apc_result( const char *prefix, data_size_t size )
333 const apc_result_t *result = cur_data;
335 if (size >= sizeof(*result))
337 dump_apc_result( prefix, result );
338 size = sizeof(*result);
340 remove_data( size );
343 static void dump_varargs_handles( const char *prefix, data_size_t size )
345 const obj_handle_t *data = cur_data;
346 data_size_t len = size / sizeof(*data);
348 fprintf( stderr,"%s{", prefix );
349 while (len > 0)
351 fprintf( stderr, "%04x", *data++ );
352 if (--len) fputc( ',', stderr );
354 fputc( '}', stderr );
355 remove_data( size );
358 static void dump_varargs_user_handles( const char *prefix, data_size_t size )
360 const user_handle_t *data = cur_data;
361 data_size_t len = size / sizeof(*data);
363 fprintf( stderr,"%s{", prefix );
364 while (len > 0)
366 fprintf( stderr, "%08x", *data++ );
367 if (--len) fputc( ',', stderr );
369 fputc( '}', stderr );
370 remove_data( size );
373 static void dump_varargs_bytes( const char *prefix, data_size_t size )
375 const unsigned char *data = cur_data;
376 data_size_t len = size;
378 fprintf( stderr,"%s{", prefix );
379 while (len > 0)
381 fprintf( stderr, "%02x", *data++ );
382 if (--len) fputc( ',', stderr );
384 fputc( '}', stderr );
385 remove_data( size );
388 static void dump_varargs_string( const char *prefix, data_size_t size )
390 fprintf( stderr, "%s\"%.*s\"", prefix, (int)size, (const char *)cur_data );
391 remove_data( size );
394 static void dump_varargs_unicode_str( const char *prefix, data_size_t size )
396 fprintf( stderr, "%sL\"", prefix );
397 dump_strW( cur_data, size / sizeof(WCHAR), stderr, "\"\"" );
398 fputc( '\"', stderr );
399 remove_data( size );
402 static void dump_varargs_context( const char *prefix, data_size_t size )
404 const context_t *context = cur_data;
405 context_t ctx;
406 unsigned int i;
408 if (!size)
410 fprintf( stderr, "%s{}", prefix );
411 return;
413 size = min( size, sizeof(ctx) );
414 memset( &ctx, 0, sizeof(ctx) );
415 memcpy( &ctx, context, size );
417 fprintf( stderr,"%s{", prefix );
418 dump_cpu_type( "cpu=", &ctx.cpu );
419 switch (ctx.cpu)
421 case CPU_x86:
422 if (ctx.flags & SERVER_CTX_CONTROL)
423 fprintf( stderr, ",eip=%08x,esp=%08x,ebp=%08x,eflags=%08x,cs=%04x,ss=%04x",
424 ctx.ctl.i386_regs.eip, ctx.ctl.i386_regs.esp, ctx.ctl.i386_regs.ebp,
425 ctx.ctl.i386_regs.eflags, ctx.ctl.i386_regs.cs, ctx.ctl.i386_regs.ss );
426 if (ctx.flags & SERVER_CTX_SEGMENTS)
427 fprintf( stderr, ",ds=%04x,es=%04x,fs=%04x,gs=%04x",
428 ctx.seg.i386_regs.ds, ctx.seg.i386_regs.es,
429 ctx.seg.i386_regs.fs, ctx.seg.i386_regs.gs );
430 if (ctx.flags & SERVER_CTX_INTEGER)
431 fprintf( stderr, ",eax=%08x,ebx=%08x,ecx=%08x,edx=%08x,esi=%08x,edi=%08x",
432 ctx.integer.i386_regs.eax, ctx.integer.i386_regs.ebx, ctx.integer.i386_regs.ecx,
433 ctx.integer.i386_regs.edx, ctx.integer.i386_regs.esi, ctx.integer.i386_regs.edi );
434 if (ctx.flags & SERVER_CTX_DEBUG_REGISTERS)
435 fprintf( stderr, ",dr0=%08x,dr1=%08x,dr2=%08x,dr3=%08x,dr6=%08x,dr7=%08x",
436 ctx.debug.i386_regs.dr0, ctx.debug.i386_regs.dr1, ctx.debug.i386_regs.dr2,
437 ctx.debug.i386_regs.dr3, ctx.debug.i386_regs.dr6, ctx.debug.i386_regs.dr7 );
438 if (ctx.flags & SERVER_CTX_FLOATING_POINT)
440 fprintf( stderr, "fp.ctrl=%08x,fp.status=%08x,fp.tag=%08x,fp.err_off=%08x,fp.err_sel=%08x",
441 ctx.fp.i386_regs.ctrl, ctx.fp.i386_regs.status, ctx.fp.i386_regs.tag,
442 ctx.fp.i386_regs.err_off, ctx.fp.i386_regs.err_sel );
443 fprintf( stderr, ",fp.data_off=%08x,fp.data_sel=%08x,fp.cr0npx=%08x",
444 ctx.fp.i386_regs.data_off, ctx.fp.i386_regs.data_sel, ctx.fp.i386_regs.cr0npx );
445 for (i = 0; i < 8; i++)
446 fprintf( stderr, ",fp.reg%u=%Lg", i, *(long double *)&ctx.fp.i386_regs.regs[10*i] );
448 if (ctx.flags & SERVER_CTX_EXTENDED_REGISTERS)
450 fprintf( stderr, ",extended=" );
451 dump_uints( (const int *)ctx.ext.i386_regs, sizeof(ctx.ext.i386_regs) / sizeof(int) );
453 break;
454 case CPU_x86_64:
455 if (ctx.flags & SERVER_CTX_CONTROL)
457 dump_uint64( ",rip=", &ctx.ctl.x86_64_regs.rip );
458 dump_uint64( ",rbp=", &ctx.ctl.x86_64_regs.rbp );
459 dump_uint64( ",rsp=", &ctx.ctl.x86_64_regs.rsp );
460 fprintf( stderr, ",cs=%04x,ss=%04x,flags=%08x,mxcsr=%08x",
461 ctx.ctl.x86_64_regs.cs, ctx.ctl.x86_64_regs.ss,
462 ctx.ctl.x86_64_regs.flags, ctx.ctl.x86_64_regs.mxcsr );
464 if (ctx.flags & SERVER_CTX_INTEGER)
466 dump_uint64( ",rax=", &ctx.integer.x86_64_regs.rax );
467 dump_uint64( ",rbx=", &ctx.integer.x86_64_regs.rbx );
468 dump_uint64( ",rcx=", &ctx.integer.x86_64_regs.rcx );
469 dump_uint64( ",rdx=", &ctx.integer.x86_64_regs.rdx );
470 dump_uint64( ",rsi=", &ctx.integer.x86_64_regs.rsi );
471 dump_uint64( ",rdi=", &ctx.integer.x86_64_regs.rdi );
472 dump_uint64( ",r8=", &ctx.integer.x86_64_regs.r8 );
473 dump_uint64( ",r9=", &ctx.integer.x86_64_regs.r9 );
474 dump_uint64( ",r10=", &ctx.integer.x86_64_regs.r10 );
475 dump_uint64( ",r11=", &ctx.integer.x86_64_regs.r11 );
476 dump_uint64( ",r12=", &ctx.integer.x86_64_regs.r12 );
477 dump_uint64( ",r13=", &ctx.integer.x86_64_regs.r13 );
478 dump_uint64( ",r14=", &ctx.integer.x86_64_regs.r14 );
479 dump_uint64( ",r15=", &ctx.integer.x86_64_regs.r15 );
481 if (ctx.flags & SERVER_CTX_SEGMENTS)
482 fprintf( stderr, ",ds=%04x,es=%04x,fs=%04x,gs=%04x",
483 ctx.seg.x86_64_regs.ds, ctx.seg.x86_64_regs.es,
484 ctx.seg.x86_64_regs.fs, ctx.seg.x86_64_regs.gs );
485 if (ctx.flags & SERVER_CTX_DEBUG_REGISTERS)
487 dump_uint64( ",dr0=", &ctx.debug.x86_64_regs.dr0 );
488 dump_uint64( ",dr1=", &ctx.debug.x86_64_regs.dr1 );
489 dump_uint64( ",dr2=", &ctx.debug.x86_64_regs.dr2 );
490 dump_uint64( ",dr3=", &ctx.debug.x86_64_regs.dr3 );
491 dump_uint64( ",dr6=", &ctx.debug.x86_64_regs.dr6 );
492 dump_uint64( ",dr7=", &ctx.debug.x86_64_regs.dr7 );
494 if (ctx.flags & SERVER_CTX_FLOATING_POINT)
496 for (i = 0; i < 32; i++)
497 fprintf( stderr, ",fp%u=%08x%08x%08x%08x", i,
498 (unsigned int)(ctx.fp.x86_64_regs.fpregs[i].high >> 32),
499 (unsigned int)ctx.fp.x86_64_regs.fpregs[i].high,
500 (unsigned int)(ctx.fp.x86_64_regs.fpregs[i].low >> 32),
501 (unsigned int)ctx.fp.x86_64_regs.fpregs[i].low );
503 break;
504 case CPU_ALPHA:
505 if (ctx.flags & SERVER_CTX_CONTROL)
507 dump_uint64( ",fir=", &ctx.ctl.alpha_regs.fir );
508 fprintf( stderr, ",psr=%08x", ctx.ctl.alpha_regs.psr );
510 if (ctx.flags & SERVER_CTX_INTEGER)
512 dump_uint64( ",v0=", &ctx.integer.alpha_regs.v0 );
513 dump_uint64( ",t0=", &ctx.integer.alpha_regs.t0 );
514 dump_uint64( ",t1=", &ctx.integer.alpha_regs.t1 );
515 dump_uint64( ",t2=", &ctx.integer.alpha_regs.t2 );
516 dump_uint64( ",t3=", &ctx.integer.alpha_regs.t3 );
517 dump_uint64( ",t4=", &ctx.integer.alpha_regs.t4 );
518 dump_uint64( ",t5=", &ctx.integer.alpha_regs.t5 );
519 dump_uint64( ",t6=", &ctx.integer.alpha_regs.t6 );
520 dump_uint64( ",t7=", &ctx.integer.alpha_regs.t7 );
521 dump_uint64( ",t8=", &ctx.integer.alpha_regs.t8 );
522 dump_uint64( ",t9=", &ctx.integer.alpha_regs.t9 );
523 dump_uint64( ",t10=", &ctx.integer.alpha_regs.t10 );
524 dump_uint64( ",t11=", &ctx.integer.alpha_regs.t11 );
525 dump_uint64( ",t12=", &ctx.integer.alpha_regs.t12 );
526 dump_uint64( ",s0=", &ctx.integer.alpha_regs.s0 );
527 dump_uint64( ",s1=", &ctx.integer.alpha_regs.s1 );
528 dump_uint64( ",s2=", &ctx.integer.alpha_regs.s2 );
529 dump_uint64( ",s3=", &ctx.integer.alpha_regs.s3 );
530 dump_uint64( ",s4=", &ctx.integer.alpha_regs.s4 );
531 dump_uint64( ",s5=", &ctx.integer.alpha_regs.s5 );
532 dump_uint64( ",s6=", &ctx.integer.alpha_regs.s6 );
533 dump_uint64( ",a0=", &ctx.integer.alpha_regs.a0 );
534 dump_uint64( ",a1=", &ctx.integer.alpha_regs.a1 );
535 dump_uint64( ",a2=", &ctx.integer.alpha_regs.a2 );
536 dump_uint64( ",a3=", &ctx.integer.alpha_regs.a3 );
537 dump_uint64( ",a4=", &ctx.integer.alpha_regs.a4 );
538 dump_uint64( ",a5=", &ctx.integer.alpha_regs.a5 );
539 dump_uint64( ",at=", &ctx.integer.alpha_regs.at );
541 if (ctx.flags & SERVER_CTX_FLOATING_POINT)
543 for (i = 0; i < 32; i++)
545 fprintf( stderr, ",f%u", i );
546 dump_uint64( "=", &ctx.fp.alpha_regs.f[i] );
548 dump_uint64( ",fpcr=", &ctx.fp.alpha_regs.fpcr );
549 dump_uint64( ",softfpcr=", &ctx.fp.alpha_regs.softfpcr );
551 break;
552 case CPU_POWERPC:
553 if (ctx.flags & SERVER_CTX_CONTROL)
554 fprintf( stderr, ",iar=%08x,msr=%08x,ctr=%08x,lr=%08x,dar=%08x,dsisr=%08x,trap=%08x",
555 ctx.ctl.powerpc_regs.iar, ctx.ctl.powerpc_regs.msr, ctx.ctl.powerpc_regs.ctr,
556 ctx.ctl.powerpc_regs.lr, ctx.ctl.powerpc_regs.dar, ctx.ctl.powerpc_regs.dsisr,
557 ctx.ctl.powerpc_regs.trap );
558 if (ctx.flags & SERVER_CTX_INTEGER)
560 for (i = 0; i < 32; i++) fprintf( stderr, ",gpr%u=%08x", i, ctx.integer.powerpc_regs.gpr[i] );
561 fprintf( stderr, ",cr=%08x,xer=%08x",
562 ctx.integer.powerpc_regs.cr, ctx.integer.powerpc_regs.xer );
564 if (ctx.flags & SERVER_CTX_DEBUG_REGISTERS)
565 for (i = 0; i < 8; i++) fprintf( stderr, ",dr%u=%08x", i, ctx.debug.powerpc_regs.dr[i] );
566 if (ctx.flags & SERVER_CTX_FLOATING_POINT)
568 for (i = 0; i < 32; i++) fprintf( stderr, ",fpr%u=%g", i, ctx.fp.powerpc_regs.fpr[i] );
569 fprintf( stderr, ",fpscr=%g", ctx.fp.powerpc_regs.fpscr );
571 break;
572 case CPU_SPARC:
573 if (ctx.flags & SERVER_CTX_CONTROL)
574 fprintf( stderr, ",psr=%08x,pc=%08x,npc=%08x,y=%08x,wim=%08x,tbr=%08x",
575 ctx.ctl.sparc_regs.psr, ctx.ctl.sparc_regs.pc, ctx.ctl.sparc_regs.npc,
576 ctx.ctl.sparc_regs.y, ctx.ctl.sparc_regs.wim, ctx.ctl.sparc_regs.tbr );
577 if (ctx.flags & SERVER_CTX_INTEGER)
579 for (i = 0; i < 8; i++) fprintf( stderr, ",g%u=%08x", i, ctx.integer.sparc_regs.g[i] );
580 for (i = 0; i < 8; i++) fprintf( stderr, ",o%u=%08x", i, ctx.integer.sparc_regs.o[i] );
581 for (i = 0; i < 8; i++) fprintf( stderr, ",l%u=%08x", i, ctx.integer.sparc_regs.l[i] );
582 for (i = 0; i < 8; i++) fprintf( stderr, ",i%u=%08x", i, ctx.integer.sparc_regs.i[i] );
584 break;
586 fputc( '}', stderr );
587 remove_data( size );
590 static void dump_varargs_debug_event( const char *prefix, data_size_t size )
592 debug_event_t event;
593 unsigned int i;
595 if (!size)
597 fprintf( stderr, "%s{}", prefix );
598 return;
600 size = min( size, sizeof(event) );
601 memset( &event, 0, sizeof(event) );
602 memcpy( &event, cur_data, size );
604 switch(event.code)
606 case EXCEPTION_DEBUG_EVENT:
607 fprintf( stderr, "%s{exception,first=%d,exc_code=%08x,flags=%08x", prefix,
608 event.exception.first, event.exception.exc_code, event.exception.flags );
609 dump_uint64( ",record=", &event.exception.record );
610 dump_uint64( ",address=", &event.exception.address );
611 fprintf( stderr, ",params={" );
612 event.exception.nb_params = min( event.exception.nb_params, EXCEPTION_MAXIMUM_PARAMETERS );
613 for (i = 0; i < event.exception.nb_params; i++)
615 dump_uint64( "", &event.exception.params[i] );
616 if (i < event.exception.nb_params) fputc( ',', stderr );
618 fprintf( stderr, "}}" );
619 break;
620 case CREATE_THREAD_DEBUG_EVENT:
621 fprintf( stderr, "%s{create_thread,thread=%04x", prefix, event.create_thread.handle );
622 dump_uint64( ",teb=", &event.create_thread.teb );
623 dump_uint64( ",start=", &event.create_thread.start );
624 fputc( '}', stderr );
625 break;
626 case CREATE_PROCESS_DEBUG_EVENT:
627 fprintf( stderr, "%s{create_process,file=%04x,process=%04x,thread=%04x", prefix,
628 event.create_process.file, event.create_process.process,
629 event.create_process.thread );
630 dump_uint64( ",base=", &event.create_process.base );
631 fprintf( stderr, ",offset=%d,size=%d",
632 event.create_process.dbg_offset, event.create_process.dbg_size );
633 dump_uint64( ",teb=", &event.create_process.teb );
634 dump_uint64( ",start=", &event.create_process.start );
635 dump_uint64( ",name=", &event.create_process.name );
636 fprintf( stderr, ",unicode=%d}", event.create_process.unicode );
637 break;
638 case EXIT_THREAD_DEBUG_EVENT:
639 fprintf( stderr, "%s{exit_thread,code=%d}", prefix, event.exit.exit_code );
640 break;
641 case EXIT_PROCESS_DEBUG_EVENT:
642 fprintf( stderr, "%s{exit_process,code=%d}", prefix, event.exit.exit_code );
643 break;
644 case LOAD_DLL_DEBUG_EVENT:
645 fprintf( stderr, "%s{load_dll,file=%04x", prefix, event.load_dll.handle );
646 dump_uint64( ",base=", &event.load_dll.base );
647 fprintf( stderr, ",offset=%d,size=%d",
648 event.load_dll.dbg_offset, event.load_dll.dbg_size );
649 dump_uint64( ",name=", &event.load_dll.name );
650 fprintf( stderr, ",unicode=%d}", event.load_dll.unicode );
651 break;
652 case UNLOAD_DLL_DEBUG_EVENT:
653 fprintf( stderr, "%s{unload_dll", prefix );
654 dump_uint64( ",base=", &event.unload_dll.base );
655 fputc( '}', stderr );
656 break;
657 case OUTPUT_DEBUG_STRING_EVENT:
658 fprintf( stderr, "%s{output_string", prefix );
659 dump_uint64( ",string=", &event.output_string.string );
660 fprintf( stderr, ",unicode=%d,len=%u}",
661 event.output_string.unicode, event.output_string.length );
662 break;
663 case RIP_EVENT:
664 fprintf( stderr, "%s{rip,err=%d,type=%d}", prefix,
665 event.rip_info.error, event.rip_info.type );
666 break;
667 case 0: /* zero is the code returned on timeouts */
668 fprintf( stderr, "%s{}", prefix );
669 break;
670 default:
671 fprintf( stderr, "%s{code=??? (%d)}", prefix, event.code );
672 break;
674 remove_data( size );
677 /* dump a unicode string contained in a buffer; helper for dump_varargs_startup_info */
678 static void dump_inline_unicode_string( const UNICODE_STRING *str, const void *data, data_size_t size )
680 size_t length = str->Length;
681 size_t offset = (size_t)str->Buffer;
683 if (offset >= size) return;
684 if (offset + length > size) length = size - offset;
685 dump_strW( (const WCHAR *)data + offset/sizeof(WCHAR), length/sizeof(WCHAR), stderr, "\"\"" );
688 static void dump_varargs_startup_info( const char *prefix, data_size_t size )
690 const RTL_USER_PROCESS_PARAMETERS *ptr = cur_data;
691 RTL_USER_PROCESS_PARAMETERS params;
693 if (size < sizeof(params.Size))
695 fprintf( stderr, "%s{}", prefix );
696 return;
698 if (size > ptr->Size) size = ptr->Size;
699 memset( &params, 0, sizeof(params) );
700 memcpy( &params, ptr, min( size, sizeof(params) ));
702 fprintf( stderr, "%s{AllocationSize=%x,", prefix, params.AllocationSize );
703 fprintf( stderr, "Size=%x,", params.Size );
704 fprintf( stderr, "Flags=%x,", params.Flags );
705 fprintf( stderr, "DebugFlags=%x,", params.DebugFlags );
706 fprintf( stderr, "ConsoleHandle=%p,", params.ConsoleHandle );
707 fprintf( stderr, "ConsoleFlags=%x,", params.ConsoleFlags );
708 fprintf( stderr, "hStdInput=%p,", params.hStdInput );
709 fprintf( stderr, "hStdOutput=%p,", params.hStdOutput );
710 fprintf( stderr, "hStdError=%p,", params.hStdError );
711 fprintf( stderr, "CurrentDirectory.Handle=%p,", params.CurrentDirectory.Handle );
712 fprintf( stderr, "dwX=%d,", params.dwX );
713 fprintf( stderr, "dwY=%d,", params.dwY );
714 fprintf( stderr, "dwXSize=%d,", params.dwXSize );
715 fprintf( stderr, "dwYSize=%d,", params.dwYSize );
716 fprintf( stderr, "dwXCountChars=%d,", params.dwXCountChars );
717 fprintf( stderr, "dwYCountChars=%d,", params.dwYCountChars );
718 fprintf( stderr, "dwFillAttribute=%x,", params.dwFillAttribute );
719 fprintf( stderr, "dwFlags=%x,", params.dwFlags );
720 fprintf( stderr, "wShowWindow=%x,", params.wShowWindow );
721 fprintf( stderr, "CurrentDirectory.DosPath=L\"" );
722 dump_inline_unicode_string( &params.CurrentDirectory.DosPath, cur_data, size );
723 fprintf( stderr, "\",DllPath=L\"" );
724 dump_inline_unicode_string( &params.DllPath, cur_data, size );
725 fprintf( stderr, "\",ImagePathName=L\"" );
726 dump_inline_unicode_string( &params.ImagePathName, cur_data, size );
727 fprintf( stderr, "\",CommandLine=L\"" );
728 dump_inline_unicode_string( &params.CommandLine, cur_data, size );
729 fprintf( stderr, "\",WindowTitle=L\"" );
730 dump_inline_unicode_string( &params.WindowTitle, cur_data, size );
731 fprintf( stderr, "\",Desktop=L\"" );
732 dump_inline_unicode_string( &params.Desktop, cur_data, size );
733 fprintf( stderr, "\",ShellInfo=L\"" );
734 dump_inline_unicode_string( &params.ShellInfo, cur_data, size );
735 fprintf( stderr, "\",RuntimeInfo=L\"" );
736 dump_inline_unicode_string( &params.RuntimeInfo, cur_data, size );
737 fprintf( stderr, "\"}" );
738 remove_data( size );
741 static void dump_varargs_input_records( const char *prefix, data_size_t size )
743 const INPUT_RECORD *rec = cur_data;
744 data_size_t len = size / sizeof(*rec);
746 fprintf( stderr,"%s{", prefix );
747 while (len > 0)
749 fprintf( stderr, "{%04x,...}", rec->EventType );
750 rec++;
751 if (--len) fputc( ',', stderr );
753 fputc( '}', stderr );
754 remove_data( size );
757 static void dump_varargs_rectangles( const char *prefix, data_size_t size )
759 const rectangle_t *rect = cur_data;
760 data_size_t len = size / sizeof(*rect);
762 fprintf( stderr,"%s{", prefix );
763 while (len > 0)
765 dump_rectangle( "", rect++ );
766 if (--len) fputc( ',', stderr );
768 fputc( '}', stderr );
769 remove_data( size );
772 static void dump_varargs_message_data( const char *prefix, data_size_t size )
774 /* FIXME: dump the structured data */
775 dump_varargs_bytes( prefix, size );
778 static void dump_varargs_properties( const char *prefix, data_size_t size )
780 const property_data_t *prop = cur_data;
781 data_size_t len = size / sizeof(*prop);
783 fprintf( stderr,"%s{", prefix );
784 while (len > 0)
786 fprintf( stderr, "{atom=%04x,str=%d", prop->atom, prop->string );
787 dump_uint64( ",data=", &prop->data );
788 fputc( '}', stderr );
789 prop++;
790 if (--len) fputc( ',', stderr );
792 fputc( '}', stderr );
793 remove_data( size );
796 static void dump_varargs_LUID_AND_ATTRIBUTES( const char *prefix, data_size_t size )
798 const LUID_AND_ATTRIBUTES *lat = cur_data;
799 data_size_t len = size / sizeof(*lat);
801 fprintf( stderr,"%s{", prefix );
802 while (len > 0)
804 fprintf( stderr, "{luid=%08x%08x,attr=%x}",
805 lat->Luid.HighPart, lat->Luid.LowPart, lat->Attributes );
806 lat++;
807 if (--len) fputc( ',', stderr );
809 fputc( '}', stderr );
810 remove_data( size );
813 static void dump_inline_sid( const char *prefix, const SID *sid, data_size_t size )
815 DWORD i;
817 /* security check */
818 if ((FIELD_OFFSET(SID, SubAuthority[0]) > size) ||
819 (FIELD_OFFSET(SID, SubAuthority[sid->SubAuthorityCount]) > size))
821 fprintf( stderr, "<invalid sid>" );
822 return;
825 fprintf( stderr,"%s{", prefix );
826 fprintf( stderr, "S-%u-%u", sid->Revision, MAKELONG(
827 MAKEWORD( sid->IdentifierAuthority.Value[5],
828 sid->IdentifierAuthority.Value[4] ),
829 MAKEWORD( sid->IdentifierAuthority.Value[3],
830 sid->IdentifierAuthority.Value[2] ) ) );
831 for (i = 0; i < sid->SubAuthorityCount; i++)
832 fprintf( stderr, "-%u", sid->SubAuthority[i] );
833 fputc( '}', stderr );
836 static void dump_varargs_SID( const char *prefix, data_size_t size )
838 const SID *sid = cur_data;
839 dump_inline_sid( prefix, sid, size );
840 remove_data( size );
843 static void dump_inline_acl( const char *prefix, const ACL *acl, data_size_t size )
845 const ACE_HEADER *ace;
846 ULONG i;
848 fprintf( stderr,"%s{", prefix );
849 if (size)
851 if (size < sizeof(ACL))
853 fprintf( stderr, "<invalid acl>}\n" );
854 return;
856 size -= sizeof(ACL);
857 ace = (const ACE_HEADER *)(acl + 1);
858 for (i = 0; i < acl->AceCount; i++)
860 const SID *sid = NULL;
861 data_size_t sid_size = 0;
863 if (size < sizeof(ACE_HEADER))
864 return;
865 if (size < ace->AceSize)
866 return;
867 size -= ace->AceSize;
868 if (i != 0) fputc( ',', stderr );
869 fprintf( stderr, "{AceType=" );
870 switch (ace->AceType)
872 case ACCESS_DENIED_ACE_TYPE:
873 sid = (const SID *)&((const ACCESS_DENIED_ACE *)ace)->SidStart;
874 sid_size = ace->AceSize - FIELD_OFFSET(ACCESS_DENIED_ACE, SidStart);
875 fprintf( stderr, "ACCESS_DENIED_ACE_TYPE,Mask=%x",
876 ((const ACCESS_DENIED_ACE *)ace)->Mask );
877 break;
878 case ACCESS_ALLOWED_ACE_TYPE:
879 sid = (const SID *)&((const ACCESS_ALLOWED_ACE *)ace)->SidStart;
880 sid_size = ace->AceSize - FIELD_OFFSET(ACCESS_ALLOWED_ACE, SidStart);
881 fprintf( stderr, "ACCESS_ALLOWED_ACE_TYPE,Mask=%x",
882 ((const ACCESS_ALLOWED_ACE *)ace)->Mask );
883 break;
884 case SYSTEM_AUDIT_ACE_TYPE:
885 sid = (const SID *)&((const SYSTEM_AUDIT_ACE *)ace)->SidStart;
886 sid_size = ace->AceSize - FIELD_OFFSET(SYSTEM_AUDIT_ACE, SidStart);
887 fprintf( stderr, "SYSTEM_AUDIT_ACE_TYPE,Mask=%x",
888 ((const SYSTEM_AUDIT_ACE *)ace)->Mask );
889 break;
890 case SYSTEM_ALARM_ACE_TYPE:
891 sid = (const SID *)&((const SYSTEM_ALARM_ACE *)ace)->SidStart;
892 sid_size = ace->AceSize - FIELD_OFFSET(SYSTEM_ALARM_ACE, SidStart);
893 fprintf( stderr, "SYSTEM_ALARM_ACE_TYPE,Mask=%x",
894 ((const SYSTEM_ALARM_ACE *)ace)->Mask );
895 break;
896 default:
897 fprintf( stderr, "unknown<%d>", ace->AceType );
898 break;
900 fprintf( stderr, ",AceFlags=%x", ace->AceFlags );
901 if (sid)
902 dump_inline_sid( ",Sid=", sid, sid_size );
903 ace = (const ACE_HEADER *)((const char *)ace + ace->AceSize);
904 fputc( '}', stderr );
907 fputc( '}', stderr );
910 static void dump_varargs_ACL( const char *prefix, data_size_t size )
912 const ACL *acl = cur_data;
913 dump_inline_acl( prefix, acl, size );
914 remove_data( size );
917 static void dump_inline_security_descriptor( const char *prefix, const struct security_descriptor *sd, data_size_t size )
919 fprintf( stderr,"%s{", prefix );
920 if (size >= sizeof(struct security_descriptor))
922 size_t offset = sizeof(struct security_descriptor);
923 fprintf( stderr, "control=%08x", sd->control );
924 if ((sd->owner_len > FIELD_OFFSET(SID, SubAuthority[255])) || (offset + sd->owner_len > size))
925 return;
926 if (sd->owner_len)
927 dump_inline_sid( ",owner=", (const SID *)((const char *)sd + offset), sd->owner_len );
928 else
929 fprintf( stderr, ",owner=<not present>" );
930 offset += sd->owner_len;
931 if ((sd->group_len > FIELD_OFFSET(SID, SubAuthority[255])) || (offset + sd->group_len > size))
932 return;
933 if (sd->group_len)
934 dump_inline_sid( ",group=", (const SID *)((const char *)sd + offset), sd->group_len );
935 else
936 fprintf( stderr, ",group=<not present>" );
937 offset += sd->group_len;
938 if ((sd->sacl_len >= MAX_ACL_LEN) || (offset + sd->sacl_len > size))
939 return;
940 dump_inline_acl( ",sacl=", (const ACL *)((const char *)sd + offset), sd->sacl_len );
941 offset += sd->sacl_len;
942 if ((sd->dacl_len >= MAX_ACL_LEN) || (offset + sd->dacl_len > size))
943 return;
944 dump_inline_acl( ",dacl=", (const ACL *)((const char *)sd + offset), sd->dacl_len );
945 offset += sd->dacl_len;
947 fputc( '}', stderr );
950 static void dump_varargs_security_descriptor( const char *prefix, data_size_t size )
952 const struct security_descriptor *sd = cur_data;
953 dump_inline_security_descriptor( prefix, sd, size );
954 remove_data( size );
957 static void dump_varargs_token_groups( const char *prefix, data_size_t size )
959 const struct token_groups *tg = cur_data;
961 fprintf( stderr,"%s{", prefix );
962 if (size >= sizeof(struct token_groups))
964 size_t offset = sizeof(*tg);
965 fprintf( stderr, "count=%08x,", tg->count );
966 if (tg->count * sizeof(unsigned int) <= size)
968 unsigned int i;
969 const unsigned int *attr = (const unsigned int *)(tg + 1);
971 offset += tg->count * sizeof(unsigned int);
973 fputc( '[', stderr );
974 for (i = 0; i < tg->count; i++)
976 const SID *sid = (const SID *)((const char *)cur_data + offset);
977 if (i != 0)
978 fputc( ',', stderr );
979 fputc( '{', stderr );
980 fprintf( stderr, "attributes=%08x", attr[i] );
981 dump_inline_sid( ",sid=", sid, size - offset );
982 if ((offset + FIELD_OFFSET(SID, SubAuthority[0]) > size) ||
983 (offset + FIELD_OFFSET(SID, SubAuthority[sid->SubAuthorityCount]) > size))
984 break;
985 offset += FIELD_OFFSET(SID, SubAuthority[sid->SubAuthorityCount]);
986 fputc( '}', stderr );
988 fputc( ']', stderr );
991 fputc( '}', stderr );
994 static void dump_varargs_object_attributes( const char *prefix, data_size_t size )
996 const struct object_attributes *objattr = cur_data;
998 fprintf( stderr,"%s{", prefix );
999 if (size >= sizeof(struct object_attributes))
1001 const WCHAR *str;
1002 fprintf( stderr, "rootdir=%04x", objattr->rootdir );
1003 if (objattr->sd_len > size - sizeof(*objattr) ||
1004 objattr->name_len > size - sizeof(*objattr) - objattr->sd_len)
1005 return;
1006 dump_inline_security_descriptor( ",sd=", (const struct security_descriptor *)(objattr + 1), objattr->sd_len );
1007 str = (const WCHAR *)objattr + (sizeof(*objattr) + objattr->sd_len) / sizeof(WCHAR);
1008 fprintf( stderr, ",name=L\"" );
1009 dump_strW( str, objattr->name_len / sizeof(WCHAR), stderr, "\"\"" );
1010 fputc( '\"', stderr );
1011 remove_data( ((sizeof(*objattr) + objattr->sd_len) / sizeof(WCHAR)) * sizeof(WCHAR) +
1012 objattr->name_len );
1014 fputc( '}', stderr );
1017 typedef void (*dump_func)( const void *req );
1019 /* Everything below this line is generated automatically by tools/make_requests */
1020 /* ### make_requests begin ### */
1022 static void dump_new_process_request( const struct new_process_request *req )
1024 fprintf( stderr, " inherit_all=%d", req->inherit_all );
1025 fprintf( stderr, ", create_flags=%08x", req->create_flags );
1026 fprintf( stderr, ", socket_fd=%d", req->socket_fd );
1027 fprintf( stderr, ", exe_file=%04x", req->exe_file );
1028 fprintf( stderr, ", hstdin=%04x", req->hstdin );
1029 fprintf( stderr, ", hstdout=%04x", req->hstdout );
1030 fprintf( stderr, ", hstderr=%04x", req->hstderr );
1031 fprintf( stderr, ", process_access=%08x", req->process_access );
1032 fprintf( stderr, ", process_attr=%08x", req->process_attr );
1033 fprintf( stderr, ", thread_access=%08x", req->thread_access );
1034 fprintf( stderr, ", thread_attr=%08x", req->thread_attr );
1035 dump_varargs_startup_info( ", info=", cur_size );
1036 dump_varargs_unicode_str( ", env=", cur_size );
1039 static void dump_new_process_reply( const struct new_process_reply *req )
1041 fprintf( stderr, " info=%04x", req->info );
1042 fprintf( stderr, ", pid=%04x", req->pid );
1043 fprintf( stderr, ", phandle=%04x", req->phandle );
1044 fprintf( stderr, ", tid=%04x", req->tid );
1045 fprintf( stderr, ", thandle=%04x", req->thandle );
1048 static void dump_get_new_process_info_request( const struct get_new_process_info_request *req )
1050 fprintf( stderr, " info=%04x", req->info );
1053 static void dump_get_new_process_info_reply( const struct get_new_process_info_reply *req )
1055 fprintf( stderr, " success=%d", req->success );
1056 fprintf( stderr, ", exit_code=%d", req->exit_code );
1059 static void dump_new_thread_request( const struct new_thread_request *req )
1061 fprintf( stderr, " access=%08x", req->access );
1062 fprintf( stderr, ", attributes=%08x", req->attributes );
1063 fprintf( stderr, ", suspend=%d", req->suspend );
1064 fprintf( stderr, ", request_fd=%d", req->request_fd );
1067 static void dump_new_thread_reply( const struct new_thread_reply *req )
1069 fprintf( stderr, " tid=%04x", req->tid );
1070 fprintf( stderr, ", handle=%04x", req->handle );
1073 static void dump_get_startup_info_request( const struct get_startup_info_request *req )
1077 static void dump_get_startup_info_reply( const struct get_startup_info_reply *req )
1079 fprintf( stderr, " exe_file=%04x", req->exe_file );
1080 fprintf( stderr, ", hstdin=%04x", req->hstdin );
1081 fprintf( stderr, ", hstdout=%04x", req->hstdout );
1082 fprintf( stderr, ", hstderr=%04x", req->hstderr );
1083 dump_varargs_startup_info( ", info=", cur_size );
1084 dump_varargs_unicode_str( ", env=", cur_size );
1087 static void dump_init_process_done_request( const struct init_process_done_request *req )
1089 fprintf( stderr, " gui=%d", req->gui );
1090 dump_uint64( ", module=", &req->module );
1091 dump_uint64( ", ldt_copy=", &req->ldt_copy );
1092 dump_uint64( ", entry=", &req->entry );
1095 static void dump_init_thread_request( const struct init_thread_request *req )
1097 fprintf( stderr, " unix_pid=%d", req->unix_pid );
1098 fprintf( stderr, ", unix_tid=%d", req->unix_tid );
1099 fprintf( stderr, ", debug_level=%d", req->debug_level );
1100 dump_uint64( ", teb=", &req->teb );
1101 dump_uint64( ", entry=", &req->entry );
1102 fprintf( stderr, ", reply_fd=%d", req->reply_fd );
1103 fprintf( stderr, ", wait_fd=%d", req->wait_fd );
1104 dump_cpu_type( ", cpu=", &req->cpu );
1107 static void dump_init_thread_reply( const struct init_thread_reply *req )
1109 fprintf( stderr, " pid=%04x", req->pid );
1110 fprintf( stderr, ", tid=%04x", req->tid );
1111 dump_timeout( ", server_start=", &req->server_start );
1112 fprintf( stderr, ", info_size=%u", req->info_size );
1113 fprintf( stderr, ", version=%d", req->version );
1114 fprintf( stderr, ", all_cpus=%08x", req->all_cpus );
1117 static void dump_terminate_process_request( const struct terminate_process_request *req )
1119 fprintf( stderr, " handle=%04x", req->handle );
1120 fprintf( stderr, ", exit_code=%d", req->exit_code );
1123 static void dump_terminate_process_reply( const struct terminate_process_reply *req )
1125 fprintf( stderr, " self=%d", req->self );
1128 static void dump_terminate_thread_request( const struct terminate_thread_request *req )
1130 fprintf( stderr, " handle=%04x", req->handle );
1131 fprintf( stderr, ", exit_code=%d", req->exit_code );
1134 static void dump_terminate_thread_reply( const struct terminate_thread_reply *req )
1136 fprintf( stderr, " self=%d", req->self );
1137 fprintf( stderr, ", last=%d", req->last );
1140 static void dump_get_process_info_request( const struct get_process_info_request *req )
1142 fprintf( stderr, " handle=%04x", req->handle );
1145 static void dump_get_process_info_reply( const struct get_process_info_reply *req )
1147 fprintf( stderr, " pid=%04x", req->pid );
1148 fprintf( stderr, ", ppid=%04x", req->ppid );
1149 dump_uint64( ", affinity=", &req->affinity );
1150 dump_uint64( ", peb=", &req->peb );
1151 dump_timeout( ", start_time=", &req->start_time );
1152 dump_timeout( ", end_time=", &req->end_time );
1153 fprintf( stderr, ", exit_code=%d", req->exit_code );
1154 fprintf( stderr, ", priority=%d", req->priority );
1155 dump_cpu_type( ", cpu=", &req->cpu );
1158 static void dump_set_process_info_request( const struct set_process_info_request *req )
1160 fprintf( stderr, " handle=%04x", req->handle );
1161 fprintf( stderr, ", mask=%d", req->mask );
1162 fprintf( stderr, ", priority=%d", req->priority );
1163 dump_uint64( ", affinity=", &req->affinity );
1166 static void dump_get_thread_info_request( const struct get_thread_info_request *req )
1168 fprintf( stderr, " handle=%04x", req->handle );
1169 fprintf( stderr, ", tid_in=%04x", req->tid_in );
1172 static void dump_get_thread_info_reply( const struct get_thread_info_reply *req )
1174 fprintf( stderr, " pid=%04x", req->pid );
1175 fprintf( stderr, ", tid=%04x", req->tid );
1176 dump_uint64( ", teb=", &req->teb );
1177 dump_uint64( ", affinity=", &req->affinity );
1178 dump_timeout( ", creation_time=", &req->creation_time );
1179 dump_timeout( ", exit_time=", &req->exit_time );
1180 fprintf( stderr, ", exit_code=%d", req->exit_code );
1181 fprintf( stderr, ", priority=%d", req->priority );
1182 fprintf( stderr, ", last=%d", req->last );
1185 static void dump_set_thread_info_request( const struct set_thread_info_request *req )
1187 fprintf( stderr, " handle=%04x", req->handle );
1188 fprintf( stderr, ", mask=%d", req->mask );
1189 fprintf( stderr, ", priority=%d", req->priority );
1190 dump_uint64( ", affinity=", &req->affinity );
1191 fprintf( stderr, ", token=%04x", req->token );
1194 static void dump_get_dll_info_request( const struct get_dll_info_request *req )
1196 fprintf( stderr, " handle=%04x", req->handle );
1197 dump_uint64( ", base_address=", &req->base_address );
1200 static void dump_get_dll_info_reply( const struct get_dll_info_reply *req )
1202 dump_uint64( " entry_point=", &req->entry_point );
1203 fprintf( stderr, ", size=%u", req->size );
1204 fprintf( stderr, ", filename_len=%u", req->filename_len );
1205 dump_varargs_unicode_str( ", filename=", cur_size );
1208 static void dump_suspend_thread_request( const struct suspend_thread_request *req )
1210 fprintf( stderr, " handle=%04x", req->handle );
1213 static void dump_suspend_thread_reply( const struct suspend_thread_reply *req )
1215 fprintf( stderr, " count=%d", req->count );
1218 static void dump_resume_thread_request( const struct resume_thread_request *req )
1220 fprintf( stderr, " handle=%04x", req->handle );
1223 static void dump_resume_thread_reply( const struct resume_thread_reply *req )
1225 fprintf( stderr, " count=%d", req->count );
1228 static void dump_load_dll_request( const struct load_dll_request *req )
1230 fprintf( stderr, " handle=%04x", req->handle );
1231 dump_uint64( ", base=", &req->base );
1232 dump_uint64( ", name=", &req->name );
1233 fprintf( stderr, ", size=%u", req->size );
1234 fprintf( stderr, ", dbg_offset=%d", req->dbg_offset );
1235 fprintf( stderr, ", dbg_size=%d", req->dbg_size );
1236 dump_varargs_unicode_str( ", filename=", cur_size );
1239 static void dump_unload_dll_request( const struct unload_dll_request *req )
1241 dump_uint64( " base=", &req->base );
1244 static void dump_queue_apc_request( const struct queue_apc_request *req )
1246 fprintf( stderr, " handle=%04x", req->handle );
1247 dump_apc_call( ", call=", &req->call );
1250 static void dump_queue_apc_reply( const struct queue_apc_reply *req )
1252 fprintf( stderr, " handle=%04x", req->handle );
1253 fprintf( stderr, ", self=%d", req->self );
1256 static void dump_get_apc_result_request( const struct get_apc_result_request *req )
1258 fprintf( stderr, " handle=%04x", req->handle );
1261 static void dump_get_apc_result_reply( const struct get_apc_result_reply *req )
1263 dump_apc_result( " result=", &req->result );
1266 static void dump_close_handle_request( const struct close_handle_request *req )
1268 fprintf( stderr, " handle=%04x", req->handle );
1271 static void dump_set_handle_info_request( const struct set_handle_info_request *req )
1273 fprintf( stderr, " handle=%04x", req->handle );
1274 fprintf( stderr, ", flags=%d", req->flags );
1275 fprintf( stderr, ", mask=%d", req->mask );
1278 static void dump_set_handle_info_reply( const struct set_handle_info_reply *req )
1280 fprintf( stderr, " old_flags=%d", req->old_flags );
1283 static void dump_dup_handle_request( const struct dup_handle_request *req )
1285 fprintf( stderr, " src_process=%04x", req->src_process );
1286 fprintf( stderr, ", src_handle=%04x", req->src_handle );
1287 fprintf( stderr, ", dst_process=%04x", req->dst_process );
1288 fprintf( stderr, ", access=%08x", req->access );
1289 fprintf( stderr, ", attributes=%08x", req->attributes );
1290 fprintf( stderr, ", options=%08x", req->options );
1293 static void dump_dup_handle_reply( const struct dup_handle_reply *req )
1295 fprintf( stderr, " handle=%04x", req->handle );
1296 fprintf( stderr, ", self=%d", req->self );
1297 fprintf( stderr, ", closed=%d", req->closed );
1300 static void dump_open_process_request( const struct open_process_request *req )
1302 fprintf( stderr, " pid=%04x", req->pid );
1303 fprintf( stderr, ", access=%08x", req->access );
1304 fprintf( stderr, ", attributes=%08x", req->attributes );
1307 static void dump_open_process_reply( const struct open_process_reply *req )
1309 fprintf( stderr, " handle=%04x", req->handle );
1312 static void dump_open_thread_request( const struct open_thread_request *req )
1314 fprintf( stderr, " tid=%04x", req->tid );
1315 fprintf( stderr, ", access=%08x", req->access );
1316 fprintf( stderr, ", attributes=%08x", req->attributes );
1319 static void dump_open_thread_reply( const struct open_thread_reply *req )
1321 fprintf( stderr, " handle=%04x", req->handle );
1324 static void dump_select_request( const struct select_request *req )
1326 fprintf( stderr, " flags=%d", req->flags );
1327 dump_uint64( ", cookie=", &req->cookie );
1328 fprintf( stderr, ", signal=%04x", req->signal );
1329 fprintf( stderr, ", prev_apc=%04x", req->prev_apc );
1330 dump_timeout( ", timeout=", &req->timeout );
1331 dump_varargs_apc_result( ", result=", cur_size );
1332 dump_varargs_handles( ", handles=", cur_size );
1335 static void dump_select_reply( const struct select_reply *req )
1337 dump_timeout( " timeout=", &req->timeout );
1338 dump_apc_call( ", call=", &req->call );
1339 fprintf( stderr, ", apc_handle=%04x", req->apc_handle );
1342 static void dump_create_event_request( const struct create_event_request *req )
1344 fprintf( stderr, " access=%08x", req->access );
1345 fprintf( stderr, ", attributes=%08x", req->attributes );
1346 fprintf( stderr, ", manual_reset=%d", req->manual_reset );
1347 fprintf( stderr, ", initial_state=%d", req->initial_state );
1348 dump_varargs_object_attributes( ", objattr=", cur_size );
1351 static void dump_create_event_reply( const struct create_event_reply *req )
1353 fprintf( stderr, " handle=%04x", req->handle );
1356 static void dump_event_op_request( const struct event_op_request *req )
1358 fprintf( stderr, " handle=%04x", req->handle );
1359 fprintf( stderr, ", op=%d", req->op );
1362 static void dump_open_event_request( const struct open_event_request *req )
1364 fprintf( stderr, " access=%08x", req->access );
1365 fprintf( stderr, ", attributes=%08x", req->attributes );
1366 fprintf( stderr, ", rootdir=%04x", req->rootdir );
1367 dump_varargs_unicode_str( ", name=", cur_size );
1370 static void dump_open_event_reply( const struct open_event_reply *req )
1372 fprintf( stderr, " handle=%04x", req->handle );
1375 static void dump_create_mutex_request( const struct create_mutex_request *req )
1377 fprintf( stderr, " access=%08x", req->access );
1378 fprintf( stderr, ", attributes=%08x", req->attributes );
1379 fprintf( stderr, ", owned=%d", req->owned );
1380 dump_varargs_object_attributes( ", objattr=", cur_size );
1383 static void dump_create_mutex_reply( const struct create_mutex_reply *req )
1385 fprintf( stderr, " handle=%04x", req->handle );
1388 static void dump_release_mutex_request( const struct release_mutex_request *req )
1390 fprintf( stderr, " handle=%04x", req->handle );
1393 static void dump_release_mutex_reply( const struct release_mutex_reply *req )
1395 fprintf( stderr, " prev_count=%08x", req->prev_count );
1398 static void dump_open_mutex_request( const struct open_mutex_request *req )
1400 fprintf( stderr, " access=%08x", req->access );
1401 fprintf( stderr, ", attributes=%08x", req->attributes );
1402 fprintf( stderr, ", rootdir=%04x", req->rootdir );
1403 dump_varargs_unicode_str( ", name=", cur_size );
1406 static void dump_open_mutex_reply( const struct open_mutex_reply *req )
1408 fprintf( stderr, " handle=%04x", req->handle );
1411 static void dump_create_semaphore_request( const struct create_semaphore_request *req )
1413 fprintf( stderr, " access=%08x", req->access );
1414 fprintf( stderr, ", attributes=%08x", req->attributes );
1415 fprintf( stderr, ", initial=%08x", req->initial );
1416 fprintf( stderr, ", max=%08x", req->max );
1417 dump_varargs_object_attributes( ", objattr=", cur_size );
1420 static void dump_create_semaphore_reply( const struct create_semaphore_reply *req )
1422 fprintf( stderr, " handle=%04x", req->handle );
1425 static void dump_release_semaphore_request( const struct release_semaphore_request *req )
1427 fprintf( stderr, " handle=%04x", req->handle );
1428 fprintf( stderr, ", count=%08x", req->count );
1431 static void dump_release_semaphore_reply( const struct release_semaphore_reply *req )
1433 fprintf( stderr, " prev_count=%08x", req->prev_count );
1436 static void dump_open_semaphore_request( const struct open_semaphore_request *req )
1438 fprintf( stderr, " access=%08x", req->access );
1439 fprintf( stderr, ", attributes=%08x", req->attributes );
1440 fprintf( stderr, ", rootdir=%04x", req->rootdir );
1441 dump_varargs_unicode_str( ", name=", cur_size );
1444 static void dump_open_semaphore_reply( const struct open_semaphore_reply *req )
1446 fprintf( stderr, " handle=%04x", req->handle );
1449 static void dump_create_file_request( const struct create_file_request *req )
1451 fprintf( stderr, " access=%08x", req->access );
1452 fprintf( stderr, ", attributes=%08x", req->attributes );
1453 fprintf( stderr, ", sharing=%08x", req->sharing );
1454 fprintf( stderr, ", create=%d", req->create );
1455 fprintf( stderr, ", options=%08x", req->options );
1456 fprintf( stderr, ", attrs=%08x", req->attrs );
1457 dump_varargs_object_attributes( ", objattr=", cur_size );
1458 dump_varargs_string( ", filename=", cur_size );
1461 static void dump_create_file_reply( const struct create_file_reply *req )
1463 fprintf( stderr, " handle=%04x", req->handle );
1466 static void dump_open_file_object_request( const struct open_file_object_request *req )
1468 fprintf( stderr, " access=%08x", req->access );
1469 fprintf( stderr, ", attributes=%08x", req->attributes );
1470 fprintf( stderr, ", rootdir=%04x", req->rootdir );
1471 fprintf( stderr, ", sharing=%08x", req->sharing );
1472 fprintf( stderr, ", options=%08x", req->options );
1473 dump_varargs_unicode_str( ", filename=", cur_size );
1476 static void dump_open_file_object_reply( const struct open_file_object_reply *req )
1478 fprintf( stderr, " handle=%04x", req->handle );
1481 static void dump_alloc_file_handle_request( const struct alloc_file_handle_request *req )
1483 fprintf( stderr, " access=%08x", req->access );
1484 fprintf( stderr, ", attributes=%08x", req->attributes );
1485 fprintf( stderr, ", fd=%d", req->fd );
1488 static void dump_alloc_file_handle_reply( const struct alloc_file_handle_reply *req )
1490 fprintf( stderr, " handle=%04x", req->handle );
1493 static void dump_get_handle_fd_request( const struct get_handle_fd_request *req )
1495 fprintf( stderr, " handle=%04x", req->handle );
1498 static void dump_get_handle_fd_reply( const struct get_handle_fd_reply *req )
1500 fprintf( stderr, " type=%d", req->type );
1501 fprintf( stderr, ", removable=%d", req->removable );
1502 fprintf( stderr, ", access=%08x", req->access );
1503 fprintf( stderr, ", options=%08x", req->options );
1506 static void dump_flush_file_request( const struct flush_file_request *req )
1508 fprintf( stderr, " handle=%04x", req->handle );
1511 static void dump_flush_file_reply( const struct flush_file_reply *req )
1513 fprintf( stderr, " event=%04x", req->event );
1516 static void dump_lock_file_request( const struct lock_file_request *req )
1518 fprintf( stderr, " handle=%04x", req->handle );
1519 dump_uint64( ", offset=", &req->offset );
1520 dump_uint64( ", count=", &req->count );
1521 fprintf( stderr, ", shared=%d", req->shared );
1522 fprintf( stderr, ", wait=%d", req->wait );
1525 static void dump_lock_file_reply( const struct lock_file_reply *req )
1527 fprintf( stderr, " handle=%04x", req->handle );
1528 fprintf( stderr, ", overlapped=%d", req->overlapped );
1531 static void dump_unlock_file_request( const struct unlock_file_request *req )
1533 fprintf( stderr, " handle=%04x", req->handle );
1534 dump_uint64( ", offset=", &req->offset );
1535 dump_uint64( ", count=", &req->count );
1538 static void dump_create_socket_request( const struct create_socket_request *req )
1540 fprintf( stderr, " access=%08x", req->access );
1541 fprintf( stderr, ", attributes=%08x", req->attributes );
1542 fprintf( stderr, ", family=%d", req->family );
1543 fprintf( stderr, ", type=%d", req->type );
1544 fprintf( stderr, ", protocol=%d", req->protocol );
1545 fprintf( stderr, ", flags=%08x", req->flags );
1548 static void dump_create_socket_reply( const struct create_socket_reply *req )
1550 fprintf( stderr, " handle=%04x", req->handle );
1553 static void dump_accept_socket_request( const struct accept_socket_request *req )
1555 fprintf( stderr, " lhandle=%04x", req->lhandle );
1556 fprintf( stderr, ", access=%08x", req->access );
1557 fprintf( stderr, ", attributes=%08x", req->attributes );
1560 static void dump_accept_socket_reply( const struct accept_socket_reply *req )
1562 fprintf( stderr, " handle=%04x", req->handle );
1565 static void dump_set_socket_event_request( const struct set_socket_event_request *req )
1567 fprintf( stderr, " handle=%04x", req->handle );
1568 fprintf( stderr, ", mask=%08x", req->mask );
1569 fprintf( stderr, ", event=%04x", req->event );
1570 fprintf( stderr, ", window=%08x", req->window );
1571 fprintf( stderr, ", msg=%08x", req->msg );
1574 static void dump_get_socket_event_request( const struct get_socket_event_request *req )
1576 fprintf( stderr, " handle=%04x", req->handle );
1577 fprintf( stderr, ", service=%d", req->service );
1578 fprintf( stderr, ", c_event=%04x", req->c_event );
1581 static void dump_get_socket_event_reply( const struct get_socket_event_reply *req )
1583 fprintf( stderr, " mask=%08x", req->mask );
1584 fprintf( stderr, ", pmask=%08x", req->pmask );
1585 fprintf( stderr, ", state=%08x", req->state );
1586 dump_varargs_ints( ", errors=", cur_size );
1589 static void dump_enable_socket_event_request( const struct enable_socket_event_request *req )
1591 fprintf( stderr, " handle=%04x", req->handle );
1592 fprintf( stderr, ", mask=%08x", req->mask );
1593 fprintf( stderr, ", sstate=%08x", req->sstate );
1594 fprintf( stderr, ", cstate=%08x", req->cstate );
1597 static void dump_set_socket_deferred_request( const struct set_socket_deferred_request *req )
1599 fprintf( stderr, " handle=%04x", req->handle );
1600 fprintf( stderr, ", deferred=%04x", req->deferred );
1603 static void dump_alloc_console_request( const struct alloc_console_request *req )
1605 fprintf( stderr, " access=%08x", req->access );
1606 fprintf( stderr, ", attributes=%08x", req->attributes );
1607 fprintf( stderr, ", pid=%04x", req->pid );
1610 static void dump_alloc_console_reply( const struct alloc_console_reply *req )
1612 fprintf( stderr, " handle_in=%04x", req->handle_in );
1613 fprintf( stderr, ", event=%04x", req->event );
1616 static void dump_free_console_request( const struct free_console_request *req )
1620 static void dump_get_console_renderer_events_request( const struct get_console_renderer_events_request *req )
1622 fprintf( stderr, " handle=%04x", req->handle );
1625 static void dump_get_console_renderer_events_reply( const struct get_console_renderer_events_reply *req )
1627 dump_varargs_bytes( " data=", cur_size );
1630 static void dump_open_console_request( const struct open_console_request *req )
1632 fprintf( stderr, " from=%04x", req->from );
1633 fprintf( stderr, ", access=%08x", req->access );
1634 fprintf( stderr, ", attributes=%08x", req->attributes );
1635 fprintf( stderr, ", share=%d", req->share );
1638 static void dump_open_console_reply( const struct open_console_reply *req )
1640 fprintf( stderr, " handle=%04x", req->handle );
1643 static void dump_get_console_wait_event_request( const struct get_console_wait_event_request *req )
1647 static void dump_get_console_wait_event_reply( const struct get_console_wait_event_reply *req )
1649 fprintf( stderr, " handle=%04x", req->handle );
1652 static void dump_get_console_mode_request( const struct get_console_mode_request *req )
1654 fprintf( stderr, " handle=%04x", req->handle );
1657 static void dump_get_console_mode_reply( const struct get_console_mode_reply *req )
1659 fprintf( stderr, " mode=%d", req->mode );
1662 static void dump_set_console_mode_request( const struct set_console_mode_request *req )
1664 fprintf( stderr, " handle=%04x", req->handle );
1665 fprintf( stderr, ", mode=%d", req->mode );
1668 static void dump_set_console_input_info_request( const struct set_console_input_info_request *req )
1670 fprintf( stderr, " handle=%04x", req->handle );
1671 fprintf( stderr, ", mask=%d", req->mask );
1672 fprintf( stderr, ", active_sb=%04x", req->active_sb );
1673 fprintf( stderr, ", history_mode=%d", req->history_mode );
1674 fprintf( stderr, ", history_size=%d", req->history_size );
1675 fprintf( stderr, ", edition_mode=%d", req->edition_mode );
1676 fprintf( stderr, ", input_cp=%d", req->input_cp );
1677 fprintf( stderr, ", output_cp=%d", req->output_cp );
1678 fprintf( stderr, ", win=%08x", req->win );
1679 dump_varargs_unicode_str( ", title=", cur_size );
1682 static void dump_get_console_input_info_request( const struct get_console_input_info_request *req )
1684 fprintf( stderr, " handle=%04x", req->handle );
1687 static void dump_get_console_input_info_reply( const struct get_console_input_info_reply *req )
1689 fprintf( stderr, " history_mode=%d", req->history_mode );
1690 fprintf( stderr, ", history_size=%d", req->history_size );
1691 fprintf( stderr, ", history_index=%d", req->history_index );
1692 fprintf( stderr, ", edition_mode=%d", req->edition_mode );
1693 fprintf( stderr, ", input_cp=%d", req->input_cp );
1694 fprintf( stderr, ", output_cp=%d", req->output_cp );
1695 fprintf( stderr, ", win=%08x", req->win );
1696 dump_varargs_unicode_str( ", title=", cur_size );
1699 static void dump_append_console_input_history_request( const struct append_console_input_history_request *req )
1701 fprintf( stderr, " handle=%04x", req->handle );
1702 dump_varargs_unicode_str( ", line=", cur_size );
1705 static void dump_get_console_input_history_request( const struct get_console_input_history_request *req )
1707 fprintf( stderr, " handle=%04x", req->handle );
1708 fprintf( stderr, ", index=%d", req->index );
1711 static void dump_get_console_input_history_reply( const struct get_console_input_history_reply *req )
1713 fprintf( stderr, " total=%d", req->total );
1714 dump_varargs_unicode_str( ", line=", cur_size );
1717 static void dump_create_console_output_request( const struct create_console_output_request *req )
1719 fprintf( stderr, " handle_in=%04x", req->handle_in );
1720 fprintf( stderr, ", access=%08x", req->access );
1721 fprintf( stderr, ", attributes=%08x", req->attributes );
1722 fprintf( stderr, ", share=%08x", req->share );
1725 static void dump_create_console_output_reply( const struct create_console_output_reply *req )
1727 fprintf( stderr, " handle_out=%04x", req->handle_out );
1730 static void dump_set_console_output_info_request( const struct set_console_output_info_request *req )
1732 fprintf( stderr, " handle=%04x", req->handle );
1733 fprintf( stderr, ", mask=%d", req->mask );
1734 fprintf( stderr, ", cursor_size=%d", req->cursor_size );
1735 fprintf( stderr, ", cursor_visible=%d", req->cursor_visible );
1736 fprintf( stderr, ", cursor_x=%d", req->cursor_x );
1737 fprintf( stderr, ", cursor_y=%d", req->cursor_y );
1738 fprintf( stderr, ", width=%d", req->width );
1739 fprintf( stderr, ", height=%d", req->height );
1740 fprintf( stderr, ", attr=%d", req->attr );
1741 fprintf( stderr, ", win_left=%d", req->win_left );
1742 fprintf( stderr, ", win_top=%d", req->win_top );
1743 fprintf( stderr, ", win_right=%d", req->win_right );
1744 fprintf( stderr, ", win_bottom=%d", req->win_bottom );
1745 fprintf( stderr, ", max_width=%d", req->max_width );
1746 fprintf( stderr, ", max_height=%d", req->max_height );
1749 static void dump_get_console_output_info_request( const struct get_console_output_info_request *req )
1751 fprintf( stderr, " handle=%04x", req->handle );
1754 static void dump_get_console_output_info_reply( const struct get_console_output_info_reply *req )
1756 fprintf( stderr, " cursor_size=%d", req->cursor_size );
1757 fprintf( stderr, ", cursor_visible=%d", req->cursor_visible );
1758 fprintf( stderr, ", cursor_x=%d", req->cursor_x );
1759 fprintf( stderr, ", cursor_y=%d", req->cursor_y );
1760 fprintf( stderr, ", width=%d", req->width );
1761 fprintf( stderr, ", height=%d", req->height );
1762 fprintf( stderr, ", attr=%d", req->attr );
1763 fprintf( stderr, ", win_left=%d", req->win_left );
1764 fprintf( stderr, ", win_top=%d", req->win_top );
1765 fprintf( stderr, ", win_right=%d", req->win_right );
1766 fprintf( stderr, ", win_bottom=%d", req->win_bottom );
1767 fprintf( stderr, ", max_width=%d", req->max_width );
1768 fprintf( stderr, ", max_height=%d", req->max_height );
1771 static void dump_write_console_input_request( const struct write_console_input_request *req )
1773 fprintf( stderr, " handle=%04x", req->handle );
1774 dump_varargs_input_records( ", rec=", cur_size );
1777 static void dump_write_console_input_reply( const struct write_console_input_reply *req )
1779 fprintf( stderr, " written=%d", req->written );
1782 static void dump_read_console_input_request( const struct read_console_input_request *req )
1784 fprintf( stderr, " handle=%04x", req->handle );
1785 fprintf( stderr, ", flush=%d", req->flush );
1788 static void dump_read_console_input_reply( const struct read_console_input_reply *req )
1790 fprintf( stderr, " read=%d", req->read );
1791 dump_varargs_input_records( ", rec=", cur_size );
1794 static void dump_write_console_output_request( const struct write_console_output_request *req )
1796 fprintf( stderr, " handle=%04x", req->handle );
1797 fprintf( stderr, ", x=%d", req->x );
1798 fprintf( stderr, ", y=%d", req->y );
1799 fprintf( stderr, ", mode=%d", req->mode );
1800 fprintf( stderr, ", wrap=%d", req->wrap );
1801 dump_varargs_bytes( ", data=", cur_size );
1804 static void dump_write_console_output_reply( const struct write_console_output_reply *req )
1806 fprintf( stderr, " written=%d", req->written );
1807 fprintf( stderr, ", width=%d", req->width );
1808 fprintf( stderr, ", height=%d", req->height );
1811 static void dump_fill_console_output_request( const struct fill_console_output_request *req )
1813 fprintf( stderr, " handle=%04x", req->handle );
1814 fprintf( stderr, ", x=%d", req->x );
1815 fprintf( stderr, ", y=%d", req->y );
1816 fprintf( stderr, ", mode=%d", req->mode );
1817 fprintf( stderr, ", count=%d", req->count );
1818 fprintf( stderr, ", wrap=%d", req->wrap );
1819 dump_char_info( ", data=", &req->data );
1822 static void dump_fill_console_output_reply( const struct fill_console_output_reply *req )
1824 fprintf( stderr, " written=%d", req->written );
1827 static void dump_read_console_output_request( const struct read_console_output_request *req )
1829 fprintf( stderr, " handle=%04x", req->handle );
1830 fprintf( stderr, ", x=%d", req->x );
1831 fprintf( stderr, ", y=%d", req->y );
1832 fprintf( stderr, ", mode=%d", req->mode );
1833 fprintf( stderr, ", wrap=%d", req->wrap );
1836 static void dump_read_console_output_reply( const struct read_console_output_reply *req )
1838 fprintf( stderr, " width=%d", req->width );
1839 fprintf( stderr, ", height=%d", req->height );
1840 dump_varargs_bytes( ", data=", cur_size );
1843 static void dump_move_console_output_request( const struct move_console_output_request *req )
1845 fprintf( stderr, " handle=%04x", req->handle );
1846 fprintf( stderr, ", x_src=%d", req->x_src );
1847 fprintf( stderr, ", y_src=%d", req->y_src );
1848 fprintf( stderr, ", x_dst=%d", req->x_dst );
1849 fprintf( stderr, ", y_dst=%d", req->y_dst );
1850 fprintf( stderr, ", w=%d", req->w );
1851 fprintf( stderr, ", h=%d", req->h );
1854 static void dump_send_console_signal_request( const struct send_console_signal_request *req )
1856 fprintf( stderr, " signal=%d", req->signal );
1857 fprintf( stderr, ", group_id=%04x", req->group_id );
1860 static void dump_read_directory_changes_request( const struct read_directory_changes_request *req )
1862 fprintf( stderr, " filter=%08x", req->filter );
1863 fprintf( stderr, ", subtree=%d", req->subtree );
1864 fprintf( stderr, ", want_data=%d", req->want_data );
1865 dump_async_data( ", async=", &req->async );
1868 static void dump_read_change_request( const struct read_change_request *req )
1870 fprintf( stderr, " handle=%04x", req->handle );
1873 static void dump_read_change_reply( const struct read_change_reply *req )
1875 fprintf( stderr, " action=%d", req->action );
1876 dump_varargs_string( ", name=", cur_size );
1879 static void dump_create_mapping_request( const struct create_mapping_request *req )
1881 fprintf( stderr, " access=%08x", req->access );
1882 fprintf( stderr, ", attributes=%08x", req->attributes );
1883 fprintf( stderr, ", protect=%08x", req->protect );
1884 dump_uint64( ", size=", &req->size );
1885 fprintf( stderr, ", file_handle=%04x", req->file_handle );
1886 dump_varargs_object_attributes( ", objattr=", cur_size );
1889 static void dump_create_mapping_reply( const struct create_mapping_reply *req )
1891 fprintf( stderr, " handle=%04x", req->handle );
1894 static void dump_open_mapping_request( const struct open_mapping_request *req )
1896 fprintf( stderr, " access=%08x", req->access );
1897 fprintf( stderr, ", attributes=%08x", req->attributes );
1898 fprintf( stderr, ", rootdir=%04x", req->rootdir );
1899 dump_varargs_unicode_str( ", name=", cur_size );
1902 static void dump_open_mapping_reply( const struct open_mapping_reply *req )
1904 fprintf( stderr, " handle=%04x", req->handle );
1907 static void dump_get_mapping_info_request( const struct get_mapping_info_request *req )
1909 fprintf( stderr, " handle=%04x", req->handle );
1910 fprintf( stderr, ", access=%08x", req->access );
1913 static void dump_get_mapping_info_reply( const struct get_mapping_info_reply *req )
1915 dump_uint64( " size=", &req->size );
1916 fprintf( stderr, ", protect=%d", req->protect );
1917 fprintf( stderr, ", header_size=%d", req->header_size );
1918 dump_uint64( ", base=", &req->base );
1919 fprintf( stderr, ", mapping=%04x", req->mapping );
1920 fprintf( stderr, ", shared_file=%04x", req->shared_file );
1923 static void dump_get_mapping_committed_range_request( const struct get_mapping_committed_range_request *req )
1925 fprintf( stderr, " handle=%04x", req->handle );
1926 dump_uint64( ", offset=", &req->offset );
1929 static void dump_get_mapping_committed_range_reply( const struct get_mapping_committed_range_reply *req )
1931 dump_uint64( " size=", &req->size );
1932 fprintf( stderr, ", committed=%d", req->committed );
1935 static void dump_add_mapping_committed_range_request( const struct add_mapping_committed_range_request *req )
1937 fprintf( stderr, " handle=%04x", req->handle );
1938 dump_uint64( ", offset=", &req->offset );
1939 dump_uint64( ", size=", &req->size );
1942 static void dump_create_snapshot_request( const struct create_snapshot_request *req )
1944 fprintf( stderr, " attributes=%08x", req->attributes );
1945 fprintf( stderr, ", flags=%08x", req->flags );
1948 static void dump_create_snapshot_reply( const struct create_snapshot_reply *req )
1950 fprintf( stderr, " handle=%04x", req->handle );
1953 static void dump_next_process_request( const struct next_process_request *req )
1955 fprintf( stderr, " handle=%04x", req->handle );
1956 fprintf( stderr, ", reset=%d", req->reset );
1959 static void dump_next_process_reply( const struct next_process_reply *req )
1961 fprintf( stderr, " count=%d", req->count );
1962 fprintf( stderr, ", pid=%04x", req->pid );
1963 fprintf( stderr, ", ppid=%04x", req->ppid );
1964 fprintf( stderr, ", threads=%d", req->threads );
1965 fprintf( stderr, ", priority=%d", req->priority );
1966 fprintf( stderr, ", handles=%d", req->handles );
1967 dump_varargs_unicode_str( ", filename=", cur_size );
1970 static void dump_next_thread_request( const struct next_thread_request *req )
1972 fprintf( stderr, " handle=%04x", req->handle );
1973 fprintf( stderr, ", reset=%d", req->reset );
1976 static void dump_next_thread_reply( const struct next_thread_reply *req )
1978 fprintf( stderr, " count=%d", req->count );
1979 fprintf( stderr, ", pid=%04x", req->pid );
1980 fprintf( stderr, ", tid=%04x", req->tid );
1981 fprintf( stderr, ", base_pri=%d", req->base_pri );
1982 fprintf( stderr, ", delta_pri=%d", req->delta_pri );
1985 static void dump_wait_debug_event_request( const struct wait_debug_event_request *req )
1987 fprintf( stderr, " get_handle=%d", req->get_handle );
1990 static void dump_wait_debug_event_reply( const struct wait_debug_event_reply *req )
1992 fprintf( stderr, " pid=%04x", req->pid );
1993 fprintf( stderr, ", tid=%04x", req->tid );
1994 fprintf( stderr, ", wait=%04x", req->wait );
1995 dump_varargs_debug_event( ", event=", cur_size );
1998 static void dump_queue_exception_event_request( const struct queue_exception_event_request *req )
2000 fprintf( stderr, " first=%d", req->first );
2001 fprintf( stderr, ", code=%08x", req->code );
2002 fprintf( stderr, ", flags=%08x", req->flags );
2003 dump_uint64( ", record=", &req->record );
2004 dump_uint64( ", address=", &req->address );
2005 fprintf( stderr, ", len=%u", req->len );
2006 dump_varargs_uints64( ", params=", min(cur_size,req->len) );
2007 dump_varargs_context( ", context=", cur_size );
2010 static void dump_queue_exception_event_reply( const struct queue_exception_event_reply *req )
2012 fprintf( stderr, " handle=%04x", req->handle );
2015 static void dump_get_exception_status_request( const struct get_exception_status_request *req )
2017 fprintf( stderr, " handle=%04x", req->handle );
2020 static void dump_get_exception_status_reply( const struct get_exception_status_reply *req )
2022 dump_varargs_context( " context=", cur_size );
2025 static void dump_output_debug_string_request( const struct output_debug_string_request *req )
2027 fprintf( stderr, " length=%u", req->length );
2028 dump_uint64( ", string=", &req->string );
2029 fprintf( stderr, ", unicode=%d", req->unicode );
2032 static void dump_continue_debug_event_request( const struct continue_debug_event_request *req )
2034 fprintf( stderr, " pid=%04x", req->pid );
2035 fprintf( stderr, ", tid=%04x", req->tid );
2036 fprintf( stderr, ", status=%d", req->status );
2039 static void dump_debug_process_request( const struct debug_process_request *req )
2041 fprintf( stderr, " pid=%04x", req->pid );
2042 fprintf( stderr, ", attach=%d", req->attach );
2045 static void dump_debug_break_request( const struct debug_break_request *req )
2047 fprintf( stderr, " handle=%04x", req->handle );
2050 static void dump_debug_break_reply( const struct debug_break_reply *req )
2052 fprintf( stderr, " self=%d", req->self );
2055 static void dump_set_debugger_kill_on_exit_request( const struct set_debugger_kill_on_exit_request *req )
2057 fprintf( stderr, " kill_on_exit=%d", req->kill_on_exit );
2060 static void dump_read_process_memory_request( const struct read_process_memory_request *req )
2062 fprintf( stderr, " handle=%04x", req->handle );
2063 dump_uint64( ", addr=", &req->addr );
2066 static void dump_read_process_memory_reply( const struct read_process_memory_reply *req )
2068 dump_varargs_bytes( " data=", cur_size );
2071 static void dump_write_process_memory_request( const struct write_process_memory_request *req )
2073 fprintf( stderr, " handle=%04x", req->handle );
2074 dump_uint64( ", addr=", &req->addr );
2075 dump_varargs_bytes( ", data=", cur_size );
2078 static void dump_create_key_request( const struct create_key_request *req )
2080 fprintf( stderr, " parent=%04x", req->parent );
2081 fprintf( stderr, ", access=%08x", req->access );
2082 fprintf( stderr, ", attributes=%08x", req->attributes );
2083 fprintf( stderr, ", options=%08x", req->options );
2084 fprintf( stderr, ", namelen=%u", req->namelen );
2085 dump_varargs_unicode_str( ", name=", min(cur_size,req->namelen) );
2086 dump_varargs_unicode_str( ", class=", cur_size );
2089 static void dump_create_key_reply( const struct create_key_reply *req )
2091 fprintf( stderr, " hkey=%04x", req->hkey );
2092 fprintf( stderr, ", created=%d", req->created );
2095 static void dump_open_key_request( const struct open_key_request *req )
2097 fprintf( stderr, " parent=%04x", req->parent );
2098 fprintf( stderr, ", access=%08x", req->access );
2099 fprintf( stderr, ", attributes=%08x", req->attributes );
2100 dump_varargs_unicode_str( ", name=", cur_size );
2103 static void dump_open_key_reply( const struct open_key_reply *req )
2105 fprintf( stderr, " hkey=%04x", req->hkey );
2108 static void dump_delete_key_request( const struct delete_key_request *req )
2110 fprintf( stderr, " hkey=%04x", req->hkey );
2113 static void dump_flush_key_request( const struct flush_key_request *req )
2115 fprintf( stderr, " hkey=%04x", req->hkey );
2118 static void dump_enum_key_request( const struct enum_key_request *req )
2120 fprintf( stderr, " hkey=%04x", req->hkey );
2121 fprintf( stderr, ", index=%d", req->index );
2122 fprintf( stderr, ", info_class=%d", req->info_class );
2125 static void dump_enum_key_reply( const struct enum_key_reply *req )
2127 fprintf( stderr, " subkeys=%d", req->subkeys );
2128 fprintf( stderr, ", max_subkey=%d", req->max_subkey );
2129 fprintf( stderr, ", max_class=%d", req->max_class );
2130 fprintf( stderr, ", values=%d", req->values );
2131 fprintf( stderr, ", max_value=%d", req->max_value );
2132 fprintf( stderr, ", max_data=%d", req->max_data );
2133 dump_timeout( ", modif=", &req->modif );
2134 fprintf( stderr, ", total=%u", req->total );
2135 fprintf( stderr, ", namelen=%u", req->namelen );
2136 dump_varargs_unicode_str( ", name=", min(cur_size,req->namelen) );
2137 dump_varargs_unicode_str( ", class=", cur_size );
2140 static void dump_set_key_value_request( const struct set_key_value_request *req )
2142 fprintf( stderr, " hkey=%04x", req->hkey );
2143 fprintf( stderr, ", type=%d", req->type );
2144 fprintf( stderr, ", namelen=%u", req->namelen );
2145 dump_varargs_unicode_str( ", name=", min(cur_size,req->namelen) );
2146 dump_varargs_bytes( ", data=", cur_size );
2149 static void dump_get_key_value_request( const struct get_key_value_request *req )
2151 fprintf( stderr, " hkey=%04x", req->hkey );
2152 dump_varargs_unicode_str( ", name=", cur_size );
2155 static void dump_get_key_value_reply( const struct get_key_value_reply *req )
2157 fprintf( stderr, " type=%d", req->type );
2158 fprintf( stderr, ", total=%u", req->total );
2159 dump_varargs_bytes( ", data=", cur_size );
2162 static void dump_enum_key_value_request( const struct enum_key_value_request *req )
2164 fprintf( stderr, " hkey=%04x", req->hkey );
2165 fprintf( stderr, ", index=%d", req->index );
2166 fprintf( stderr, ", info_class=%d", req->info_class );
2169 static void dump_enum_key_value_reply( const struct enum_key_value_reply *req )
2171 fprintf( stderr, " type=%d", req->type );
2172 fprintf( stderr, ", total=%u", req->total );
2173 fprintf( stderr, ", namelen=%u", req->namelen );
2174 dump_varargs_unicode_str( ", name=", min(cur_size,req->namelen) );
2175 dump_varargs_bytes( ", data=", cur_size );
2178 static void dump_delete_key_value_request( const struct delete_key_value_request *req )
2180 fprintf( stderr, " hkey=%04x", req->hkey );
2181 dump_varargs_unicode_str( ", name=", cur_size );
2184 static void dump_load_registry_request( const struct load_registry_request *req )
2186 fprintf( stderr, " hkey=%04x", req->hkey );
2187 fprintf( stderr, ", file=%04x", req->file );
2188 dump_varargs_unicode_str( ", name=", cur_size );
2191 static void dump_unload_registry_request( const struct unload_registry_request *req )
2193 fprintf( stderr, " hkey=%04x", req->hkey );
2196 static void dump_save_registry_request( const struct save_registry_request *req )
2198 fprintf( stderr, " hkey=%04x", req->hkey );
2199 fprintf( stderr, ", file=%04x", req->file );
2202 static void dump_set_registry_notification_request( const struct set_registry_notification_request *req )
2204 fprintf( stderr, " hkey=%04x", req->hkey );
2205 fprintf( stderr, ", event=%04x", req->event );
2206 fprintf( stderr, ", subtree=%d", req->subtree );
2207 fprintf( stderr, ", filter=%08x", req->filter );
2210 static void dump_create_timer_request( const struct create_timer_request *req )
2212 fprintf( stderr, " access=%08x", req->access );
2213 fprintf( stderr, ", attributes=%08x", req->attributes );
2214 fprintf( stderr, ", rootdir=%04x", req->rootdir );
2215 fprintf( stderr, ", manual=%d", req->manual );
2216 dump_varargs_unicode_str( ", name=", cur_size );
2219 static void dump_create_timer_reply( const struct create_timer_reply *req )
2221 fprintf( stderr, " handle=%04x", req->handle );
2224 static void dump_open_timer_request( const struct open_timer_request *req )
2226 fprintf( stderr, " access=%08x", req->access );
2227 fprintf( stderr, ", attributes=%08x", req->attributes );
2228 fprintf( stderr, ", rootdir=%04x", req->rootdir );
2229 dump_varargs_unicode_str( ", name=", cur_size );
2232 static void dump_open_timer_reply( const struct open_timer_reply *req )
2234 fprintf( stderr, " handle=%04x", req->handle );
2237 static void dump_set_timer_request( const struct set_timer_request *req )
2239 fprintf( stderr, " handle=%04x", req->handle );
2240 dump_timeout( ", expire=", &req->expire );
2241 dump_uint64( ", callback=", &req->callback );
2242 dump_uint64( ", arg=", &req->arg );
2243 fprintf( stderr, ", period=%d", req->period );
2246 static void dump_set_timer_reply( const struct set_timer_reply *req )
2248 fprintf( stderr, " signaled=%d", req->signaled );
2251 static void dump_cancel_timer_request( const struct cancel_timer_request *req )
2253 fprintf( stderr, " handle=%04x", req->handle );
2256 static void dump_cancel_timer_reply( const struct cancel_timer_reply *req )
2258 fprintf( stderr, " signaled=%d", req->signaled );
2261 static void dump_get_timer_info_request( const struct get_timer_info_request *req )
2263 fprintf( stderr, " handle=%04x", req->handle );
2266 static void dump_get_timer_info_reply( const struct get_timer_info_reply *req )
2268 dump_timeout( " when=", &req->when );
2269 fprintf( stderr, ", signaled=%d", req->signaled );
2272 static void dump_get_thread_context_request( const struct get_thread_context_request *req )
2274 fprintf( stderr, " handle=%04x", req->handle );
2275 fprintf( stderr, ", flags=%08x", req->flags );
2276 fprintf( stderr, ", suspend=%d", req->suspend );
2279 static void dump_get_thread_context_reply( const struct get_thread_context_reply *req )
2281 fprintf( stderr, " self=%d", req->self );
2282 dump_varargs_context( ", context=", cur_size );
2285 static void dump_set_thread_context_request( const struct set_thread_context_request *req )
2287 fprintf( stderr, " handle=%04x", req->handle );
2288 fprintf( stderr, ", suspend=%d", req->suspend );
2289 dump_varargs_context( ", context=", cur_size );
2292 static void dump_set_thread_context_reply( const struct set_thread_context_reply *req )
2294 fprintf( stderr, " self=%d", req->self );
2297 static void dump_get_selector_entry_request( const struct get_selector_entry_request *req )
2299 fprintf( stderr, " handle=%04x", req->handle );
2300 fprintf( stderr, ", entry=%d", req->entry );
2303 static void dump_get_selector_entry_reply( const struct get_selector_entry_reply *req )
2305 fprintf( stderr, " base=%08x", req->base );
2306 fprintf( stderr, ", limit=%08x", req->limit );
2307 fprintf( stderr, ", flags=%02x", req->flags );
2310 static void dump_add_atom_request( const struct add_atom_request *req )
2312 fprintf( stderr, " table=%04x", req->table );
2313 dump_varargs_unicode_str( ", name=", cur_size );
2316 static void dump_add_atom_reply( const struct add_atom_reply *req )
2318 fprintf( stderr, " atom=%04x", req->atom );
2321 static void dump_delete_atom_request( const struct delete_atom_request *req )
2323 fprintf( stderr, " table=%04x", req->table );
2324 fprintf( stderr, ", atom=%04x", req->atom );
2327 static void dump_find_atom_request( const struct find_atom_request *req )
2329 fprintf( stderr, " table=%04x", req->table );
2330 dump_varargs_unicode_str( ", name=", cur_size );
2333 static void dump_find_atom_reply( const struct find_atom_reply *req )
2335 fprintf( stderr, " atom=%04x", req->atom );
2338 static void dump_get_atom_information_request( const struct get_atom_information_request *req )
2340 fprintf( stderr, " table=%04x", req->table );
2341 fprintf( stderr, ", atom=%04x", req->atom );
2344 static void dump_get_atom_information_reply( const struct get_atom_information_reply *req )
2346 fprintf( stderr, " count=%d", req->count );
2347 fprintf( stderr, ", pinned=%d", req->pinned );
2348 fprintf( stderr, ", total=%u", req->total );
2349 dump_varargs_unicode_str( ", name=", cur_size );
2352 static void dump_set_atom_information_request( const struct set_atom_information_request *req )
2354 fprintf( stderr, " table=%04x", req->table );
2355 fprintf( stderr, ", atom=%04x", req->atom );
2356 fprintf( stderr, ", pinned=%d", req->pinned );
2359 static void dump_empty_atom_table_request( const struct empty_atom_table_request *req )
2361 fprintf( stderr, " table=%04x", req->table );
2362 fprintf( stderr, ", if_pinned=%d", req->if_pinned );
2365 static void dump_init_atom_table_request( const struct init_atom_table_request *req )
2367 fprintf( stderr, " entries=%d", req->entries );
2370 static void dump_init_atom_table_reply( const struct init_atom_table_reply *req )
2372 fprintf( stderr, " table=%04x", req->table );
2375 static void dump_get_msg_queue_request( const struct get_msg_queue_request *req )
2379 static void dump_get_msg_queue_reply( const struct get_msg_queue_reply *req )
2381 fprintf( stderr, " handle=%04x", req->handle );
2384 static void dump_set_queue_fd_request( const struct set_queue_fd_request *req )
2386 fprintf( stderr, " handle=%04x", req->handle );
2389 static void dump_set_queue_mask_request( const struct set_queue_mask_request *req )
2391 fprintf( stderr, " wake_mask=%08x", req->wake_mask );
2392 fprintf( stderr, ", changed_mask=%08x", req->changed_mask );
2393 fprintf( stderr, ", skip_wait=%d", req->skip_wait );
2396 static void dump_set_queue_mask_reply( const struct set_queue_mask_reply *req )
2398 fprintf( stderr, " wake_bits=%08x", req->wake_bits );
2399 fprintf( stderr, ", changed_bits=%08x", req->changed_bits );
2402 static void dump_get_queue_status_request( const struct get_queue_status_request *req )
2404 fprintf( stderr, " clear=%d", req->clear );
2407 static void dump_get_queue_status_reply( const struct get_queue_status_reply *req )
2409 fprintf( stderr, " wake_bits=%08x", req->wake_bits );
2410 fprintf( stderr, ", changed_bits=%08x", req->changed_bits );
2413 static void dump_get_process_idle_event_request( const struct get_process_idle_event_request *req )
2415 fprintf( stderr, " handle=%04x", req->handle );
2418 static void dump_get_process_idle_event_reply( const struct get_process_idle_event_reply *req )
2420 fprintf( stderr, " event=%04x", req->event );
2423 static void dump_send_message_request( const struct send_message_request *req )
2425 fprintf( stderr, " id=%04x", req->id );
2426 fprintf( stderr, ", type=%d", req->type );
2427 fprintf( stderr, ", flags=%d", req->flags );
2428 fprintf( stderr, ", win=%08x", req->win );
2429 fprintf( stderr, ", msg=%08x", req->msg );
2430 dump_uint64( ", wparam=", &req->wparam );
2431 dump_uint64( ", lparam=", &req->lparam );
2432 dump_timeout( ", timeout=", &req->timeout );
2433 dump_varargs_message_data( ", data=", cur_size );
2436 static void dump_post_quit_message_request( const struct post_quit_message_request *req )
2438 fprintf( stderr, " exit_code=%d", req->exit_code );
2441 static void dump_send_hardware_message_request( const struct send_hardware_message_request *req )
2443 fprintf( stderr, " id=%04x", req->id );
2444 fprintf( stderr, ", win=%08x", req->win );
2445 fprintf( stderr, ", msg=%08x", req->msg );
2446 dump_uint64( ", wparam=", &req->wparam );
2447 dump_uint64( ", lparam=", &req->lparam );
2448 dump_uint64( ", info=", &req->info );
2449 fprintf( stderr, ", x=%d", req->x );
2450 fprintf( stderr, ", y=%d", req->y );
2451 fprintf( stderr, ", time=%08x", req->time );
2454 static void dump_get_message_request( const struct get_message_request *req )
2456 fprintf( stderr, " flags=%08x", req->flags );
2457 fprintf( stderr, ", get_win=%08x", req->get_win );
2458 fprintf( stderr, ", get_first=%08x", req->get_first );
2459 fprintf( stderr, ", get_last=%08x", req->get_last );
2460 fprintf( stderr, ", hw_id=%08x", req->hw_id );
2461 fprintf( stderr, ", wake_mask=%08x", req->wake_mask );
2462 fprintf( stderr, ", changed_mask=%08x", req->changed_mask );
2465 static void dump_get_message_reply( const struct get_message_reply *req )
2467 fprintf( stderr, " win=%08x", req->win );
2468 fprintf( stderr, ", msg=%08x", req->msg );
2469 dump_uint64( ", wparam=", &req->wparam );
2470 dump_uint64( ", lparam=", &req->lparam );
2471 fprintf( stderr, ", type=%d", req->type );
2472 fprintf( stderr, ", time=%08x", req->time );
2473 fprintf( stderr, ", active_hooks=%08x", req->active_hooks );
2474 fprintf( stderr, ", total=%u", req->total );
2475 dump_varargs_message_data( ", data=", cur_size );
2478 static void dump_reply_message_request( const struct reply_message_request *req )
2480 fprintf( stderr, " remove=%d", req->remove );
2481 dump_uint64( ", result=", &req->result );
2482 dump_varargs_bytes( ", data=", cur_size );
2485 static void dump_accept_hardware_message_request( const struct accept_hardware_message_request *req )
2487 fprintf( stderr, " hw_id=%08x", req->hw_id );
2488 fprintf( stderr, ", remove=%d", req->remove );
2489 fprintf( stderr, ", new_win=%08x", req->new_win );
2492 static void dump_get_message_reply_request( const struct get_message_reply_request *req )
2494 fprintf( stderr, " cancel=%d", req->cancel );
2497 static void dump_get_message_reply_reply( const struct get_message_reply_reply *req )
2499 dump_uint64( " result=", &req->result );
2500 dump_varargs_bytes( ", data=", cur_size );
2503 static void dump_set_win_timer_request( const struct set_win_timer_request *req )
2505 fprintf( stderr, " win=%08x", req->win );
2506 fprintf( stderr, ", msg=%08x", req->msg );
2507 fprintf( stderr, ", rate=%08x", req->rate );
2508 dump_uint64( ", id=", &req->id );
2509 dump_uint64( ", lparam=", &req->lparam );
2512 static void dump_set_win_timer_reply( const struct set_win_timer_reply *req )
2514 dump_uint64( " id=", &req->id );
2517 static void dump_kill_win_timer_request( const struct kill_win_timer_request *req )
2519 fprintf( stderr, " win=%08x", req->win );
2520 dump_uint64( ", id=", &req->id );
2521 fprintf( stderr, ", msg=%08x", req->msg );
2524 static void dump_is_window_hung_request( const struct is_window_hung_request *req )
2526 fprintf( stderr, " win=%08x", req->win );
2529 static void dump_is_window_hung_reply( const struct is_window_hung_reply *req )
2531 fprintf( stderr, " is_hung=%d", req->is_hung );
2534 static void dump_get_serial_info_request( const struct get_serial_info_request *req )
2536 fprintf( stderr, " handle=%04x", req->handle );
2539 static void dump_get_serial_info_reply( const struct get_serial_info_reply *req )
2541 fprintf( stderr, " readinterval=%08x", req->readinterval );
2542 fprintf( stderr, ", readconst=%08x", req->readconst );
2543 fprintf( stderr, ", readmult=%08x", req->readmult );
2544 fprintf( stderr, ", writeconst=%08x", req->writeconst );
2545 fprintf( stderr, ", writemult=%08x", req->writemult );
2546 fprintf( stderr, ", eventmask=%08x", req->eventmask );
2549 static void dump_set_serial_info_request( const struct set_serial_info_request *req )
2551 fprintf( stderr, " handle=%04x", req->handle );
2552 fprintf( stderr, ", flags=%d", req->flags );
2553 fprintf( stderr, ", readinterval=%08x", req->readinterval );
2554 fprintf( stderr, ", readconst=%08x", req->readconst );
2555 fprintf( stderr, ", readmult=%08x", req->readmult );
2556 fprintf( stderr, ", writeconst=%08x", req->writeconst );
2557 fprintf( stderr, ", writemult=%08x", req->writemult );
2558 fprintf( stderr, ", eventmask=%08x", req->eventmask );
2561 static void dump_register_async_request( const struct register_async_request *req )
2563 fprintf( stderr, " type=%d", req->type );
2564 dump_async_data( ", async=", &req->async );
2565 fprintf( stderr, ", count=%d", req->count );
2568 static void dump_cancel_async_request( const struct cancel_async_request *req )
2570 fprintf( stderr, " handle=%04x", req->handle );
2571 dump_uint64( ", iosb=", &req->iosb );
2572 fprintf( stderr, ", only_thread=%d", req->only_thread );
2575 static void dump_ioctl_request( const struct ioctl_request *req )
2577 dump_ioctl_code( " code=", &req->code );
2578 dump_async_data( ", async=", &req->async );
2579 fprintf( stderr, ", blocking=%d", req->blocking );
2580 dump_varargs_bytes( ", in_data=", cur_size );
2583 static void dump_ioctl_reply( const struct ioctl_reply *req )
2585 fprintf( stderr, " wait=%04x", req->wait );
2586 fprintf( stderr, ", options=%08x", req->options );
2587 dump_varargs_bytes( ", out_data=", cur_size );
2590 static void dump_get_ioctl_result_request( const struct get_ioctl_result_request *req )
2592 fprintf( stderr, " handle=%04x", req->handle );
2593 dump_uint64( ", user_arg=", &req->user_arg );
2596 static void dump_get_ioctl_result_reply( const struct get_ioctl_result_reply *req )
2598 dump_varargs_bytes( " out_data=", cur_size );
2601 static void dump_create_named_pipe_request( const struct create_named_pipe_request *req )
2603 fprintf( stderr, " access=%08x", req->access );
2604 fprintf( stderr, ", attributes=%08x", req->attributes );
2605 fprintf( stderr, ", rootdir=%04x", req->rootdir );
2606 fprintf( stderr, ", options=%08x", req->options );
2607 fprintf( stderr, ", maxinstances=%08x", req->maxinstances );
2608 fprintf( stderr, ", outsize=%08x", req->outsize );
2609 fprintf( stderr, ", insize=%08x", req->insize );
2610 dump_timeout( ", timeout=", &req->timeout );
2611 fprintf( stderr, ", flags=%08x", req->flags );
2612 dump_varargs_unicode_str( ", name=", cur_size );
2615 static void dump_create_named_pipe_reply( const struct create_named_pipe_reply *req )
2617 fprintf( stderr, " handle=%04x", req->handle );
2620 static void dump_get_named_pipe_info_request( const struct get_named_pipe_info_request *req )
2622 fprintf( stderr, " handle=%04x", req->handle );
2625 static void dump_get_named_pipe_info_reply( const struct get_named_pipe_info_reply *req )
2627 fprintf( stderr, " flags=%08x", req->flags );
2628 fprintf( stderr, ", maxinstances=%08x", req->maxinstances );
2629 fprintf( stderr, ", instances=%08x", req->instances );
2630 fprintf( stderr, ", outsize=%08x", req->outsize );
2631 fprintf( stderr, ", insize=%08x", req->insize );
2634 static void dump_create_window_request( const struct create_window_request *req )
2636 fprintf( stderr, " parent=%08x", req->parent );
2637 fprintf( stderr, ", owner=%08x", req->owner );
2638 fprintf( stderr, ", atom=%04x", req->atom );
2639 dump_uint64( ", instance=", &req->instance );
2640 dump_varargs_unicode_str( ", class=", cur_size );
2643 static void dump_create_window_reply( const struct create_window_reply *req )
2645 fprintf( stderr, " handle=%08x", req->handle );
2646 fprintf( stderr, ", parent=%08x", req->parent );
2647 fprintf( stderr, ", owner=%08x", req->owner );
2648 fprintf( stderr, ", extra=%d", req->extra );
2649 dump_uint64( ", class_ptr=", &req->class_ptr );
2652 static void dump_destroy_window_request( const struct destroy_window_request *req )
2654 fprintf( stderr, " handle=%08x", req->handle );
2657 static void dump_get_desktop_window_request( const struct get_desktop_window_request *req )
2659 fprintf( stderr, " force=%d", req->force );
2662 static void dump_get_desktop_window_reply( const struct get_desktop_window_reply *req )
2664 fprintf( stderr, " top_window=%08x", req->top_window );
2665 fprintf( stderr, ", msg_window=%08x", req->msg_window );
2668 static void dump_set_window_owner_request( const struct set_window_owner_request *req )
2670 fprintf( stderr, " handle=%08x", req->handle );
2671 fprintf( stderr, ", owner=%08x", req->owner );
2674 static void dump_set_window_owner_reply( const struct set_window_owner_reply *req )
2676 fprintf( stderr, " full_owner=%08x", req->full_owner );
2677 fprintf( stderr, ", prev_owner=%08x", req->prev_owner );
2680 static void dump_get_window_info_request( const struct get_window_info_request *req )
2682 fprintf( stderr, " handle=%08x", req->handle );
2685 static void dump_get_window_info_reply( const struct get_window_info_reply *req )
2687 fprintf( stderr, " full_handle=%08x", req->full_handle );
2688 fprintf( stderr, ", last_active=%08x", req->last_active );
2689 fprintf( stderr, ", pid=%04x", req->pid );
2690 fprintf( stderr, ", tid=%04x", req->tid );
2691 fprintf( stderr, ", atom=%04x", req->atom );
2692 fprintf( stderr, ", is_unicode=%d", req->is_unicode );
2695 static void dump_set_window_info_request( const struct set_window_info_request *req )
2697 fprintf( stderr, " flags=%04x", req->flags );
2698 fprintf( stderr, ", is_unicode=%d", req->is_unicode );
2699 fprintf( stderr, ", handle=%08x", req->handle );
2700 fprintf( stderr, ", style=%08x", req->style );
2701 fprintf( stderr, ", ex_style=%08x", req->ex_style );
2702 fprintf( stderr, ", id=%08x", req->id );
2703 dump_uint64( ", instance=", &req->instance );
2704 dump_uint64( ", user_data=", &req->user_data );
2705 fprintf( stderr, ", extra_offset=%d", req->extra_offset );
2706 fprintf( stderr, ", extra_size=%u", req->extra_size );
2707 dump_uint64( ", extra_value=", &req->extra_value );
2710 static void dump_set_window_info_reply( const struct set_window_info_reply *req )
2712 fprintf( stderr, " old_style=%08x", req->old_style );
2713 fprintf( stderr, ", old_ex_style=%08x", req->old_ex_style );
2714 dump_uint64( ", old_instance=", &req->old_instance );
2715 dump_uint64( ", old_user_data=", &req->old_user_data );
2716 dump_uint64( ", old_extra_value=", &req->old_extra_value );
2717 fprintf( stderr, ", old_id=%08x", req->old_id );
2720 static void dump_set_parent_request( const struct set_parent_request *req )
2722 fprintf( stderr, " handle=%08x", req->handle );
2723 fprintf( stderr, ", parent=%08x", req->parent );
2726 static void dump_set_parent_reply( const struct set_parent_reply *req )
2728 fprintf( stderr, " old_parent=%08x", req->old_parent );
2729 fprintf( stderr, ", full_parent=%08x", req->full_parent );
2732 static void dump_get_window_parents_request( const struct get_window_parents_request *req )
2734 fprintf( stderr, " handle=%08x", req->handle );
2737 static void dump_get_window_parents_reply( const struct get_window_parents_reply *req )
2739 fprintf( stderr, " count=%d", req->count );
2740 dump_varargs_user_handles( ", parents=", cur_size );
2743 static void dump_get_window_children_request( const struct get_window_children_request *req )
2745 fprintf( stderr, " desktop=%04x", req->desktop );
2746 fprintf( stderr, ", parent=%08x", req->parent );
2747 fprintf( stderr, ", atom=%04x", req->atom );
2748 fprintf( stderr, ", tid=%04x", req->tid );
2749 dump_varargs_unicode_str( ", class=", cur_size );
2752 static void dump_get_window_children_reply( const struct get_window_children_reply *req )
2754 fprintf( stderr, " count=%d", req->count );
2755 dump_varargs_user_handles( ", children=", cur_size );
2758 static void dump_get_window_children_from_point_request( const struct get_window_children_from_point_request *req )
2760 fprintf( stderr, " parent=%08x", req->parent );
2761 fprintf( stderr, ", x=%d", req->x );
2762 fprintf( stderr, ", y=%d", req->y );
2765 static void dump_get_window_children_from_point_reply( const struct get_window_children_from_point_reply *req )
2767 fprintf( stderr, " count=%d", req->count );
2768 dump_varargs_user_handles( ", children=", cur_size );
2771 static void dump_get_window_tree_request( const struct get_window_tree_request *req )
2773 fprintf( stderr, " handle=%08x", req->handle );
2776 static void dump_get_window_tree_reply( const struct get_window_tree_reply *req )
2778 fprintf( stderr, " parent=%08x", req->parent );
2779 fprintf( stderr, ", owner=%08x", req->owner );
2780 fprintf( stderr, ", next_sibling=%08x", req->next_sibling );
2781 fprintf( stderr, ", prev_sibling=%08x", req->prev_sibling );
2782 fprintf( stderr, ", first_sibling=%08x", req->first_sibling );
2783 fprintf( stderr, ", last_sibling=%08x", req->last_sibling );
2784 fprintf( stderr, ", first_child=%08x", req->first_child );
2785 fprintf( stderr, ", last_child=%08x", req->last_child );
2788 static void dump_set_window_pos_request( const struct set_window_pos_request *req )
2790 fprintf( stderr, " flags=%08x", req->flags );
2791 fprintf( stderr, ", handle=%08x", req->handle );
2792 fprintf( stderr, ", previous=%08x", req->previous );
2793 dump_rectangle( ", window=", &req->window );
2794 dump_rectangle( ", client=", &req->client );
2795 dump_varargs_rectangles( ", valid=", cur_size );
2798 static void dump_set_window_pos_reply( const struct set_window_pos_reply *req )
2800 fprintf( stderr, " new_style=%08x", req->new_style );
2801 fprintf( stderr, ", new_ex_style=%08x", req->new_ex_style );
2804 static void dump_get_window_rectangles_request( const struct get_window_rectangles_request *req )
2806 fprintf( stderr, " handle=%08x", req->handle );
2809 static void dump_get_window_rectangles_reply( const struct get_window_rectangles_reply *req )
2811 dump_rectangle( " window=", &req->window );
2812 dump_rectangle( ", visible=", &req->visible );
2813 dump_rectangle( ", client=", &req->client );
2816 static void dump_get_window_text_request( const struct get_window_text_request *req )
2818 fprintf( stderr, " handle=%08x", req->handle );
2821 static void dump_get_window_text_reply( const struct get_window_text_reply *req )
2823 dump_varargs_unicode_str( " text=", cur_size );
2826 static void dump_set_window_text_request( const struct set_window_text_request *req )
2828 fprintf( stderr, " handle=%08x", req->handle );
2829 dump_varargs_unicode_str( ", text=", cur_size );
2832 static void dump_get_windows_offset_request( const struct get_windows_offset_request *req )
2834 fprintf( stderr, " from=%08x", req->from );
2835 fprintf( stderr, ", to=%08x", req->to );
2838 static void dump_get_windows_offset_reply( const struct get_windows_offset_reply *req )
2840 fprintf( stderr, " x=%d", req->x );
2841 fprintf( stderr, ", y=%d", req->y );
2844 static void dump_get_visible_region_request( const struct get_visible_region_request *req )
2846 fprintf( stderr, " window=%08x", req->window );
2847 fprintf( stderr, ", flags=%08x", req->flags );
2850 static void dump_get_visible_region_reply( const struct get_visible_region_reply *req )
2852 fprintf( stderr, " top_win=%08x", req->top_win );
2853 dump_rectangle( ", top_rect=", &req->top_rect );
2854 dump_rectangle( ", win_rect=", &req->win_rect );
2855 fprintf( stderr, ", total_size=%u", req->total_size );
2856 dump_varargs_rectangles( ", region=", cur_size );
2859 static void dump_get_window_region_request( const struct get_window_region_request *req )
2861 fprintf( stderr, " window=%08x", req->window );
2864 static void dump_get_window_region_reply( const struct get_window_region_reply *req )
2866 fprintf( stderr, " total_size=%u", req->total_size );
2867 dump_varargs_rectangles( ", region=", cur_size );
2870 static void dump_set_window_region_request( const struct set_window_region_request *req )
2872 fprintf( stderr, " window=%08x", req->window );
2873 fprintf( stderr, ", redraw=%d", req->redraw );
2874 dump_varargs_rectangles( ", region=", cur_size );
2877 static void dump_get_update_region_request( const struct get_update_region_request *req )
2879 fprintf( stderr, " window=%08x", req->window );
2880 fprintf( stderr, ", from_child=%08x", req->from_child );
2881 fprintf( stderr, ", flags=%08x", req->flags );
2884 static void dump_get_update_region_reply( const struct get_update_region_reply *req )
2886 fprintf( stderr, " child=%08x", req->child );
2887 fprintf( stderr, ", flags=%08x", req->flags );
2888 fprintf( stderr, ", total_size=%u", req->total_size );
2889 dump_varargs_rectangles( ", region=", cur_size );
2892 static void dump_update_window_zorder_request( const struct update_window_zorder_request *req )
2894 fprintf( stderr, " window=%08x", req->window );
2895 dump_rectangle( ", rect=", &req->rect );
2898 static void dump_redraw_window_request( const struct redraw_window_request *req )
2900 fprintf( stderr, " window=%08x", req->window );
2901 fprintf( stderr, ", flags=%08x", req->flags );
2902 dump_varargs_rectangles( ", region=", cur_size );
2905 static void dump_set_window_property_request( const struct set_window_property_request *req )
2907 fprintf( stderr, " window=%08x", req->window );
2908 dump_uint64( ", data=", &req->data );
2909 fprintf( stderr, ", atom=%04x", req->atom );
2910 dump_varargs_unicode_str( ", name=", cur_size );
2913 static void dump_remove_window_property_request( const struct remove_window_property_request *req )
2915 fprintf( stderr, " window=%08x", req->window );
2916 fprintf( stderr, ", atom=%04x", req->atom );
2917 dump_varargs_unicode_str( ", name=", cur_size );
2920 static void dump_remove_window_property_reply( const struct remove_window_property_reply *req )
2922 dump_uint64( " data=", &req->data );
2925 static void dump_get_window_property_request( const struct get_window_property_request *req )
2927 fprintf( stderr, " window=%08x", req->window );
2928 fprintf( stderr, ", atom=%04x", req->atom );
2929 dump_varargs_unicode_str( ", name=", cur_size );
2932 static void dump_get_window_property_reply( const struct get_window_property_reply *req )
2934 dump_uint64( " data=", &req->data );
2937 static void dump_get_window_properties_request( const struct get_window_properties_request *req )
2939 fprintf( stderr, " window=%08x", req->window );
2942 static void dump_get_window_properties_reply( const struct get_window_properties_reply *req )
2944 fprintf( stderr, " total=%d", req->total );
2945 dump_varargs_properties( ", props=", cur_size );
2948 static void dump_create_winstation_request( const struct create_winstation_request *req )
2950 fprintf( stderr, " flags=%08x", req->flags );
2951 fprintf( stderr, ", access=%08x", req->access );
2952 fprintf( stderr, ", attributes=%08x", req->attributes );
2953 dump_varargs_unicode_str( ", name=", cur_size );
2956 static void dump_create_winstation_reply( const struct create_winstation_reply *req )
2958 fprintf( stderr, " handle=%04x", req->handle );
2961 static void dump_open_winstation_request( const struct open_winstation_request *req )
2963 fprintf( stderr, " access=%08x", req->access );
2964 fprintf( stderr, ", attributes=%08x", req->attributes );
2965 dump_varargs_unicode_str( ", name=", cur_size );
2968 static void dump_open_winstation_reply( const struct open_winstation_reply *req )
2970 fprintf( stderr, " handle=%04x", req->handle );
2973 static void dump_close_winstation_request( const struct close_winstation_request *req )
2975 fprintf( stderr, " handle=%04x", req->handle );
2978 static void dump_get_process_winstation_request( const struct get_process_winstation_request *req )
2982 static void dump_get_process_winstation_reply( const struct get_process_winstation_reply *req )
2984 fprintf( stderr, " handle=%04x", req->handle );
2987 static void dump_set_process_winstation_request( const struct set_process_winstation_request *req )
2989 fprintf( stderr, " handle=%04x", req->handle );
2992 static void dump_enum_winstation_request( const struct enum_winstation_request *req )
2994 fprintf( stderr, " index=%08x", req->index );
2997 static void dump_enum_winstation_reply( const struct enum_winstation_reply *req )
2999 fprintf( stderr, " next=%08x", req->next );
3000 dump_varargs_unicode_str( ", name=", cur_size );
3003 static void dump_create_desktop_request( const struct create_desktop_request *req )
3005 fprintf( stderr, " flags=%08x", req->flags );
3006 fprintf( stderr, ", access=%08x", req->access );
3007 fprintf( stderr, ", attributes=%08x", req->attributes );
3008 dump_varargs_unicode_str( ", name=", cur_size );
3011 static void dump_create_desktop_reply( const struct create_desktop_reply *req )
3013 fprintf( stderr, " handle=%04x", req->handle );
3016 static void dump_open_desktop_request( const struct open_desktop_request *req )
3018 fprintf( stderr, " winsta=%04x", req->winsta );
3019 fprintf( stderr, ", flags=%08x", req->flags );
3020 fprintf( stderr, ", access=%08x", req->access );
3021 fprintf( stderr, ", attributes=%08x", req->attributes );
3022 dump_varargs_unicode_str( ", name=", cur_size );
3025 static void dump_open_desktop_reply( const struct open_desktop_reply *req )
3027 fprintf( stderr, " handle=%04x", req->handle );
3030 static void dump_close_desktop_request( const struct close_desktop_request *req )
3032 fprintf( stderr, " handle=%04x", req->handle );
3035 static void dump_get_thread_desktop_request( const struct get_thread_desktop_request *req )
3037 fprintf( stderr, " tid=%04x", req->tid );
3040 static void dump_get_thread_desktop_reply( const struct get_thread_desktop_reply *req )
3042 fprintf( stderr, " handle=%04x", req->handle );
3045 static void dump_set_thread_desktop_request( const struct set_thread_desktop_request *req )
3047 fprintf( stderr, " handle=%04x", req->handle );
3050 static void dump_enum_desktop_request( const struct enum_desktop_request *req )
3052 fprintf( stderr, " winstation=%04x", req->winstation );
3053 fprintf( stderr, ", index=%08x", req->index );
3056 static void dump_enum_desktop_reply( const struct enum_desktop_reply *req )
3058 fprintf( stderr, " next=%08x", req->next );
3059 dump_varargs_unicode_str( ", name=", cur_size );
3062 static void dump_set_user_object_info_request( const struct set_user_object_info_request *req )
3064 fprintf( stderr, " handle=%04x", req->handle );
3065 fprintf( stderr, ", flags=%08x", req->flags );
3066 fprintf( stderr, ", obj_flags=%08x", req->obj_flags );
3069 static void dump_set_user_object_info_reply( const struct set_user_object_info_reply *req )
3071 fprintf( stderr, " is_desktop=%d", req->is_desktop );
3072 fprintf( stderr, ", old_obj_flags=%08x", req->old_obj_flags );
3073 dump_varargs_unicode_str( ", name=", cur_size );
3076 static void dump_attach_thread_input_request( const struct attach_thread_input_request *req )
3078 fprintf( stderr, " tid_from=%04x", req->tid_from );
3079 fprintf( stderr, ", tid_to=%04x", req->tid_to );
3080 fprintf( stderr, ", attach=%d", req->attach );
3083 static void dump_get_thread_input_request( const struct get_thread_input_request *req )
3085 fprintf( stderr, " tid=%04x", req->tid );
3088 static void dump_get_thread_input_reply( const struct get_thread_input_reply *req )
3090 fprintf( stderr, " focus=%08x", req->focus );
3091 fprintf( stderr, ", capture=%08x", req->capture );
3092 fprintf( stderr, ", active=%08x", req->active );
3093 fprintf( stderr, ", foreground=%08x", req->foreground );
3094 fprintf( stderr, ", menu_owner=%08x", req->menu_owner );
3095 fprintf( stderr, ", move_size=%08x", req->move_size );
3096 fprintf( stderr, ", caret=%08x", req->caret );
3097 dump_rectangle( ", rect=", &req->rect );
3100 static void dump_get_last_input_time_request( const struct get_last_input_time_request *req )
3104 static void dump_get_last_input_time_reply( const struct get_last_input_time_reply *req )
3106 fprintf( stderr, " time=%08x", req->time );
3109 static void dump_get_key_state_request( const struct get_key_state_request *req )
3111 fprintf( stderr, " tid=%04x", req->tid );
3112 fprintf( stderr, ", key=%d", req->key );
3115 static void dump_get_key_state_reply( const struct get_key_state_reply *req )
3117 fprintf( stderr, " state=%02x", req->state );
3118 dump_varargs_bytes( ", keystate=", cur_size );
3121 static void dump_set_key_state_request( const struct set_key_state_request *req )
3123 fprintf( stderr, " tid=%04x", req->tid );
3124 dump_varargs_bytes( ", keystate=", cur_size );
3127 static void dump_set_foreground_window_request( const struct set_foreground_window_request *req )
3129 fprintf( stderr, " handle=%08x", req->handle );
3132 static void dump_set_foreground_window_reply( const struct set_foreground_window_reply *req )
3134 fprintf( stderr, " previous=%08x", req->previous );
3135 fprintf( stderr, ", send_msg_old=%d", req->send_msg_old );
3136 fprintf( stderr, ", send_msg_new=%d", req->send_msg_new );
3139 static void dump_set_focus_window_request( const struct set_focus_window_request *req )
3141 fprintf( stderr, " handle=%08x", req->handle );
3144 static void dump_set_focus_window_reply( const struct set_focus_window_reply *req )
3146 fprintf( stderr, " previous=%08x", req->previous );
3149 static void dump_set_active_window_request( const struct set_active_window_request *req )
3151 fprintf( stderr, " handle=%08x", req->handle );
3154 static void dump_set_active_window_reply( const struct set_active_window_reply *req )
3156 fprintf( stderr, " previous=%08x", req->previous );
3159 static void dump_set_capture_window_request( const struct set_capture_window_request *req )
3161 fprintf( stderr, " handle=%08x", req->handle );
3162 fprintf( stderr, ", flags=%08x", req->flags );
3165 static void dump_set_capture_window_reply( const struct set_capture_window_reply *req )
3167 fprintf( stderr, " previous=%08x", req->previous );
3168 fprintf( stderr, ", full_handle=%08x", req->full_handle );
3171 static void dump_set_caret_window_request( const struct set_caret_window_request *req )
3173 fprintf( stderr, " handle=%08x", req->handle );
3174 fprintf( stderr, ", width=%d", req->width );
3175 fprintf( stderr, ", height=%d", req->height );
3178 static void dump_set_caret_window_reply( const struct set_caret_window_reply *req )
3180 fprintf( stderr, " previous=%08x", req->previous );
3181 dump_rectangle( ", old_rect=", &req->old_rect );
3182 fprintf( stderr, ", old_hide=%d", req->old_hide );
3183 fprintf( stderr, ", old_state=%d", req->old_state );
3186 static void dump_set_caret_info_request( const struct set_caret_info_request *req )
3188 fprintf( stderr, " flags=%08x", req->flags );
3189 fprintf( stderr, ", handle=%08x", req->handle );
3190 fprintf( stderr, ", x=%d", req->x );
3191 fprintf( stderr, ", y=%d", req->y );
3192 fprintf( stderr, ", hide=%d", req->hide );
3193 fprintf( stderr, ", state=%d", req->state );
3196 static void dump_set_caret_info_reply( const struct set_caret_info_reply *req )
3198 fprintf( stderr, " full_handle=%08x", req->full_handle );
3199 dump_rectangle( ", old_rect=", &req->old_rect );
3200 fprintf( stderr, ", old_hide=%d", req->old_hide );
3201 fprintf( stderr, ", old_state=%d", req->old_state );
3204 static void dump_set_hook_request( const struct set_hook_request *req )
3206 fprintf( stderr, " id=%d", req->id );
3207 fprintf( stderr, ", pid=%04x", req->pid );
3208 fprintf( stderr, ", tid=%04x", req->tid );
3209 fprintf( stderr, ", event_min=%d", req->event_min );
3210 fprintf( stderr, ", event_max=%d", req->event_max );
3211 dump_uint64( ", proc=", &req->proc );
3212 fprintf( stderr, ", flags=%d", req->flags );
3213 fprintf( stderr, ", unicode=%d", req->unicode );
3214 dump_varargs_unicode_str( ", module=", cur_size );
3217 static void dump_set_hook_reply( const struct set_hook_reply *req )
3219 fprintf( stderr, " handle=%08x", req->handle );
3220 fprintf( stderr, ", active_hooks=%08x", req->active_hooks );
3223 static void dump_remove_hook_request( const struct remove_hook_request *req )
3225 fprintf( stderr, " handle=%08x", req->handle );
3226 dump_uint64( ", proc=", &req->proc );
3227 fprintf( stderr, ", id=%d", req->id );
3230 static void dump_remove_hook_reply( const struct remove_hook_reply *req )
3232 fprintf( stderr, " active_hooks=%08x", req->active_hooks );
3235 static void dump_start_hook_chain_request( const struct start_hook_chain_request *req )
3237 fprintf( stderr, " id=%d", req->id );
3238 fprintf( stderr, ", event=%d", req->event );
3239 fprintf( stderr, ", window=%08x", req->window );
3240 fprintf( stderr, ", object_id=%d", req->object_id );
3241 fprintf( stderr, ", child_id=%d", req->child_id );
3244 static void dump_start_hook_chain_reply( const struct start_hook_chain_reply *req )
3246 fprintf( stderr, " handle=%08x", req->handle );
3247 fprintf( stderr, ", pid=%04x", req->pid );
3248 fprintf( stderr, ", tid=%04x", req->tid );
3249 fprintf( stderr, ", unicode=%d", req->unicode );
3250 dump_uint64( ", proc=", &req->proc );
3251 fprintf( stderr, ", active_hooks=%08x", req->active_hooks );
3252 dump_varargs_unicode_str( ", module=", cur_size );
3255 static void dump_finish_hook_chain_request( const struct finish_hook_chain_request *req )
3257 fprintf( stderr, " id=%d", req->id );
3260 static void dump_get_hook_info_request( const struct get_hook_info_request *req )
3262 fprintf( stderr, " handle=%08x", req->handle );
3263 fprintf( stderr, ", get_next=%d", req->get_next );
3264 fprintf( stderr, ", event=%d", req->event );
3265 fprintf( stderr, ", window=%08x", req->window );
3266 fprintf( stderr, ", object_id=%d", req->object_id );
3267 fprintf( stderr, ", child_id=%d", req->child_id );
3270 static void dump_get_hook_info_reply( const struct get_hook_info_reply *req )
3272 fprintf( stderr, " handle=%08x", req->handle );
3273 fprintf( stderr, ", id=%d", req->id );
3274 fprintf( stderr, ", pid=%04x", req->pid );
3275 fprintf( stderr, ", tid=%04x", req->tid );
3276 dump_uint64( ", proc=", &req->proc );
3277 fprintf( stderr, ", unicode=%d", req->unicode );
3278 dump_varargs_unicode_str( ", module=", cur_size );
3281 static void dump_create_class_request( const struct create_class_request *req )
3283 fprintf( stderr, " local=%d", req->local );
3284 fprintf( stderr, ", atom=%04x", req->atom );
3285 fprintf( stderr, ", style=%08x", req->style );
3286 dump_uint64( ", instance=", &req->instance );
3287 fprintf( stderr, ", extra=%d", req->extra );
3288 fprintf( stderr, ", win_extra=%d", req->win_extra );
3289 dump_uint64( ", client_ptr=", &req->client_ptr );
3290 dump_varargs_unicode_str( ", name=", cur_size );
3293 static void dump_create_class_reply( const struct create_class_reply *req )
3295 fprintf( stderr, " atom=%04x", req->atom );
3298 static void dump_destroy_class_request( const struct destroy_class_request *req )
3300 fprintf( stderr, " atom=%04x", req->atom );
3301 dump_uint64( ", instance=", &req->instance );
3302 dump_varargs_unicode_str( ", name=", cur_size );
3305 static void dump_destroy_class_reply( const struct destroy_class_reply *req )
3307 dump_uint64( " client_ptr=", &req->client_ptr );
3310 static void dump_set_class_info_request( const struct set_class_info_request *req )
3312 fprintf( stderr, " window=%08x", req->window );
3313 fprintf( stderr, ", flags=%08x", req->flags );
3314 fprintf( stderr, ", atom=%04x", req->atom );
3315 fprintf( stderr, ", style=%08x", req->style );
3316 fprintf( stderr, ", win_extra=%d", req->win_extra );
3317 dump_uint64( ", instance=", &req->instance );
3318 fprintf( stderr, ", extra_offset=%d", req->extra_offset );
3319 fprintf( stderr, ", extra_size=%u", req->extra_size );
3320 dump_uint64( ", extra_value=", &req->extra_value );
3323 static void dump_set_class_info_reply( const struct set_class_info_reply *req )
3325 fprintf( stderr, " old_atom=%04x", req->old_atom );
3326 fprintf( stderr, ", old_style=%08x", req->old_style );
3327 fprintf( stderr, ", old_extra=%d", req->old_extra );
3328 fprintf( stderr, ", old_win_extra=%d", req->old_win_extra );
3329 dump_uint64( ", old_instance=", &req->old_instance );
3330 dump_uint64( ", old_extra_value=", &req->old_extra_value );
3333 static void dump_set_clipboard_info_request( const struct set_clipboard_info_request *req )
3335 fprintf( stderr, " flags=%08x", req->flags );
3336 fprintf( stderr, ", clipboard=%08x", req->clipboard );
3337 fprintf( stderr, ", owner=%08x", req->owner );
3338 fprintf( stderr, ", viewer=%08x", req->viewer );
3339 fprintf( stderr, ", seqno=%08x", req->seqno );
3342 static void dump_set_clipboard_info_reply( const struct set_clipboard_info_reply *req )
3344 fprintf( stderr, " flags=%08x", req->flags );
3345 fprintf( stderr, ", old_clipboard=%08x", req->old_clipboard );
3346 fprintf( stderr, ", old_owner=%08x", req->old_owner );
3347 fprintf( stderr, ", old_viewer=%08x", req->old_viewer );
3348 fprintf( stderr, ", seqno=%08x", req->seqno );
3351 static void dump_open_token_request( const struct open_token_request *req )
3353 fprintf( stderr, " handle=%04x", req->handle );
3354 fprintf( stderr, ", access=%08x", req->access );
3355 fprintf( stderr, ", attributes=%08x", req->attributes );
3356 fprintf( stderr, ", flags=%08x", req->flags );
3359 static void dump_open_token_reply( const struct open_token_reply *req )
3361 fprintf( stderr, " token=%04x", req->token );
3364 static void dump_set_global_windows_request( const struct set_global_windows_request *req )
3366 fprintf( stderr, " flags=%08x", req->flags );
3367 fprintf( stderr, ", shell_window=%08x", req->shell_window );
3368 fprintf( stderr, ", shell_listview=%08x", req->shell_listview );
3369 fprintf( stderr, ", progman_window=%08x", req->progman_window );
3370 fprintf( stderr, ", taskman_window=%08x", req->taskman_window );
3373 static void dump_set_global_windows_reply( const struct set_global_windows_reply *req )
3375 fprintf( stderr, " old_shell_window=%08x", req->old_shell_window );
3376 fprintf( stderr, ", old_shell_listview=%08x", req->old_shell_listview );
3377 fprintf( stderr, ", old_progman_window=%08x", req->old_progman_window );
3378 fprintf( stderr, ", old_taskman_window=%08x", req->old_taskman_window );
3381 static void dump_adjust_token_privileges_request( const struct adjust_token_privileges_request *req )
3383 fprintf( stderr, " handle=%04x", req->handle );
3384 fprintf( stderr, ", disable_all=%d", req->disable_all );
3385 fprintf( stderr, ", get_modified_state=%d", req->get_modified_state );
3386 dump_varargs_LUID_AND_ATTRIBUTES( ", privileges=", cur_size );
3389 static void dump_adjust_token_privileges_reply( const struct adjust_token_privileges_reply *req )
3391 fprintf( stderr, " len=%08x", req->len );
3392 dump_varargs_LUID_AND_ATTRIBUTES( ", privileges=", cur_size );
3395 static void dump_get_token_privileges_request( const struct get_token_privileges_request *req )
3397 fprintf( stderr, " handle=%04x", req->handle );
3400 static void dump_get_token_privileges_reply( const struct get_token_privileges_reply *req )
3402 fprintf( stderr, " len=%08x", req->len );
3403 dump_varargs_LUID_AND_ATTRIBUTES( ", privileges=", cur_size );
3406 static void dump_check_token_privileges_request( const struct check_token_privileges_request *req )
3408 fprintf( stderr, " handle=%04x", req->handle );
3409 fprintf( stderr, ", all_required=%d", req->all_required );
3410 dump_varargs_LUID_AND_ATTRIBUTES( ", privileges=", cur_size );
3413 static void dump_check_token_privileges_reply( const struct check_token_privileges_reply *req )
3415 fprintf( stderr, " has_privileges=%d", req->has_privileges );
3416 dump_varargs_LUID_AND_ATTRIBUTES( ", privileges=", cur_size );
3419 static void dump_duplicate_token_request( const struct duplicate_token_request *req )
3421 fprintf( stderr, " handle=%04x", req->handle );
3422 fprintf( stderr, ", access=%08x", req->access );
3423 fprintf( stderr, ", attributes=%08x", req->attributes );
3424 fprintf( stderr, ", primary=%d", req->primary );
3425 fprintf( stderr, ", impersonation_level=%d", req->impersonation_level );
3428 static void dump_duplicate_token_reply( const struct duplicate_token_reply *req )
3430 fprintf( stderr, " new_handle=%04x", req->new_handle );
3433 static void dump_access_check_request( const struct access_check_request *req )
3435 fprintf( stderr, " handle=%04x", req->handle );
3436 fprintf( stderr, ", desired_access=%08x", req->desired_access );
3437 fprintf( stderr, ", mapping_read=%08x", req->mapping_read );
3438 fprintf( stderr, ", mapping_write=%08x", req->mapping_write );
3439 fprintf( stderr, ", mapping_execute=%08x", req->mapping_execute );
3440 fprintf( stderr, ", mapping_all=%08x", req->mapping_all );
3441 dump_varargs_security_descriptor( ", sd=", cur_size );
3444 static void dump_access_check_reply( const struct access_check_reply *req )
3446 fprintf( stderr, " access_granted=%08x", req->access_granted );
3447 fprintf( stderr, ", access_status=%08x", req->access_status );
3448 fprintf( stderr, ", privileges_len=%08x", req->privileges_len );
3449 dump_varargs_LUID_AND_ATTRIBUTES( ", privileges=", cur_size );
3452 static void dump_get_token_user_request( const struct get_token_user_request *req )
3454 fprintf( stderr, " handle=%04x", req->handle );
3457 static void dump_get_token_user_reply( const struct get_token_user_reply *req )
3459 fprintf( stderr, " user_len=%u", req->user_len );
3460 dump_varargs_SID( ", user=", cur_size );
3463 static void dump_get_token_groups_request( const struct get_token_groups_request *req )
3465 fprintf( stderr, " handle=%04x", req->handle );
3468 static void dump_get_token_groups_reply( const struct get_token_groups_reply *req )
3470 fprintf( stderr, " user_len=%u", req->user_len );
3471 dump_varargs_token_groups( ", user=", cur_size );
3474 static void dump_get_token_default_dacl_request( const struct get_token_default_dacl_request *req )
3476 fprintf( stderr, " handle=%04x", req->handle );
3479 static void dump_get_token_default_dacl_reply( const struct get_token_default_dacl_reply *req )
3481 fprintf( stderr, " acl_len=%u", req->acl_len );
3482 dump_varargs_ACL( ", acl=", cur_size );
3485 static void dump_set_token_default_dacl_request( const struct set_token_default_dacl_request *req )
3487 fprintf( stderr, " handle=%04x", req->handle );
3488 dump_varargs_ACL( ", acl=", cur_size );
3491 static void dump_set_security_object_request( const struct set_security_object_request *req )
3493 fprintf( stderr, " handle=%04x", req->handle );
3494 fprintf( stderr, ", security_info=%08x", req->security_info );
3495 dump_varargs_security_descriptor( ", sd=", cur_size );
3498 static void dump_get_security_object_request( const struct get_security_object_request *req )
3500 fprintf( stderr, " handle=%04x", req->handle );
3501 fprintf( stderr, ", security_info=%08x", req->security_info );
3504 static void dump_get_security_object_reply( const struct get_security_object_reply *req )
3506 fprintf( stderr, " sd_len=%08x", req->sd_len );
3507 dump_varargs_security_descriptor( ", sd=", cur_size );
3510 static void dump_create_mailslot_request( const struct create_mailslot_request *req )
3512 fprintf( stderr, " access=%08x", req->access );
3513 fprintf( stderr, ", attributes=%08x", req->attributes );
3514 fprintf( stderr, ", rootdir=%04x", req->rootdir );
3515 dump_timeout( ", read_timeout=", &req->read_timeout );
3516 fprintf( stderr, ", max_msgsize=%08x", req->max_msgsize );
3517 dump_varargs_unicode_str( ", name=", cur_size );
3520 static void dump_create_mailslot_reply( const struct create_mailslot_reply *req )
3522 fprintf( stderr, " handle=%04x", req->handle );
3525 static void dump_set_mailslot_info_request( const struct set_mailslot_info_request *req )
3527 fprintf( stderr, " handle=%04x", req->handle );
3528 dump_timeout( ", read_timeout=", &req->read_timeout );
3529 fprintf( stderr, ", flags=%08x", req->flags );
3532 static void dump_set_mailslot_info_reply( const struct set_mailslot_info_reply *req )
3534 dump_timeout( " read_timeout=", &req->read_timeout );
3535 fprintf( stderr, ", max_msgsize=%08x", req->max_msgsize );
3538 static void dump_create_directory_request( const struct create_directory_request *req )
3540 fprintf( stderr, " access=%08x", req->access );
3541 fprintf( stderr, ", attributes=%08x", req->attributes );
3542 fprintf( stderr, ", rootdir=%04x", req->rootdir );
3543 dump_varargs_unicode_str( ", directory_name=", cur_size );
3546 static void dump_create_directory_reply( const struct create_directory_reply *req )
3548 fprintf( stderr, " handle=%04x", req->handle );
3551 static void dump_open_directory_request( const struct open_directory_request *req )
3553 fprintf( stderr, " access=%08x", req->access );
3554 fprintf( stderr, ", attributes=%08x", req->attributes );
3555 fprintf( stderr, ", rootdir=%04x", req->rootdir );
3556 dump_varargs_unicode_str( ", directory_name=", cur_size );
3559 static void dump_open_directory_reply( const struct open_directory_reply *req )
3561 fprintf( stderr, " handle=%04x", req->handle );
3564 static void dump_get_directory_entry_request( const struct get_directory_entry_request *req )
3566 fprintf( stderr, " handle=%04x", req->handle );
3567 fprintf( stderr, ", index=%08x", req->index );
3570 static void dump_get_directory_entry_reply( const struct get_directory_entry_reply *req )
3572 fprintf( stderr, " name_len=%u", req->name_len );
3573 dump_varargs_unicode_str( ", name=", min(cur_size,req->name_len) );
3574 dump_varargs_unicode_str( ", type=", cur_size );
3577 static void dump_create_symlink_request( const struct create_symlink_request *req )
3579 fprintf( stderr, " access=%08x", req->access );
3580 fprintf( stderr, ", attributes=%08x", req->attributes );
3581 fprintf( stderr, ", rootdir=%04x", req->rootdir );
3582 fprintf( stderr, ", name_len=%u", req->name_len );
3583 dump_varargs_unicode_str( ", name=", min(cur_size,req->name_len) );
3584 dump_varargs_unicode_str( ", target_name=", cur_size );
3587 static void dump_create_symlink_reply( const struct create_symlink_reply *req )
3589 fprintf( stderr, " handle=%04x", req->handle );
3592 static void dump_open_symlink_request( const struct open_symlink_request *req )
3594 fprintf( stderr, " access=%08x", req->access );
3595 fprintf( stderr, ", attributes=%08x", req->attributes );
3596 fprintf( stderr, ", rootdir=%04x", req->rootdir );
3597 dump_varargs_unicode_str( ", name=", cur_size );
3600 static void dump_open_symlink_reply( const struct open_symlink_reply *req )
3602 fprintf( stderr, " handle=%04x", req->handle );
3605 static void dump_query_symlink_request( const struct query_symlink_request *req )
3607 fprintf( stderr, " handle=%04x", req->handle );
3610 static void dump_query_symlink_reply( const struct query_symlink_reply *req )
3612 dump_varargs_unicode_str( " target_name=", cur_size );
3615 static void dump_get_object_info_request( const struct get_object_info_request *req )
3617 fprintf( stderr, " handle=%04x", req->handle );
3620 static void dump_get_object_info_reply( const struct get_object_info_reply *req )
3622 fprintf( stderr, " access=%08x", req->access );
3623 fprintf( stderr, ", ref_count=%08x", req->ref_count );
3626 static void dump_unlink_object_request( const struct unlink_object_request *req )
3628 fprintf( stderr, " handle=%04x", req->handle );
3631 static void dump_get_token_impersonation_level_request( const struct get_token_impersonation_level_request *req )
3633 fprintf( stderr, " handle=%04x", req->handle );
3636 static void dump_get_token_impersonation_level_reply( const struct get_token_impersonation_level_reply *req )
3638 fprintf( stderr, " impersonation_level=%d", req->impersonation_level );
3641 static void dump_allocate_locally_unique_id_request( const struct allocate_locally_unique_id_request *req )
3645 static void dump_allocate_locally_unique_id_reply( const struct allocate_locally_unique_id_reply *req )
3647 dump_luid( " luid=", &req->luid );
3650 static void dump_create_device_manager_request( const struct create_device_manager_request *req )
3652 fprintf( stderr, " access=%08x", req->access );
3653 fprintf( stderr, ", attributes=%08x", req->attributes );
3656 static void dump_create_device_manager_reply( const struct create_device_manager_reply *req )
3658 fprintf( stderr, " handle=%04x", req->handle );
3661 static void dump_create_device_request( const struct create_device_request *req )
3663 fprintf( stderr, " access=%08x", req->access );
3664 fprintf( stderr, ", attributes=%08x", req->attributes );
3665 fprintf( stderr, ", rootdir=%04x", req->rootdir );
3666 dump_uint64( ", user_ptr=", &req->user_ptr );
3667 fprintf( stderr, ", manager=%04x", req->manager );
3668 dump_varargs_unicode_str( ", name=", cur_size );
3671 static void dump_create_device_reply( const struct create_device_reply *req )
3673 fprintf( stderr, " handle=%04x", req->handle );
3676 static void dump_delete_device_request( const struct delete_device_request *req )
3678 fprintf( stderr, " handle=%04x", req->handle );
3681 static void dump_get_next_device_request_request( const struct get_next_device_request_request *req )
3683 fprintf( stderr, " manager=%04x", req->manager );
3684 fprintf( stderr, ", prev=%04x", req->prev );
3685 fprintf( stderr, ", status=%08x", req->status );
3686 dump_varargs_bytes( ", prev_data=", cur_size );
3689 static void dump_get_next_device_request_reply( const struct get_next_device_request_reply *req )
3691 fprintf( stderr, " next=%04x", req->next );
3692 dump_ioctl_code( ", code=", &req->code );
3693 dump_uint64( ", user_ptr=", &req->user_ptr );
3694 fprintf( stderr, ", in_size=%u", req->in_size );
3695 fprintf( stderr, ", out_size=%u", req->out_size );
3696 dump_varargs_bytes( ", next_data=", cur_size );
3699 static void dump_make_process_system_request( const struct make_process_system_request *req )
3703 static void dump_make_process_system_reply( const struct make_process_system_reply *req )
3705 fprintf( stderr, " event=%04x", req->event );
3708 static void dump_get_token_statistics_request( const struct get_token_statistics_request *req )
3710 fprintf( stderr, " handle=%04x", req->handle );
3713 static void dump_get_token_statistics_reply( const struct get_token_statistics_reply *req )
3715 dump_luid( " token_id=", &req->token_id );
3716 dump_luid( ", modified_id=", &req->modified_id );
3717 fprintf( stderr, ", primary=%d", req->primary );
3718 fprintf( stderr, ", impersonation_level=%d", req->impersonation_level );
3719 fprintf( stderr, ", group_count=%d", req->group_count );
3720 fprintf( stderr, ", privilege_count=%d", req->privilege_count );
3723 static void dump_create_completion_request( const struct create_completion_request *req )
3725 fprintf( stderr, " access=%08x", req->access );
3726 fprintf( stderr, ", attributes=%08x", req->attributes );
3727 fprintf( stderr, ", concurrent=%08x", req->concurrent );
3728 fprintf( stderr, ", rootdir=%04x", req->rootdir );
3729 dump_varargs_string( ", filename=", cur_size );
3732 static void dump_create_completion_reply( const struct create_completion_reply *req )
3734 fprintf( stderr, " handle=%04x", req->handle );
3737 static void dump_open_completion_request( const struct open_completion_request *req )
3739 fprintf( stderr, " access=%08x", req->access );
3740 fprintf( stderr, ", attributes=%08x", req->attributes );
3741 fprintf( stderr, ", rootdir=%04x", req->rootdir );
3742 dump_varargs_string( ", filename=", cur_size );
3745 static void dump_open_completion_reply( const struct open_completion_reply *req )
3747 fprintf( stderr, " handle=%04x", req->handle );
3750 static void dump_add_completion_request( const struct add_completion_request *req )
3752 fprintf( stderr, " handle=%04x", req->handle );
3753 dump_uint64( ", ckey=", &req->ckey );
3754 dump_uint64( ", cvalue=", &req->cvalue );
3755 fprintf( stderr, ", information=%08x", req->information );
3756 fprintf( stderr, ", status=%08x", req->status );
3759 static void dump_remove_completion_request( const struct remove_completion_request *req )
3761 fprintf( stderr, " handle=%04x", req->handle );
3764 static void dump_remove_completion_reply( const struct remove_completion_reply *req )
3766 dump_uint64( " ckey=", &req->ckey );
3767 dump_uint64( ", cvalue=", &req->cvalue );
3768 fprintf( stderr, ", information=%08x", req->information );
3769 fprintf( stderr, ", status=%08x", req->status );
3772 static void dump_query_completion_request( const struct query_completion_request *req )
3774 fprintf( stderr, " handle=%04x", req->handle );
3777 static void dump_query_completion_reply( const struct query_completion_reply *req )
3779 fprintf( stderr, " depth=%08x", req->depth );
3782 static void dump_set_completion_info_request( const struct set_completion_info_request *req )
3784 fprintf( stderr, " handle=%04x", req->handle );
3785 dump_uint64( ", ckey=", &req->ckey );
3786 fprintf( stderr, ", chandle=%04x", req->chandle );
3789 static void dump_add_fd_completion_request( const struct add_fd_completion_request *req )
3791 fprintf( stderr, " handle=%04x", req->handle );
3792 dump_uint64( ", cvalue=", &req->cvalue );
3793 fprintf( stderr, ", status=%08x", req->status );
3794 fprintf( stderr, ", information=%08x", req->information );
3797 static void dump_get_window_layered_info_request( const struct get_window_layered_info_request *req )
3799 fprintf( stderr, " handle=%08x", req->handle );
3802 static void dump_get_window_layered_info_reply( const struct get_window_layered_info_reply *req )
3804 fprintf( stderr, " color_key=%08x", req->color_key );
3805 fprintf( stderr, ", alpha=%08x", req->alpha );
3806 fprintf( stderr, ", flags=%08x", req->flags );
3809 static void dump_set_window_layered_info_request( const struct set_window_layered_info_request *req )
3811 fprintf( stderr, " handle=%08x", req->handle );
3812 fprintf( stderr, ", color_key=%08x", req->color_key );
3813 fprintf( stderr, ", alpha=%08x", req->alpha );
3814 fprintf( stderr, ", flags=%08x", req->flags );
3817 static const dump_func req_dumpers[REQ_NB_REQUESTS] = {
3818 (dump_func)dump_new_process_request,
3819 (dump_func)dump_get_new_process_info_request,
3820 (dump_func)dump_new_thread_request,
3821 (dump_func)dump_get_startup_info_request,
3822 (dump_func)dump_init_process_done_request,
3823 (dump_func)dump_init_thread_request,
3824 (dump_func)dump_terminate_process_request,
3825 (dump_func)dump_terminate_thread_request,
3826 (dump_func)dump_get_process_info_request,
3827 (dump_func)dump_set_process_info_request,
3828 (dump_func)dump_get_thread_info_request,
3829 (dump_func)dump_set_thread_info_request,
3830 (dump_func)dump_get_dll_info_request,
3831 (dump_func)dump_suspend_thread_request,
3832 (dump_func)dump_resume_thread_request,
3833 (dump_func)dump_load_dll_request,
3834 (dump_func)dump_unload_dll_request,
3835 (dump_func)dump_queue_apc_request,
3836 (dump_func)dump_get_apc_result_request,
3837 (dump_func)dump_close_handle_request,
3838 (dump_func)dump_set_handle_info_request,
3839 (dump_func)dump_dup_handle_request,
3840 (dump_func)dump_open_process_request,
3841 (dump_func)dump_open_thread_request,
3842 (dump_func)dump_select_request,
3843 (dump_func)dump_create_event_request,
3844 (dump_func)dump_event_op_request,
3845 (dump_func)dump_open_event_request,
3846 (dump_func)dump_create_mutex_request,
3847 (dump_func)dump_release_mutex_request,
3848 (dump_func)dump_open_mutex_request,
3849 (dump_func)dump_create_semaphore_request,
3850 (dump_func)dump_release_semaphore_request,
3851 (dump_func)dump_open_semaphore_request,
3852 (dump_func)dump_create_file_request,
3853 (dump_func)dump_open_file_object_request,
3854 (dump_func)dump_alloc_file_handle_request,
3855 (dump_func)dump_get_handle_fd_request,
3856 (dump_func)dump_flush_file_request,
3857 (dump_func)dump_lock_file_request,
3858 (dump_func)dump_unlock_file_request,
3859 (dump_func)dump_create_socket_request,
3860 (dump_func)dump_accept_socket_request,
3861 (dump_func)dump_set_socket_event_request,
3862 (dump_func)dump_get_socket_event_request,
3863 (dump_func)dump_enable_socket_event_request,
3864 (dump_func)dump_set_socket_deferred_request,
3865 (dump_func)dump_alloc_console_request,
3866 (dump_func)dump_free_console_request,
3867 (dump_func)dump_get_console_renderer_events_request,
3868 (dump_func)dump_open_console_request,
3869 (dump_func)dump_get_console_wait_event_request,
3870 (dump_func)dump_get_console_mode_request,
3871 (dump_func)dump_set_console_mode_request,
3872 (dump_func)dump_set_console_input_info_request,
3873 (dump_func)dump_get_console_input_info_request,
3874 (dump_func)dump_append_console_input_history_request,
3875 (dump_func)dump_get_console_input_history_request,
3876 (dump_func)dump_create_console_output_request,
3877 (dump_func)dump_set_console_output_info_request,
3878 (dump_func)dump_get_console_output_info_request,
3879 (dump_func)dump_write_console_input_request,
3880 (dump_func)dump_read_console_input_request,
3881 (dump_func)dump_write_console_output_request,
3882 (dump_func)dump_fill_console_output_request,
3883 (dump_func)dump_read_console_output_request,
3884 (dump_func)dump_move_console_output_request,
3885 (dump_func)dump_send_console_signal_request,
3886 (dump_func)dump_read_directory_changes_request,
3887 (dump_func)dump_read_change_request,
3888 (dump_func)dump_create_mapping_request,
3889 (dump_func)dump_open_mapping_request,
3890 (dump_func)dump_get_mapping_info_request,
3891 (dump_func)dump_get_mapping_committed_range_request,
3892 (dump_func)dump_add_mapping_committed_range_request,
3893 (dump_func)dump_create_snapshot_request,
3894 (dump_func)dump_next_process_request,
3895 (dump_func)dump_next_thread_request,
3896 (dump_func)dump_wait_debug_event_request,
3897 (dump_func)dump_queue_exception_event_request,
3898 (dump_func)dump_get_exception_status_request,
3899 (dump_func)dump_output_debug_string_request,
3900 (dump_func)dump_continue_debug_event_request,
3901 (dump_func)dump_debug_process_request,
3902 (dump_func)dump_debug_break_request,
3903 (dump_func)dump_set_debugger_kill_on_exit_request,
3904 (dump_func)dump_read_process_memory_request,
3905 (dump_func)dump_write_process_memory_request,
3906 (dump_func)dump_create_key_request,
3907 (dump_func)dump_open_key_request,
3908 (dump_func)dump_delete_key_request,
3909 (dump_func)dump_flush_key_request,
3910 (dump_func)dump_enum_key_request,
3911 (dump_func)dump_set_key_value_request,
3912 (dump_func)dump_get_key_value_request,
3913 (dump_func)dump_enum_key_value_request,
3914 (dump_func)dump_delete_key_value_request,
3915 (dump_func)dump_load_registry_request,
3916 (dump_func)dump_unload_registry_request,
3917 (dump_func)dump_save_registry_request,
3918 (dump_func)dump_set_registry_notification_request,
3919 (dump_func)dump_create_timer_request,
3920 (dump_func)dump_open_timer_request,
3921 (dump_func)dump_set_timer_request,
3922 (dump_func)dump_cancel_timer_request,
3923 (dump_func)dump_get_timer_info_request,
3924 (dump_func)dump_get_thread_context_request,
3925 (dump_func)dump_set_thread_context_request,
3926 (dump_func)dump_get_selector_entry_request,
3927 (dump_func)dump_add_atom_request,
3928 (dump_func)dump_delete_atom_request,
3929 (dump_func)dump_find_atom_request,
3930 (dump_func)dump_get_atom_information_request,
3931 (dump_func)dump_set_atom_information_request,
3932 (dump_func)dump_empty_atom_table_request,
3933 (dump_func)dump_init_atom_table_request,
3934 (dump_func)dump_get_msg_queue_request,
3935 (dump_func)dump_set_queue_fd_request,
3936 (dump_func)dump_set_queue_mask_request,
3937 (dump_func)dump_get_queue_status_request,
3938 (dump_func)dump_get_process_idle_event_request,
3939 (dump_func)dump_send_message_request,
3940 (dump_func)dump_post_quit_message_request,
3941 (dump_func)dump_send_hardware_message_request,
3942 (dump_func)dump_get_message_request,
3943 (dump_func)dump_reply_message_request,
3944 (dump_func)dump_accept_hardware_message_request,
3945 (dump_func)dump_get_message_reply_request,
3946 (dump_func)dump_set_win_timer_request,
3947 (dump_func)dump_kill_win_timer_request,
3948 (dump_func)dump_is_window_hung_request,
3949 (dump_func)dump_get_serial_info_request,
3950 (dump_func)dump_set_serial_info_request,
3951 (dump_func)dump_register_async_request,
3952 (dump_func)dump_cancel_async_request,
3953 (dump_func)dump_ioctl_request,
3954 (dump_func)dump_get_ioctl_result_request,
3955 (dump_func)dump_create_named_pipe_request,
3956 (dump_func)dump_get_named_pipe_info_request,
3957 (dump_func)dump_create_window_request,
3958 (dump_func)dump_destroy_window_request,
3959 (dump_func)dump_get_desktop_window_request,
3960 (dump_func)dump_set_window_owner_request,
3961 (dump_func)dump_get_window_info_request,
3962 (dump_func)dump_set_window_info_request,
3963 (dump_func)dump_set_parent_request,
3964 (dump_func)dump_get_window_parents_request,
3965 (dump_func)dump_get_window_children_request,
3966 (dump_func)dump_get_window_children_from_point_request,
3967 (dump_func)dump_get_window_tree_request,
3968 (dump_func)dump_set_window_pos_request,
3969 (dump_func)dump_get_window_rectangles_request,
3970 (dump_func)dump_get_window_text_request,
3971 (dump_func)dump_set_window_text_request,
3972 (dump_func)dump_get_windows_offset_request,
3973 (dump_func)dump_get_visible_region_request,
3974 (dump_func)dump_get_window_region_request,
3975 (dump_func)dump_set_window_region_request,
3976 (dump_func)dump_get_update_region_request,
3977 (dump_func)dump_update_window_zorder_request,
3978 (dump_func)dump_redraw_window_request,
3979 (dump_func)dump_set_window_property_request,
3980 (dump_func)dump_remove_window_property_request,
3981 (dump_func)dump_get_window_property_request,
3982 (dump_func)dump_get_window_properties_request,
3983 (dump_func)dump_create_winstation_request,
3984 (dump_func)dump_open_winstation_request,
3985 (dump_func)dump_close_winstation_request,
3986 (dump_func)dump_get_process_winstation_request,
3987 (dump_func)dump_set_process_winstation_request,
3988 (dump_func)dump_enum_winstation_request,
3989 (dump_func)dump_create_desktop_request,
3990 (dump_func)dump_open_desktop_request,
3991 (dump_func)dump_close_desktop_request,
3992 (dump_func)dump_get_thread_desktop_request,
3993 (dump_func)dump_set_thread_desktop_request,
3994 (dump_func)dump_enum_desktop_request,
3995 (dump_func)dump_set_user_object_info_request,
3996 (dump_func)dump_attach_thread_input_request,
3997 (dump_func)dump_get_thread_input_request,
3998 (dump_func)dump_get_last_input_time_request,
3999 (dump_func)dump_get_key_state_request,
4000 (dump_func)dump_set_key_state_request,
4001 (dump_func)dump_set_foreground_window_request,
4002 (dump_func)dump_set_focus_window_request,
4003 (dump_func)dump_set_active_window_request,
4004 (dump_func)dump_set_capture_window_request,
4005 (dump_func)dump_set_caret_window_request,
4006 (dump_func)dump_set_caret_info_request,
4007 (dump_func)dump_set_hook_request,
4008 (dump_func)dump_remove_hook_request,
4009 (dump_func)dump_start_hook_chain_request,
4010 (dump_func)dump_finish_hook_chain_request,
4011 (dump_func)dump_get_hook_info_request,
4012 (dump_func)dump_create_class_request,
4013 (dump_func)dump_destroy_class_request,
4014 (dump_func)dump_set_class_info_request,
4015 (dump_func)dump_set_clipboard_info_request,
4016 (dump_func)dump_open_token_request,
4017 (dump_func)dump_set_global_windows_request,
4018 (dump_func)dump_adjust_token_privileges_request,
4019 (dump_func)dump_get_token_privileges_request,
4020 (dump_func)dump_check_token_privileges_request,
4021 (dump_func)dump_duplicate_token_request,
4022 (dump_func)dump_access_check_request,
4023 (dump_func)dump_get_token_user_request,
4024 (dump_func)dump_get_token_groups_request,
4025 (dump_func)dump_get_token_default_dacl_request,
4026 (dump_func)dump_set_token_default_dacl_request,
4027 (dump_func)dump_set_security_object_request,
4028 (dump_func)dump_get_security_object_request,
4029 (dump_func)dump_create_mailslot_request,
4030 (dump_func)dump_set_mailslot_info_request,
4031 (dump_func)dump_create_directory_request,
4032 (dump_func)dump_open_directory_request,
4033 (dump_func)dump_get_directory_entry_request,
4034 (dump_func)dump_create_symlink_request,
4035 (dump_func)dump_open_symlink_request,
4036 (dump_func)dump_query_symlink_request,
4037 (dump_func)dump_get_object_info_request,
4038 (dump_func)dump_unlink_object_request,
4039 (dump_func)dump_get_token_impersonation_level_request,
4040 (dump_func)dump_allocate_locally_unique_id_request,
4041 (dump_func)dump_create_device_manager_request,
4042 (dump_func)dump_create_device_request,
4043 (dump_func)dump_delete_device_request,
4044 (dump_func)dump_get_next_device_request_request,
4045 (dump_func)dump_make_process_system_request,
4046 (dump_func)dump_get_token_statistics_request,
4047 (dump_func)dump_create_completion_request,
4048 (dump_func)dump_open_completion_request,
4049 (dump_func)dump_add_completion_request,
4050 (dump_func)dump_remove_completion_request,
4051 (dump_func)dump_query_completion_request,
4052 (dump_func)dump_set_completion_info_request,
4053 (dump_func)dump_add_fd_completion_request,
4054 (dump_func)dump_get_window_layered_info_request,
4055 (dump_func)dump_set_window_layered_info_request,
4058 static const dump_func reply_dumpers[REQ_NB_REQUESTS] = {
4059 (dump_func)dump_new_process_reply,
4060 (dump_func)dump_get_new_process_info_reply,
4061 (dump_func)dump_new_thread_reply,
4062 (dump_func)dump_get_startup_info_reply,
4063 NULL,
4064 (dump_func)dump_init_thread_reply,
4065 (dump_func)dump_terminate_process_reply,
4066 (dump_func)dump_terminate_thread_reply,
4067 (dump_func)dump_get_process_info_reply,
4068 NULL,
4069 (dump_func)dump_get_thread_info_reply,
4070 NULL,
4071 (dump_func)dump_get_dll_info_reply,
4072 (dump_func)dump_suspend_thread_reply,
4073 (dump_func)dump_resume_thread_reply,
4074 NULL,
4075 NULL,
4076 (dump_func)dump_queue_apc_reply,
4077 (dump_func)dump_get_apc_result_reply,
4078 NULL,
4079 (dump_func)dump_set_handle_info_reply,
4080 (dump_func)dump_dup_handle_reply,
4081 (dump_func)dump_open_process_reply,
4082 (dump_func)dump_open_thread_reply,
4083 (dump_func)dump_select_reply,
4084 (dump_func)dump_create_event_reply,
4085 NULL,
4086 (dump_func)dump_open_event_reply,
4087 (dump_func)dump_create_mutex_reply,
4088 (dump_func)dump_release_mutex_reply,
4089 (dump_func)dump_open_mutex_reply,
4090 (dump_func)dump_create_semaphore_reply,
4091 (dump_func)dump_release_semaphore_reply,
4092 (dump_func)dump_open_semaphore_reply,
4093 (dump_func)dump_create_file_reply,
4094 (dump_func)dump_open_file_object_reply,
4095 (dump_func)dump_alloc_file_handle_reply,
4096 (dump_func)dump_get_handle_fd_reply,
4097 (dump_func)dump_flush_file_reply,
4098 (dump_func)dump_lock_file_reply,
4099 NULL,
4100 (dump_func)dump_create_socket_reply,
4101 (dump_func)dump_accept_socket_reply,
4102 NULL,
4103 (dump_func)dump_get_socket_event_reply,
4104 NULL,
4105 NULL,
4106 (dump_func)dump_alloc_console_reply,
4107 NULL,
4108 (dump_func)dump_get_console_renderer_events_reply,
4109 (dump_func)dump_open_console_reply,
4110 (dump_func)dump_get_console_wait_event_reply,
4111 (dump_func)dump_get_console_mode_reply,
4112 NULL,
4113 NULL,
4114 (dump_func)dump_get_console_input_info_reply,
4115 NULL,
4116 (dump_func)dump_get_console_input_history_reply,
4117 (dump_func)dump_create_console_output_reply,
4118 NULL,
4119 (dump_func)dump_get_console_output_info_reply,
4120 (dump_func)dump_write_console_input_reply,
4121 (dump_func)dump_read_console_input_reply,
4122 (dump_func)dump_write_console_output_reply,
4123 (dump_func)dump_fill_console_output_reply,
4124 (dump_func)dump_read_console_output_reply,
4125 NULL,
4126 NULL,
4127 NULL,
4128 (dump_func)dump_read_change_reply,
4129 (dump_func)dump_create_mapping_reply,
4130 (dump_func)dump_open_mapping_reply,
4131 (dump_func)dump_get_mapping_info_reply,
4132 (dump_func)dump_get_mapping_committed_range_reply,
4133 NULL,
4134 (dump_func)dump_create_snapshot_reply,
4135 (dump_func)dump_next_process_reply,
4136 (dump_func)dump_next_thread_reply,
4137 (dump_func)dump_wait_debug_event_reply,
4138 (dump_func)dump_queue_exception_event_reply,
4139 (dump_func)dump_get_exception_status_reply,
4140 NULL,
4141 NULL,
4142 NULL,
4143 (dump_func)dump_debug_break_reply,
4144 NULL,
4145 (dump_func)dump_read_process_memory_reply,
4146 NULL,
4147 (dump_func)dump_create_key_reply,
4148 (dump_func)dump_open_key_reply,
4149 NULL,
4150 NULL,
4151 (dump_func)dump_enum_key_reply,
4152 NULL,
4153 (dump_func)dump_get_key_value_reply,
4154 (dump_func)dump_enum_key_value_reply,
4155 NULL,
4156 NULL,
4157 NULL,
4158 NULL,
4159 NULL,
4160 (dump_func)dump_create_timer_reply,
4161 (dump_func)dump_open_timer_reply,
4162 (dump_func)dump_set_timer_reply,
4163 (dump_func)dump_cancel_timer_reply,
4164 (dump_func)dump_get_timer_info_reply,
4165 (dump_func)dump_get_thread_context_reply,
4166 (dump_func)dump_set_thread_context_reply,
4167 (dump_func)dump_get_selector_entry_reply,
4168 (dump_func)dump_add_atom_reply,
4169 NULL,
4170 (dump_func)dump_find_atom_reply,
4171 (dump_func)dump_get_atom_information_reply,
4172 NULL,
4173 NULL,
4174 (dump_func)dump_init_atom_table_reply,
4175 (dump_func)dump_get_msg_queue_reply,
4176 NULL,
4177 (dump_func)dump_set_queue_mask_reply,
4178 (dump_func)dump_get_queue_status_reply,
4179 (dump_func)dump_get_process_idle_event_reply,
4180 NULL,
4181 NULL,
4182 NULL,
4183 (dump_func)dump_get_message_reply,
4184 NULL,
4185 NULL,
4186 (dump_func)dump_get_message_reply_reply,
4187 (dump_func)dump_set_win_timer_reply,
4188 NULL,
4189 (dump_func)dump_is_window_hung_reply,
4190 (dump_func)dump_get_serial_info_reply,
4191 NULL,
4192 NULL,
4193 NULL,
4194 (dump_func)dump_ioctl_reply,
4195 (dump_func)dump_get_ioctl_result_reply,
4196 (dump_func)dump_create_named_pipe_reply,
4197 (dump_func)dump_get_named_pipe_info_reply,
4198 (dump_func)dump_create_window_reply,
4199 NULL,
4200 (dump_func)dump_get_desktop_window_reply,
4201 (dump_func)dump_set_window_owner_reply,
4202 (dump_func)dump_get_window_info_reply,
4203 (dump_func)dump_set_window_info_reply,
4204 (dump_func)dump_set_parent_reply,
4205 (dump_func)dump_get_window_parents_reply,
4206 (dump_func)dump_get_window_children_reply,
4207 (dump_func)dump_get_window_children_from_point_reply,
4208 (dump_func)dump_get_window_tree_reply,
4209 (dump_func)dump_set_window_pos_reply,
4210 (dump_func)dump_get_window_rectangles_reply,
4211 (dump_func)dump_get_window_text_reply,
4212 NULL,
4213 (dump_func)dump_get_windows_offset_reply,
4214 (dump_func)dump_get_visible_region_reply,
4215 (dump_func)dump_get_window_region_reply,
4216 NULL,
4217 (dump_func)dump_get_update_region_reply,
4218 NULL,
4219 NULL,
4220 NULL,
4221 (dump_func)dump_remove_window_property_reply,
4222 (dump_func)dump_get_window_property_reply,
4223 (dump_func)dump_get_window_properties_reply,
4224 (dump_func)dump_create_winstation_reply,
4225 (dump_func)dump_open_winstation_reply,
4226 NULL,
4227 (dump_func)dump_get_process_winstation_reply,
4228 NULL,
4229 (dump_func)dump_enum_winstation_reply,
4230 (dump_func)dump_create_desktop_reply,
4231 (dump_func)dump_open_desktop_reply,
4232 NULL,
4233 (dump_func)dump_get_thread_desktop_reply,
4234 NULL,
4235 (dump_func)dump_enum_desktop_reply,
4236 (dump_func)dump_set_user_object_info_reply,
4237 NULL,
4238 (dump_func)dump_get_thread_input_reply,
4239 (dump_func)dump_get_last_input_time_reply,
4240 (dump_func)dump_get_key_state_reply,
4241 NULL,
4242 (dump_func)dump_set_foreground_window_reply,
4243 (dump_func)dump_set_focus_window_reply,
4244 (dump_func)dump_set_active_window_reply,
4245 (dump_func)dump_set_capture_window_reply,
4246 (dump_func)dump_set_caret_window_reply,
4247 (dump_func)dump_set_caret_info_reply,
4248 (dump_func)dump_set_hook_reply,
4249 (dump_func)dump_remove_hook_reply,
4250 (dump_func)dump_start_hook_chain_reply,
4251 NULL,
4252 (dump_func)dump_get_hook_info_reply,
4253 (dump_func)dump_create_class_reply,
4254 (dump_func)dump_destroy_class_reply,
4255 (dump_func)dump_set_class_info_reply,
4256 (dump_func)dump_set_clipboard_info_reply,
4257 (dump_func)dump_open_token_reply,
4258 (dump_func)dump_set_global_windows_reply,
4259 (dump_func)dump_adjust_token_privileges_reply,
4260 (dump_func)dump_get_token_privileges_reply,
4261 (dump_func)dump_check_token_privileges_reply,
4262 (dump_func)dump_duplicate_token_reply,
4263 (dump_func)dump_access_check_reply,
4264 (dump_func)dump_get_token_user_reply,
4265 (dump_func)dump_get_token_groups_reply,
4266 (dump_func)dump_get_token_default_dacl_reply,
4267 NULL,
4268 NULL,
4269 (dump_func)dump_get_security_object_reply,
4270 (dump_func)dump_create_mailslot_reply,
4271 (dump_func)dump_set_mailslot_info_reply,
4272 (dump_func)dump_create_directory_reply,
4273 (dump_func)dump_open_directory_reply,
4274 (dump_func)dump_get_directory_entry_reply,
4275 (dump_func)dump_create_symlink_reply,
4276 (dump_func)dump_open_symlink_reply,
4277 (dump_func)dump_query_symlink_reply,
4278 (dump_func)dump_get_object_info_reply,
4279 NULL,
4280 (dump_func)dump_get_token_impersonation_level_reply,
4281 (dump_func)dump_allocate_locally_unique_id_reply,
4282 (dump_func)dump_create_device_manager_reply,
4283 (dump_func)dump_create_device_reply,
4284 NULL,
4285 (dump_func)dump_get_next_device_request_reply,
4286 (dump_func)dump_make_process_system_reply,
4287 (dump_func)dump_get_token_statistics_reply,
4288 (dump_func)dump_create_completion_reply,
4289 (dump_func)dump_open_completion_reply,
4290 NULL,
4291 (dump_func)dump_remove_completion_reply,
4292 (dump_func)dump_query_completion_reply,
4293 NULL,
4294 NULL,
4295 (dump_func)dump_get_window_layered_info_reply,
4296 NULL,
4299 static const char * const req_names[REQ_NB_REQUESTS] = {
4300 "new_process",
4301 "get_new_process_info",
4302 "new_thread",
4303 "get_startup_info",
4304 "init_process_done",
4305 "init_thread",
4306 "terminate_process",
4307 "terminate_thread",
4308 "get_process_info",
4309 "set_process_info",
4310 "get_thread_info",
4311 "set_thread_info",
4312 "get_dll_info",
4313 "suspend_thread",
4314 "resume_thread",
4315 "load_dll",
4316 "unload_dll",
4317 "queue_apc",
4318 "get_apc_result",
4319 "close_handle",
4320 "set_handle_info",
4321 "dup_handle",
4322 "open_process",
4323 "open_thread",
4324 "select",
4325 "create_event",
4326 "event_op",
4327 "open_event",
4328 "create_mutex",
4329 "release_mutex",
4330 "open_mutex",
4331 "create_semaphore",
4332 "release_semaphore",
4333 "open_semaphore",
4334 "create_file",
4335 "open_file_object",
4336 "alloc_file_handle",
4337 "get_handle_fd",
4338 "flush_file",
4339 "lock_file",
4340 "unlock_file",
4341 "create_socket",
4342 "accept_socket",
4343 "set_socket_event",
4344 "get_socket_event",
4345 "enable_socket_event",
4346 "set_socket_deferred",
4347 "alloc_console",
4348 "free_console",
4349 "get_console_renderer_events",
4350 "open_console",
4351 "get_console_wait_event",
4352 "get_console_mode",
4353 "set_console_mode",
4354 "set_console_input_info",
4355 "get_console_input_info",
4356 "append_console_input_history",
4357 "get_console_input_history",
4358 "create_console_output",
4359 "set_console_output_info",
4360 "get_console_output_info",
4361 "write_console_input",
4362 "read_console_input",
4363 "write_console_output",
4364 "fill_console_output",
4365 "read_console_output",
4366 "move_console_output",
4367 "send_console_signal",
4368 "read_directory_changes",
4369 "read_change",
4370 "create_mapping",
4371 "open_mapping",
4372 "get_mapping_info",
4373 "get_mapping_committed_range",
4374 "add_mapping_committed_range",
4375 "create_snapshot",
4376 "next_process",
4377 "next_thread",
4378 "wait_debug_event",
4379 "queue_exception_event",
4380 "get_exception_status",
4381 "output_debug_string",
4382 "continue_debug_event",
4383 "debug_process",
4384 "debug_break",
4385 "set_debugger_kill_on_exit",
4386 "read_process_memory",
4387 "write_process_memory",
4388 "create_key",
4389 "open_key",
4390 "delete_key",
4391 "flush_key",
4392 "enum_key",
4393 "set_key_value",
4394 "get_key_value",
4395 "enum_key_value",
4396 "delete_key_value",
4397 "load_registry",
4398 "unload_registry",
4399 "save_registry",
4400 "set_registry_notification",
4401 "create_timer",
4402 "open_timer",
4403 "set_timer",
4404 "cancel_timer",
4405 "get_timer_info",
4406 "get_thread_context",
4407 "set_thread_context",
4408 "get_selector_entry",
4409 "add_atom",
4410 "delete_atom",
4411 "find_atom",
4412 "get_atom_information",
4413 "set_atom_information",
4414 "empty_atom_table",
4415 "init_atom_table",
4416 "get_msg_queue",
4417 "set_queue_fd",
4418 "set_queue_mask",
4419 "get_queue_status",
4420 "get_process_idle_event",
4421 "send_message",
4422 "post_quit_message",
4423 "send_hardware_message",
4424 "get_message",
4425 "reply_message",
4426 "accept_hardware_message",
4427 "get_message_reply",
4428 "set_win_timer",
4429 "kill_win_timer",
4430 "is_window_hung",
4431 "get_serial_info",
4432 "set_serial_info",
4433 "register_async",
4434 "cancel_async",
4435 "ioctl",
4436 "get_ioctl_result",
4437 "create_named_pipe",
4438 "get_named_pipe_info",
4439 "create_window",
4440 "destroy_window",
4441 "get_desktop_window",
4442 "set_window_owner",
4443 "get_window_info",
4444 "set_window_info",
4445 "set_parent",
4446 "get_window_parents",
4447 "get_window_children",
4448 "get_window_children_from_point",
4449 "get_window_tree",
4450 "set_window_pos",
4451 "get_window_rectangles",
4452 "get_window_text",
4453 "set_window_text",
4454 "get_windows_offset",
4455 "get_visible_region",
4456 "get_window_region",
4457 "set_window_region",
4458 "get_update_region",
4459 "update_window_zorder",
4460 "redraw_window",
4461 "set_window_property",
4462 "remove_window_property",
4463 "get_window_property",
4464 "get_window_properties",
4465 "create_winstation",
4466 "open_winstation",
4467 "close_winstation",
4468 "get_process_winstation",
4469 "set_process_winstation",
4470 "enum_winstation",
4471 "create_desktop",
4472 "open_desktop",
4473 "close_desktop",
4474 "get_thread_desktop",
4475 "set_thread_desktop",
4476 "enum_desktop",
4477 "set_user_object_info",
4478 "attach_thread_input",
4479 "get_thread_input",
4480 "get_last_input_time",
4481 "get_key_state",
4482 "set_key_state",
4483 "set_foreground_window",
4484 "set_focus_window",
4485 "set_active_window",
4486 "set_capture_window",
4487 "set_caret_window",
4488 "set_caret_info",
4489 "set_hook",
4490 "remove_hook",
4491 "start_hook_chain",
4492 "finish_hook_chain",
4493 "get_hook_info",
4494 "create_class",
4495 "destroy_class",
4496 "set_class_info",
4497 "set_clipboard_info",
4498 "open_token",
4499 "set_global_windows",
4500 "adjust_token_privileges",
4501 "get_token_privileges",
4502 "check_token_privileges",
4503 "duplicate_token",
4504 "access_check",
4505 "get_token_user",
4506 "get_token_groups",
4507 "get_token_default_dacl",
4508 "set_token_default_dacl",
4509 "set_security_object",
4510 "get_security_object",
4511 "create_mailslot",
4512 "set_mailslot_info",
4513 "create_directory",
4514 "open_directory",
4515 "get_directory_entry",
4516 "create_symlink",
4517 "open_symlink",
4518 "query_symlink",
4519 "get_object_info",
4520 "unlink_object",
4521 "get_token_impersonation_level",
4522 "allocate_locally_unique_id",
4523 "create_device_manager",
4524 "create_device",
4525 "delete_device",
4526 "get_next_device_request",
4527 "make_process_system",
4528 "get_token_statistics",
4529 "create_completion",
4530 "open_completion",
4531 "add_completion",
4532 "remove_completion",
4533 "query_completion",
4534 "set_completion_info",
4535 "add_fd_completion",
4536 "get_window_layered_info",
4537 "set_window_layered_info",
4540 static const struct
4542 const char *name;
4543 unsigned int value;
4544 } status_names[] =
4546 { "ABANDONED_WAIT_0", STATUS_ABANDONED_WAIT_0 },
4547 { "ACCESS_DENIED", STATUS_ACCESS_DENIED },
4548 { "ACCESS_VIOLATION", STATUS_ACCESS_VIOLATION },
4549 { "ALERTED", STATUS_ALERTED },
4550 { "ALIAS_EXISTS", STATUS_ALIAS_EXISTS },
4551 { "BAD_DEVICE_TYPE", STATUS_BAD_DEVICE_TYPE },
4552 { "BAD_IMPERSONATION_LEVEL", STATUS_BAD_IMPERSONATION_LEVEL },
4553 { "BREAKPOINT", STATUS_BREAKPOINT },
4554 { "BUFFER_OVERFLOW", STATUS_BUFFER_OVERFLOW },
4555 { "BUFFER_TOO_SMALL", STATUS_BUFFER_TOO_SMALL },
4556 { "CANCELLED", STATUS_CANCELLED },
4557 { "CANT_OPEN_ANONYMOUS", STATUS_CANT_OPEN_ANONYMOUS },
4558 { "CHILD_MUST_BE_VOLATILE", STATUS_CHILD_MUST_BE_VOLATILE },
4559 { "DEBUGGER_INACTIVE", STATUS_DEBUGGER_INACTIVE },
4560 { "DEVICE_BUSY", STATUS_DEVICE_BUSY },
4561 { "DIRECTORY_NOT_EMPTY", STATUS_DIRECTORY_NOT_EMPTY },
4562 { "DISK_FULL", STATUS_DISK_FULL },
4563 { "DLL_NOT_FOUND", STATUS_DLL_NOT_FOUND },
4564 { "ERROR_CLASS_ALREADY_EXISTS", 0xc0010000 | ERROR_CLASS_ALREADY_EXISTS },
4565 { "ERROR_CLASS_DOES_NOT_EXIST", 0xc0010000 | ERROR_CLASS_DOES_NOT_EXIST },
4566 { "ERROR_CLASS_HAS_WINDOWS", 0xc0010000 | ERROR_CLASS_HAS_WINDOWS },
4567 { "ERROR_CLIPBOARD_NOT_OPEN", 0xc0010000 | ERROR_CLIPBOARD_NOT_OPEN },
4568 { "ERROR_INVALID_INDEX", 0xc0010000 | ERROR_INVALID_INDEX },
4569 { "ERROR_INVALID_WINDOW_HANDLE", 0xc0010000 | ERROR_INVALID_WINDOW_HANDLE },
4570 { "FILE_DELETED", STATUS_FILE_DELETED },
4571 { "FILE_IS_A_DIRECTORY", STATUS_FILE_IS_A_DIRECTORY },
4572 { "FILE_LOCK_CONFLICT", STATUS_FILE_LOCK_CONFLICT },
4573 { "GENERIC_NOT_MAPPED", STATUS_GENERIC_NOT_MAPPED },
4574 { "HANDLES_CLOSED", STATUS_HANDLES_CLOSED },
4575 { "HANDLE_NOT_CLOSABLE", STATUS_HANDLE_NOT_CLOSABLE },
4576 { "ILLEGAL_FUNCTION", STATUS_ILLEGAL_FUNCTION },
4577 { "INSTANCE_NOT_AVAILABLE", STATUS_INSTANCE_NOT_AVAILABLE },
4578 { "INSUFFICIENT_RESOURCES", STATUS_INSUFFICIENT_RESOURCES },
4579 { "INVALID_CID", STATUS_INVALID_CID },
4580 { "INVALID_DEVICE_REQUEST", STATUS_INVALID_DEVICE_REQUEST },
4581 { "INVALID_FILE_FOR_SECTION", STATUS_INVALID_FILE_FOR_SECTION },
4582 { "INVALID_HANDLE", STATUS_INVALID_HANDLE },
4583 { "INVALID_PARAMETER", STATUS_INVALID_PARAMETER },
4584 { "INVALID_SECURITY_DESCR", STATUS_INVALID_SECURITY_DESCR },
4585 { "IO_TIMEOUT", STATUS_IO_TIMEOUT },
4586 { "KEY_DELETED", STATUS_KEY_DELETED },
4587 { "MAPPED_FILE_SIZE_ZERO", STATUS_MAPPED_FILE_SIZE_ZERO },
4588 { "MUTANT_NOT_OWNED", STATUS_MUTANT_NOT_OWNED },
4589 { "NAME_TOO_LONG", STATUS_NAME_TOO_LONG },
4590 { "NOTIFY_ENUM_DIR", STATUS_NOTIFY_ENUM_DIR },
4591 { "NOT_ALL_ASSIGNED", STATUS_NOT_ALL_ASSIGNED },
4592 { "NOT_A_DIRECTORY", STATUS_NOT_A_DIRECTORY },
4593 { "NOT_FOUND", STATUS_NOT_FOUND },
4594 { "NOT_IMPLEMENTED", STATUS_NOT_IMPLEMENTED },
4595 { "NOT_REGISTRY_FILE", STATUS_NOT_REGISTRY_FILE },
4596 { "NOT_SUPPORTED", STATUS_NOT_SUPPORTED },
4597 { "NO_DATA_DETECTED", STATUS_NO_DATA_DETECTED },
4598 { "NO_IMPERSONATION_TOKEN", STATUS_NO_IMPERSONATION_TOKEN },
4599 { "NO_MEMORY", STATUS_NO_MEMORY },
4600 { "NO_MORE_ENTRIES", STATUS_NO_MORE_ENTRIES },
4601 { "NO_MORE_FILES", STATUS_NO_MORE_FILES },
4602 { "NO_SUCH_DEVICE", STATUS_NO_SUCH_DEVICE },
4603 { "NO_SUCH_FILE", STATUS_NO_SUCH_FILE },
4604 { "NO_TOKEN", STATUS_NO_TOKEN },
4605 { "OBJECT_NAME_COLLISION", STATUS_OBJECT_NAME_COLLISION },
4606 { "OBJECT_NAME_EXISTS", STATUS_OBJECT_NAME_EXISTS },
4607 { "OBJECT_NAME_INVALID", STATUS_OBJECT_NAME_INVALID },
4608 { "OBJECT_NAME_NOT_FOUND", STATUS_OBJECT_NAME_NOT_FOUND },
4609 { "OBJECT_PATH_INVALID", STATUS_OBJECT_PATH_INVALID },
4610 { "OBJECT_PATH_NOT_FOUND", STATUS_OBJECT_PATH_NOT_FOUND },
4611 { "OBJECT_PATH_SYNTAX_BAD", STATUS_OBJECT_PATH_SYNTAX_BAD },
4612 { "OBJECT_TYPE_MISMATCH", STATUS_OBJECT_TYPE_MISMATCH },
4613 { "PENDING", STATUS_PENDING },
4614 { "PIPE_BUSY", STATUS_PIPE_BUSY },
4615 { "PIPE_CONNECTED", STATUS_PIPE_CONNECTED },
4616 { "PIPE_DISCONNECTED", STATUS_PIPE_DISCONNECTED },
4617 { "PIPE_LISTENING", STATUS_PIPE_LISTENING },
4618 { "PIPE_NOT_AVAILABLE", STATUS_PIPE_NOT_AVAILABLE },
4619 { "PRIVILEGE_NOT_HELD", STATUS_PRIVILEGE_NOT_HELD },
4620 { "PROCESS_IS_TERMINATING", STATUS_PROCESS_IS_TERMINATING },
4621 { "SECTION_TOO_BIG", STATUS_SECTION_TOO_BIG },
4622 { "SEMAPHORE_LIMIT_EXCEEDED", STATUS_SEMAPHORE_LIMIT_EXCEEDED },
4623 { "SHARING_VIOLATION", STATUS_SHARING_VIOLATION },
4624 { "SHUTDOWN_IN_PROGRESS", STATUS_SHUTDOWN_IN_PROGRESS },
4625 { "SUSPEND_COUNT_EXCEEDED", STATUS_SUSPEND_COUNT_EXCEEDED },
4626 { "THREAD_IS_TERMINATING", STATUS_THREAD_IS_TERMINATING },
4627 { "TIMEOUT", STATUS_TIMEOUT },
4628 { "TOO_MANY_OPENED_FILES", STATUS_TOO_MANY_OPENED_FILES },
4629 { "UNSUCCESSFUL", STATUS_UNSUCCESSFUL },
4630 { "USER_APC", STATUS_USER_APC },
4631 { "VOLUME_DISMOUNTED", STATUS_VOLUME_DISMOUNTED },
4632 { "WAS_LOCKED", STATUS_WAS_LOCKED },
4633 { NULL, 0 }
4636 /* ### make_requests end ### */
4637 /* Everything above this line is generated automatically by tools/make_requests */
4639 static const char *get_status_name( unsigned int status )
4641 int i;
4642 static char buffer[10];
4644 if (status)
4646 for (i = 0; status_names[i].name; i++)
4647 if (status_names[i].value == status) return status_names[i].name;
4649 sprintf( buffer, "%x", status );
4650 return buffer;
4653 void trace_request(void)
4655 enum request req = current->req.request_header.req;
4656 if (req < REQ_NB_REQUESTS)
4658 fprintf( stderr, "%04x: %s(", current->id, req_names[req] );
4659 if (req_dumpers[req])
4661 cur_data = get_req_data();
4662 cur_size = get_req_data_size();
4663 req_dumpers[req]( &current->req );
4665 fprintf( stderr, " )\n" );
4667 else fprintf( stderr, "%04x: %d(?)\n", current->id, req );
4670 void trace_reply( enum request req, const union generic_reply *reply )
4672 if (req < REQ_NB_REQUESTS)
4674 fprintf( stderr, "%04x: %s() = %s",
4675 current->id, req_names[req], get_status_name(current->error) );
4676 if (reply_dumpers[req])
4678 fprintf( stderr, " {" );
4679 cur_data = current->reply_data;
4680 cur_size = reply->reply_header.reply_size;
4681 reply_dumpers[req]( reply );
4682 fprintf( stderr, " }" );
4684 fputc( '\n', stderr );
4686 else fprintf( stderr, "%04x: %d() = %s\n",
4687 current->id, req, get_status_name(current->error) );