trace.c 197 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589
  1. /*
  2. * Server request tracing
  3. *
  4. * Copyright (C) 1999 Alexandre Julliard
  5. *
  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.
  10. *
  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.
  15. *
  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
  19. */
  20. #include "config.h"
  21. #include <ctype.h>
  22. #include <stdarg.h>
  23. #include <stdio.h>
  24. #include <sys/types.h>
  25. #ifdef HAVE_SYS_UIO_H
  26. #include <sys/uio.h>
  27. #endif
  28. #include "ntstatus.h"
  29. #define WIN32_NO_STATUS
  30. #include "windef.h"
  31. #include "winbase.h"
  32. #include "wincon.h"
  33. #include "winternl.h"
  34. #include "winuser.h"
  35. #include "winioctl.h"
  36. #include "wine/condrv.h"
  37. #include "ddk/wdm.h"
  38. #include "ddk/ntddser.h"
  39. #define USE_WS_PREFIX
  40. #include "winsock2.h"
  41. #include "file.h"
  42. #include "request.h"
  43. #include "security.h"
  44. #include "unicode.h"
  45. static const void *cur_data;
  46. static data_size_t cur_size;
  47. static const char *get_status_name( unsigned int status );
  48. /* utility functions */
  49. static inline void remove_data( data_size_t size )
  50. {
  51. cur_data = (const char *)cur_data + size;
  52. cur_size -= size;
  53. }
  54. static void dump_uints( const char *prefix, const unsigned int *ptr, int len )
  55. {
  56. fprintf( stderr, "%s{", prefix );
  57. while (len > 0)
  58. {
  59. fprintf( stderr, "%08x", *ptr++ );
  60. if (--len) fputc( ',', stderr );
  61. }
  62. fputc( '}', stderr );
  63. }
  64. static void dump_handles( const char *prefix, const obj_handle_t *data, data_size_t size )
  65. {
  66. data_size_t len = size / sizeof(*data);
  67. fprintf( stderr,"%s{", prefix );
  68. while (len > 0)
  69. {
  70. fprintf( stderr, "%04x", *data++ );
  71. if (--len) fputc( ',', stderr );
  72. }
  73. fputc( '}', stderr );
  74. }
  75. static void dump_timeout( const char *prefix, const timeout_t *time )
  76. {
  77. fprintf( stderr, "%s%s", prefix, get_timeout_str(*time) );
  78. }
  79. static void dump_abstime( const char *prefix, const abstime_t *when )
  80. {
  81. timeout_t timeout = abstime_to_timeout( *when );
  82. dump_timeout( prefix, &timeout );
  83. }
  84. static void dump_uint64( const char *prefix, const unsigned __int64 *val )
  85. {
  86. if ((unsigned int)*val != *val)
  87. fprintf( stderr, "%s%x%08x", prefix, (unsigned int)(*val >> 32), (unsigned int)*val );
  88. else
  89. fprintf( stderr, "%s%08x", prefix, (unsigned int)*val );
  90. }
  91. static void dump_uint128( const char *prefix, const unsigned __int64 val[2] )
  92. {
  93. unsigned __int64 low = val[0], high = val[1];
  94. if ((unsigned int)high != high)
  95. fprintf( stderr, "%s%x%08x%08x%08x", prefix, (unsigned int)(high >> 32), (unsigned int)high,
  96. (unsigned int)(low >> 32), (unsigned int)low );
  97. else if (high)
  98. fprintf( stderr, "%s%x%08x%08x", prefix, (unsigned int)high,
  99. (unsigned int)(low >> 32), (unsigned int)low );
  100. else if ((unsigned int)low != low)
  101. fprintf( stderr, "%s%x%08x", prefix, (unsigned int)(low >> 32), (unsigned int)low );
  102. else
  103. fprintf( stderr, "%s%x", prefix, (unsigned int)low );
  104. }
  105. static void dump_rectangle( const char *prefix, const rectangle_t *rect )
  106. {
  107. fprintf( stderr, "%s{%d,%d;%d,%d}", prefix,
  108. rect->left, rect->top, rect->right, rect->bottom );
  109. }
  110. static void dump_ioctl_code( const char *prefix, const ioctl_code_t *code )
  111. {
  112. switch(*code)
  113. {
  114. #define CASE(c) case c: fprintf( stderr, "%s%s", prefix, #c ); break
  115. CASE(IOCTL_CONDRV_ACTIVATE);
  116. CASE(IOCTL_CONDRV_BIND_PID);
  117. CASE(IOCTL_CONDRV_CTRL_EVENT);
  118. CASE(IOCTL_CONDRV_FILL_OUTPUT);
  119. CASE(IOCTL_CONDRV_GET_INPUT_INFO);
  120. CASE(IOCTL_CONDRV_GET_MODE);
  121. CASE(IOCTL_CONDRV_GET_OUTPUT_INFO);
  122. CASE(IOCTL_CONDRV_GET_TITLE);
  123. CASE(IOCTL_CONDRV_PEEK);
  124. CASE(IOCTL_CONDRV_READ_CONSOLE);
  125. CASE(IOCTL_CONDRV_READ_INPUT);
  126. CASE(IOCTL_CONDRV_READ_OUTPUT);
  127. CASE(IOCTL_CONDRV_SET_MODE);
  128. CASE(IOCTL_CONDRV_SET_OUTPUT_INFO);
  129. CASE(IOCTL_CONDRV_SETUP_INPUT);
  130. CASE(IOCTL_CONDRV_WRITE_CONSOLE);
  131. CASE(IOCTL_CONDRV_WRITE_INPUT);
  132. CASE(IOCTL_CONDRV_WRITE_OUTPUT);
  133. CASE(FSCTL_DISMOUNT_VOLUME);
  134. CASE(FSCTL_PIPE_DISCONNECT);
  135. CASE(FSCTL_PIPE_LISTEN);
  136. CASE(FSCTL_PIPE_PEEK);
  137. CASE(FSCTL_PIPE_WAIT);
  138. CASE(IOCTL_SERIAL_GET_TIMEOUTS);
  139. CASE(IOCTL_SERIAL_GET_WAIT_MASK);
  140. CASE(IOCTL_SERIAL_SET_TIMEOUTS);
  141. CASE(IOCTL_SERIAL_SET_WAIT_MASK);
  142. CASE(WS_SIO_ADDRESS_LIST_CHANGE);
  143. default: fprintf( stderr, "%s%08x", prefix, *code ); break;
  144. #undef CASE
  145. }
  146. }
  147. static void dump_apc_call( const char *prefix, const apc_call_t *call )
  148. {
  149. fprintf( stderr, "%s{", prefix );
  150. switch(call->type)
  151. {
  152. case APC_NONE:
  153. fprintf( stderr, "APC_NONE" );
  154. break;
  155. case APC_USER:
  156. dump_uint64( "APC_USER,func=", &call->user.func );
  157. dump_uint64( ",args={", &call->user.args[0] );
  158. dump_uint64( ",", &call->user.args[1] );
  159. dump_uint64( ",", &call->user.args[2] );
  160. fputc( '}', stderr );
  161. break;
  162. case APC_ASYNC_IO:
  163. dump_uint64( "APC_ASYNC_IO,user=", &call->async_io.user );
  164. dump_uint64( ",sb=", &call->async_io.sb );
  165. fprintf( stderr, ",status=%s,result=%u", get_status_name(call->async_io.status), call->async_io.result );
  166. break;
  167. case APC_VIRTUAL_ALLOC:
  168. dump_uint64( "APC_VIRTUAL_ALLOC,addr==", &call->virtual_alloc.addr );
  169. dump_uint64( ",size=", &call->virtual_alloc.size );
  170. dump_uint64( ",zero_bits=", &call->virtual_alloc.zero_bits );
  171. fprintf( stderr, ",op_type=%x,prot=%x", call->virtual_alloc.op_type, call->virtual_alloc.prot );
  172. break;
  173. case APC_VIRTUAL_FREE:
  174. dump_uint64( "APC_VIRTUAL_FREE,addr=", &call->virtual_free.addr );
  175. dump_uint64( ",size=", &call->virtual_free.size );
  176. fprintf( stderr, ",op_type=%x", call->virtual_free.op_type );
  177. break;
  178. case APC_VIRTUAL_QUERY:
  179. dump_uint64( "APC_VIRTUAL_QUERY,addr=", &call->virtual_query.addr );
  180. break;
  181. case APC_VIRTUAL_PROTECT:
  182. dump_uint64( "APC_VIRTUAL_PROTECT,addr=", &call->virtual_protect.addr );
  183. dump_uint64( ",size=", &call->virtual_protect.size );
  184. fprintf( stderr, ",prot=%x", call->virtual_protect.prot );
  185. break;
  186. case APC_VIRTUAL_FLUSH:
  187. dump_uint64( "APC_VIRTUAL_FLUSH,addr=", &call->virtual_flush.addr );
  188. dump_uint64( ",size=", &call->virtual_flush.size );
  189. break;
  190. case APC_VIRTUAL_LOCK:
  191. dump_uint64( "APC_VIRTUAL_LOCK,addr=", &call->virtual_lock.addr );
  192. dump_uint64( ",size=", &call->virtual_lock.size );
  193. break;
  194. case APC_VIRTUAL_UNLOCK:
  195. dump_uint64( "APC_VIRTUAL_UNLOCK,addr=", &call->virtual_unlock.addr );
  196. dump_uint64( ",size=", &call->virtual_unlock.size );
  197. break;
  198. case APC_MAP_VIEW:
  199. fprintf( stderr, "APC_MAP_VIEW,handle=%04x", call->map_view.handle );
  200. dump_uint64( ",addr=", &call->map_view.addr );
  201. dump_uint64( ",size=", &call->map_view.size );
  202. dump_uint64( ",offset=", &call->map_view.offset );
  203. dump_uint64( ",zero_bits=", &call->map_view.zero_bits );
  204. fprintf( stderr, ",alloc_type=%x,prot=%x", call->map_view.alloc_type, call->map_view.prot );
  205. break;
  206. case APC_UNMAP_VIEW:
  207. dump_uint64( "APC_UNMAP_VIEW,addr=", &call->unmap_view.addr );
  208. break;
  209. case APC_CREATE_THREAD:
  210. dump_uint64( "APC_CREATE_THREAD,func=", &call->create_thread.func );
  211. dump_uint64( ",arg=", &call->create_thread.arg );
  212. dump_uint64( ",zero_bits=", &call->create_thread.zero_bits );
  213. dump_uint64( ",reserve=", &call->create_thread.reserve );
  214. dump_uint64( ",commit=", &call->create_thread.commit );
  215. fprintf( stderr, ",flags=%x", call->create_thread.flags );
  216. break;
  217. case APC_DUP_HANDLE:
  218. fprintf( stderr, "APC_DUP_HANDLE,src_handle=%04x,dst_process=%04x,access=%x,attributes=%x,options=%x",
  219. call->dup_handle.src_handle, call->dup_handle.dst_process, call->dup_handle.access,
  220. call->dup_handle.attributes, call->dup_handle.options );
  221. break;
  222. default:
  223. fprintf( stderr, "type=%u", call->type );
  224. break;
  225. }
  226. fputc( '}', stderr );
  227. }
  228. static void dump_apc_result( const char *prefix, const apc_result_t *result )
  229. {
  230. fprintf( stderr, "%s{", prefix );
  231. switch(result->type)
  232. {
  233. case APC_NONE:
  234. break;
  235. case APC_ASYNC_IO:
  236. fprintf( stderr, "APC_ASYNC_IO,status=%s,total=%u",
  237. get_status_name( result->async_io.status ), result->async_io.total );
  238. break;
  239. case APC_VIRTUAL_ALLOC:
  240. fprintf( stderr, "APC_VIRTUAL_ALLOC,status=%s",
  241. get_status_name( result->virtual_alloc.status ));
  242. dump_uint64( ",addr=", &result->virtual_alloc.addr );
  243. dump_uint64( ",size=", &result->virtual_alloc.size );
  244. break;
  245. case APC_VIRTUAL_FREE:
  246. fprintf( stderr, "APC_VIRTUAL_FREE,status=%s",
  247. get_status_name( result->virtual_free.status ));
  248. dump_uint64( ",addr=", &result->virtual_free.addr );
  249. dump_uint64( ",size=", &result->virtual_free.size );
  250. break;
  251. case APC_VIRTUAL_QUERY:
  252. fprintf( stderr, "APC_VIRTUAL_QUERY,status=%s",
  253. get_status_name( result->virtual_query.status ));
  254. dump_uint64( ",base=", &result->virtual_query.base );
  255. dump_uint64( ",alloc_base=", &result->virtual_query.alloc_base );
  256. dump_uint64( ",size=", &result->virtual_query.size );
  257. fprintf( stderr, ",state=%x,prot=%x,alloc_prot=%x,alloc_type=%x",
  258. result->virtual_query.state, result->virtual_query.prot,
  259. result->virtual_query.alloc_prot, result->virtual_query.alloc_type );
  260. break;
  261. case APC_VIRTUAL_PROTECT:
  262. fprintf( stderr, "APC_VIRTUAL_PROTECT,status=%s",
  263. get_status_name( result->virtual_protect.status ));
  264. dump_uint64( ",addr=", &result->virtual_protect.addr );
  265. dump_uint64( ",size=", &result->virtual_protect.size );
  266. fprintf( stderr, ",prot=%x", result->virtual_protect.prot );
  267. break;
  268. case APC_VIRTUAL_FLUSH:
  269. fprintf( stderr, "APC_VIRTUAL_FLUSH,status=%s",
  270. get_status_name( result->virtual_flush.status ));
  271. dump_uint64( ",addr=", &result->virtual_flush.addr );
  272. dump_uint64( ",size=", &result->virtual_flush.size );
  273. break;
  274. case APC_VIRTUAL_LOCK:
  275. fprintf( stderr, "APC_VIRTUAL_LOCK,status=%s",
  276. get_status_name( result->virtual_lock.status ));
  277. dump_uint64( ",addr=", &result->virtual_lock.addr );
  278. dump_uint64( ",size=", &result->virtual_lock.size );
  279. break;
  280. case APC_VIRTUAL_UNLOCK:
  281. fprintf( stderr, "APC_VIRTUAL_UNLOCK,status=%s",
  282. get_status_name( result->virtual_unlock.status ));
  283. dump_uint64( ",addr=", &result->virtual_unlock.addr );
  284. dump_uint64( ",size=", &result->virtual_unlock.size );
  285. break;
  286. case APC_MAP_VIEW:
  287. fprintf( stderr, "APC_MAP_VIEW,status=%s",
  288. get_status_name( result->map_view.status ));
  289. dump_uint64( ",addr=", &result->map_view.addr );
  290. dump_uint64( ",size=", &result->map_view.size );
  291. break;
  292. case APC_UNMAP_VIEW:
  293. fprintf( stderr, "APC_UNMAP_VIEW,status=%s",
  294. get_status_name( result->unmap_view.status ) );
  295. break;
  296. case APC_CREATE_THREAD:
  297. fprintf( stderr, "APC_CREATE_THREAD,status=%s,pid=%04x,tid=%04x,handle=%04x",
  298. get_status_name( result->create_thread.status ),
  299. result->create_thread.pid, result->create_thread.tid, result->create_thread.handle );
  300. break;
  301. case APC_DUP_HANDLE:
  302. fprintf( stderr, "APC_DUP_HANDLE,status=%s,handle=%04x",
  303. get_status_name( result->dup_handle.status ), result->dup_handle.handle );
  304. break;
  305. default:
  306. fprintf( stderr, "type=%u", result->type );
  307. break;
  308. }
  309. fputc( '}', stderr );
  310. }
  311. static void dump_async_data( const char *prefix, const async_data_t *data )
  312. {
  313. fprintf( stderr, "%s{handle=%04x,event=%04x", prefix, data->handle, data->event );
  314. dump_uint64( ",iosb=", &data->iosb );
  315. dump_uint64( ",user=", &data->user );
  316. dump_uint64( ",apc=", &data->apc );
  317. dump_uint64( ",apc_context=", &data->apc_context );
  318. fputc( '}', stderr );
  319. }
  320. static void dump_irp_params( const char *prefix, const irp_params_t *data )
  321. {
  322. switch (data->type)
  323. {
  324. case IRP_CALL_NONE:
  325. fprintf( stderr, "%s{NONE}", prefix );
  326. break;
  327. case IRP_CALL_CREATE:
  328. fprintf( stderr, "%s{CREATE,access=%08x,sharing=%08x,options=%08x",
  329. prefix, data->create.access, data->create.sharing, data->create.options );
  330. dump_uint64( ",device=", &data->create.device );
  331. fprintf( stderr, ",file=%08x}", data->create.file );
  332. break;
  333. case IRP_CALL_CLOSE:
  334. fprintf( stderr, "%s{CLOSE", prefix );
  335. dump_uint64( ",file=", &data->close.file );
  336. fputc( '}', stderr );
  337. break;
  338. case IRP_CALL_READ:
  339. fprintf( stderr, "%s{READ,key=%08x,out_size=%u", prefix, data->read.key,
  340. data->read.out_size );
  341. dump_uint64( ",pos=", &data->read.pos );
  342. dump_uint64( ",file=", &data->read.file );
  343. fputc( '}', stderr );
  344. break;
  345. case IRP_CALL_WRITE:
  346. fprintf( stderr, "%s{WRITE,key=%08x", prefix, data->write.key );
  347. dump_uint64( ",pos=", &data->write.pos );
  348. dump_uint64( ",file=", &data->write.file );
  349. fputc( '}', stderr );
  350. break;
  351. case IRP_CALL_FLUSH:
  352. fprintf( stderr, "%s{FLUSH", prefix );
  353. dump_uint64( ",file=", &data->flush.file );
  354. fputc( '}', stderr );
  355. break;
  356. case IRP_CALL_IOCTL:
  357. fprintf( stderr, "%s{IOCTL", prefix );
  358. dump_ioctl_code( ",code=", &data->ioctl.code );
  359. fprintf( stderr, ",out_size=%u", data->ioctl.out_size );
  360. dump_uint64( ",file=", &data->ioctl.file );
  361. fputc( '}', stderr );
  362. break;
  363. case IRP_CALL_VOLUME:
  364. fprintf( stderr, "%s{VOLUME,class=%u,out_size=%u", prefix,
  365. data->volume.info_class, data->volume.out_size );
  366. dump_uint64( ",file=", &data->volume.file );
  367. fputc( '}', stderr );
  368. break;
  369. case IRP_CALL_FREE:
  370. fprintf( stderr, "%s{FREE", prefix );
  371. dump_uint64( ",obj=", &data->free.obj );
  372. fputc( '}', stderr );
  373. break;
  374. case IRP_CALL_CANCEL:
  375. fprintf( stderr, "%s{CANCEL", prefix );
  376. dump_uint64( ",irp=", &data->cancel.irp );
  377. fputc( '}', stderr );
  378. break;
  379. }
  380. }
  381. static void dump_rawinput( const char *prefix, const union rawinput *rawinput )
  382. {
  383. switch (rawinput->type)
  384. {
  385. case RIM_TYPEMOUSE:
  386. fprintf( stderr, "%s{type=MOUSE,x=%d,y=%d,data=%08x}", prefix, rawinput->mouse.x,
  387. rawinput->mouse.y, rawinput->mouse.data );
  388. break;
  389. case RIM_TYPEKEYBOARD:
  390. fprintf( stderr, "%s{type=KEYBOARD,message=%04x,vkey=%04hx,scan=%04hx}", prefix,
  391. rawinput->kbd.message, rawinput->kbd.vkey, rawinput->kbd.scan );
  392. break;
  393. case RIM_TYPEHID:
  394. fprintf( stderr, "%s{type=HID,device=%04x,param=%04x,page=%04hx,usage=%04hx,count=%u,length=%u}",
  395. prefix, rawinput->hid.device, rawinput->hid.param, rawinput->hid.usage_page,
  396. rawinput->hid.usage, rawinput->hid.count, rawinput->hid.length );
  397. break;
  398. default:
  399. fprintf( stderr, "%s{type=%04x}", prefix, rawinput->type );
  400. break;
  401. }
  402. }
  403. static void dump_hw_input( const char *prefix, const hw_input_t *input )
  404. {
  405. switch (input->type)
  406. {
  407. case INPUT_MOUSE:
  408. fprintf( stderr, "%s{type=MOUSE,x=%d,y=%d,data=%08x,flags=%08x,time=%u",
  409. prefix, input->mouse.x, input->mouse.y, input->mouse.data, input->mouse.flags,
  410. input->mouse.time );
  411. dump_uint64( ",info=", &input->mouse.info );
  412. fputc( '}', stderr );
  413. break;
  414. case INPUT_KEYBOARD:
  415. fprintf( stderr, "%s{type=KEYBOARD,vkey=%04hx,scan=%04hx,flags=%08x,time=%u",
  416. prefix, input->kbd.vkey, input->kbd.scan, input->kbd.flags, input->kbd.time );
  417. dump_uint64( ",info=", &input->kbd.info );
  418. fputc( '}', stderr );
  419. break;
  420. case INPUT_HARDWARE:
  421. fprintf( stderr, "%s{type=HARDWARE,msg=%04x", prefix, input->hw.msg );
  422. dump_uint64( ",lparam=", &input->hw.lparam );
  423. switch (input->hw.msg)
  424. {
  425. case WM_INPUT:
  426. case WM_INPUT_DEVICE_CHANGE:
  427. dump_rawinput( ",rawinput=", &input->hw.rawinput );
  428. }
  429. fputc( '}', stderr );
  430. break;
  431. default:
  432. fprintf( stderr, "%s{type=%04x}", prefix, input->type );
  433. break;
  434. }
  435. }
  436. static void dump_luid( const char *prefix, const struct luid *luid )
  437. {
  438. fprintf( stderr, "%s%d.%u", prefix, luid->high_part, luid->low_part );
  439. }
  440. static void dump_generic_map( const char *prefix, const generic_map_t *map )
  441. {
  442. fprintf( stderr, "%s{r=%08x,w=%08x,x=%08x,a=%08x}",
  443. prefix, map->read, map->write, map->exec, map->all );
  444. }
  445. static void dump_varargs_ints( const char *prefix, data_size_t size )
  446. {
  447. const int *data = cur_data;
  448. data_size_t len = size / sizeof(*data);
  449. fprintf( stderr,"%s{", prefix );
  450. while (len > 0)
  451. {
  452. fprintf( stderr, "%d", *data++ );
  453. if (--len) fputc( ',', stderr );
  454. }
  455. fputc( '}', stderr );
  456. remove_data( size );
  457. }
  458. static void dump_varargs_uints( const char *prefix, data_size_t size )
  459. {
  460. const unsigned int *data = cur_data;
  461. dump_uints( prefix, data, size / sizeof(*data) );
  462. remove_data( size );
  463. }
  464. static void dump_varargs_uints64( const char *prefix, data_size_t size )
  465. {
  466. const unsigned __int64 *data = cur_data;
  467. data_size_t len = size / sizeof(*data);
  468. fprintf( stderr,"%s{", prefix );
  469. while (len > 0)
  470. {
  471. dump_uint64( "", data++ );
  472. if (--len) fputc( ',', stderr );
  473. }
  474. fputc( '}', stderr );
  475. remove_data( size );
  476. }
  477. static void dump_varargs_ushorts( const char *prefix, data_size_t size )
  478. {
  479. const unsigned short *data = cur_data;
  480. data_size_t len = size / sizeof(*data);
  481. fprintf( stderr, "%s{", prefix );
  482. while (len > 0)
  483. {
  484. fprintf( stderr, "%04x", *data++ );
  485. if (--len) fputc( ',', stderr );
  486. }
  487. fputc( '}', stderr );
  488. remove_data( size );
  489. }
  490. static void dump_varargs_apc_result( const char *prefix, data_size_t size )
  491. {
  492. const apc_result_t *result = cur_data;
  493. if (size >= sizeof(*result))
  494. {
  495. dump_apc_result( prefix, result );
  496. size = sizeof(*result);
  497. }
  498. remove_data( size );
  499. }
  500. static void dump_varargs_select_op( const char *prefix, data_size_t size )
  501. {
  502. select_op_t data;
  503. if (!size)
  504. {
  505. fprintf( stderr, "%s{}", prefix );
  506. return;
  507. }
  508. memset( &data, 0, sizeof(data) );
  509. memcpy( &data, cur_data, min( size, sizeof(data) ));
  510. fprintf( stderr, "%s{", prefix );
  511. switch (data.op)
  512. {
  513. case SELECT_NONE:
  514. fprintf( stderr, "NONE" );
  515. break;
  516. case SELECT_WAIT:
  517. case SELECT_WAIT_ALL:
  518. fprintf( stderr, "%s", data.op == SELECT_WAIT ? "WAIT" : "WAIT_ALL" );
  519. if (size > offsetof( select_op_t, wait.handles ))
  520. dump_handles( ",handles=", data.wait.handles,
  521. min( size, sizeof(data.wait) ) - offsetof( select_op_t, wait.handles ));
  522. break;
  523. case SELECT_SIGNAL_AND_WAIT:
  524. fprintf( stderr, "SIGNAL_AND_WAIT,signal=%04x,wait=%04x",
  525. data.signal_and_wait.signal, data.signal_and_wait.wait );
  526. break;
  527. case SELECT_KEYED_EVENT_WAIT:
  528. case SELECT_KEYED_EVENT_RELEASE:
  529. fprintf( stderr, "KEYED_EVENT_%s,handle=%04x",
  530. data.op == SELECT_KEYED_EVENT_WAIT ? "WAIT" : "RELEASE",
  531. data.keyed_event.handle );
  532. dump_uint64( ",key=", &data.keyed_event.key );
  533. break;
  534. default:
  535. fprintf( stderr, "op=%u", data.op );
  536. break;
  537. }
  538. fputc( '}', stderr );
  539. remove_data( size );
  540. }
  541. static void dump_varargs_user_handles( const char *prefix, data_size_t size )
  542. {
  543. const user_handle_t *data = cur_data;
  544. data_size_t len = size / sizeof(*data);
  545. fprintf( stderr,"%s{", prefix );
  546. while (len > 0)
  547. {
  548. fprintf( stderr, "%08x", *data++ );
  549. if (--len) fputc( ',', stderr );
  550. }
  551. fputc( '}', stderr );
  552. remove_data( size );
  553. }
  554. static void dump_varargs_bytes( const char *prefix, data_size_t size )
  555. {
  556. const unsigned char *data = cur_data;
  557. data_size_t len = min( 1024, size );
  558. fprintf( stderr,"%s{", prefix );
  559. while (len > 0)
  560. {
  561. fprintf( stderr, "%02x", *data++ );
  562. if (--len) fputc( ',', stderr );
  563. }
  564. if (size > 1024) fprintf( stderr, "...(total %u)", size );
  565. fputc( '}', stderr );
  566. remove_data( size );
  567. }
  568. static void dump_varargs_string( const char *prefix, data_size_t size )
  569. {
  570. fprintf( stderr, "%s\"%.*s\"", prefix, (int)size, (const char *)cur_data );
  571. remove_data( size );
  572. }
  573. static void dump_varargs_unicode_str( const char *prefix, data_size_t size )
  574. {
  575. fprintf( stderr, "%sL\"", prefix );
  576. dump_strW( cur_data, size, stderr, "\"\"" );
  577. fputc( '\"', stderr );
  578. remove_data( size );
  579. }
  580. static void dump_varargs_context( const char *prefix, data_size_t size )
  581. {
  582. const context_t *context = cur_data;
  583. context_t ctx;
  584. unsigned int i;
  585. if (!size)
  586. {
  587. fprintf( stderr, "%s{}", prefix );
  588. return;
  589. }
  590. size = min( size, sizeof(ctx) );
  591. memset( &ctx, 0, sizeof(ctx) );
  592. memcpy( &ctx, context, size );
  593. switch (ctx.machine)
  594. {
  595. case IMAGE_FILE_MACHINE_I386:
  596. fprintf( stderr, "%s{machine=i386", prefix );
  597. if (ctx.flags & SERVER_CTX_CONTROL)
  598. fprintf( stderr, ",eip=%08x,esp=%08x,ebp=%08x,eflags=%08x,cs=%04x,ss=%04x",
  599. ctx.ctl.i386_regs.eip, ctx.ctl.i386_regs.esp, ctx.ctl.i386_regs.ebp,
  600. ctx.ctl.i386_regs.eflags, ctx.ctl.i386_regs.cs, ctx.ctl.i386_regs.ss );
  601. if (ctx.flags & SERVER_CTX_SEGMENTS)
  602. fprintf( stderr, ",ds=%04x,es=%04x,fs=%04x,gs=%04x",
  603. ctx.seg.i386_regs.ds, ctx.seg.i386_regs.es,
  604. ctx.seg.i386_regs.fs, ctx.seg.i386_regs.gs );
  605. if (ctx.flags & SERVER_CTX_INTEGER)
  606. fprintf( stderr, ",eax=%08x,ebx=%08x,ecx=%08x,edx=%08x,esi=%08x,edi=%08x",
  607. ctx.integer.i386_regs.eax, ctx.integer.i386_regs.ebx, ctx.integer.i386_regs.ecx,
  608. ctx.integer.i386_regs.edx, ctx.integer.i386_regs.esi, ctx.integer.i386_regs.edi );
  609. if (ctx.flags & SERVER_CTX_DEBUG_REGISTERS)
  610. fprintf( stderr, ",dr0=%08x,dr1=%08x,dr2=%08x,dr3=%08x,dr6=%08x,dr7=%08x",
  611. ctx.debug.i386_regs.dr0, ctx.debug.i386_regs.dr1, ctx.debug.i386_regs.dr2,
  612. ctx.debug.i386_regs.dr3, ctx.debug.i386_regs.dr6, ctx.debug.i386_regs.dr7 );
  613. if (ctx.flags & SERVER_CTX_FLOATING_POINT)
  614. {
  615. fprintf( stderr, ",fp.ctrl=%08x,fp.status=%08x,fp.tag=%08x,fp.err_off=%08x,fp.err_sel=%08x",
  616. ctx.fp.i386_regs.ctrl, ctx.fp.i386_regs.status, ctx.fp.i386_regs.tag,
  617. ctx.fp.i386_regs.err_off, ctx.fp.i386_regs.err_sel );
  618. fprintf( stderr, ",fp.data_off=%08x,fp.data_sel=%08x,fp.cr0npx=%08x",
  619. ctx.fp.i386_regs.data_off, ctx.fp.i386_regs.data_sel, ctx.fp.i386_regs.cr0npx );
  620. for (i = 0; i < 8; i++)
  621. {
  622. unsigned __int64 reg[2];
  623. memset( reg, 0, sizeof(reg) );
  624. memcpy( reg, &ctx.fp.i386_regs.regs[10 * i], 10 );
  625. fprintf( stderr, ",fp.reg%u=", i );
  626. dump_uint128( "", reg );
  627. }
  628. }
  629. if (ctx.flags & SERVER_CTX_EXTENDED_REGISTERS)
  630. dump_uints( ",extended=", (const unsigned int *)ctx.ext.i386_regs,
  631. sizeof(ctx.ext.i386_regs) / sizeof(int) );
  632. if (ctx.flags & SERVER_CTX_YMM_REGISTERS)
  633. for (i = 0; i < 16; i++)
  634. {
  635. fprintf( stderr, ",ymm%u=", i );
  636. dump_uint128( "", (const unsigned __int64 *)&ctx.ymm.regs.ymm_high[i] );
  637. }
  638. break;
  639. case IMAGE_FILE_MACHINE_AMD64:
  640. fprintf( stderr, "%s{machine=x86_64", prefix );
  641. if (ctx.flags & SERVER_CTX_CONTROL)
  642. {
  643. dump_uint64( ",rip=", &ctx.ctl.x86_64_regs.rip );
  644. dump_uint64( ",rbp=", &ctx.ctl.x86_64_regs.rbp );
  645. dump_uint64( ",rsp=", &ctx.ctl.x86_64_regs.rsp );
  646. fprintf( stderr, ",cs=%04x,ss=%04x,flags=%08x",
  647. ctx.ctl.x86_64_regs.cs, ctx.ctl.x86_64_regs.ss, ctx.ctl.x86_64_regs.flags );
  648. }
  649. if (ctx.flags & SERVER_CTX_INTEGER)
  650. {
  651. dump_uint64( ",rax=", &ctx.integer.x86_64_regs.rax );
  652. dump_uint64( ",rbx=", &ctx.integer.x86_64_regs.rbx );
  653. dump_uint64( ",rcx=", &ctx.integer.x86_64_regs.rcx );
  654. dump_uint64( ",rdx=", &ctx.integer.x86_64_regs.rdx );
  655. dump_uint64( ",rsi=", &ctx.integer.x86_64_regs.rsi );
  656. dump_uint64( ",rdi=", &ctx.integer.x86_64_regs.rdi );
  657. dump_uint64( ",r8=", &ctx.integer.x86_64_regs.r8 );
  658. dump_uint64( ",r9=", &ctx.integer.x86_64_regs.r9 );
  659. dump_uint64( ",r10=", &ctx.integer.x86_64_regs.r10 );
  660. dump_uint64( ",r11=", &ctx.integer.x86_64_regs.r11 );
  661. dump_uint64( ",r12=", &ctx.integer.x86_64_regs.r12 );
  662. dump_uint64( ",r13=", &ctx.integer.x86_64_regs.r13 );
  663. dump_uint64( ",r14=", &ctx.integer.x86_64_regs.r14 );
  664. dump_uint64( ",r15=", &ctx.integer.x86_64_regs.r15 );
  665. }
  666. if (ctx.flags & SERVER_CTX_SEGMENTS)
  667. fprintf( stderr, ",ds=%04x,es=%04x,fs=%04x,gs=%04x",
  668. ctx.seg.x86_64_regs.ds, ctx.seg.x86_64_regs.es,
  669. ctx.seg.x86_64_regs.fs, ctx.seg.x86_64_regs.gs );
  670. if (ctx.flags & SERVER_CTX_DEBUG_REGISTERS)
  671. {
  672. dump_uint64( ",dr0=", &ctx.debug.x86_64_regs.dr0 );
  673. dump_uint64( ",dr1=", &ctx.debug.x86_64_regs.dr1 );
  674. dump_uint64( ",dr2=", &ctx.debug.x86_64_regs.dr2 );
  675. dump_uint64( ",dr3=", &ctx.debug.x86_64_regs.dr3 );
  676. dump_uint64( ",dr6=", &ctx.debug.x86_64_regs.dr6 );
  677. dump_uint64( ",dr7=", &ctx.debug.x86_64_regs.dr7 );
  678. }
  679. if (ctx.flags & SERVER_CTX_FLOATING_POINT)
  680. for (i = 0; i < 32; i++)
  681. {
  682. fprintf( stderr, ",fp%u=", i );
  683. dump_uint128( "", (const unsigned __int64 *)&ctx.fp.x86_64_regs.fpregs[i] );
  684. }
  685. if (ctx.flags & SERVER_CTX_YMM_REGISTERS)
  686. for (i = 0; i < 16; i++)
  687. {
  688. fprintf( stderr, ",ymm%u=", i );
  689. dump_uint128( "", (const unsigned __int64 *)&ctx.ymm.regs.ymm_high[i] );
  690. }
  691. break;
  692. case IMAGE_FILE_MACHINE_ARMNT:
  693. fprintf( stderr, "%s{machine=arm", prefix );
  694. if (ctx.flags & SERVER_CTX_CONTROL)
  695. fprintf( stderr, ",sp=%08x,lr=%08x,pc=%08x,cpsr=%08x",
  696. ctx.ctl.arm_regs.sp, ctx.ctl.arm_regs.lr,
  697. ctx.ctl.arm_regs.pc, ctx.ctl.arm_regs.cpsr );
  698. if (ctx.flags & SERVER_CTX_INTEGER)
  699. for (i = 0; i < 13; i++) fprintf( stderr, ",r%u=%08x", i, ctx.integer.arm_regs.r[i] );
  700. if (ctx.flags & SERVER_CTX_DEBUG_REGISTERS)
  701. {
  702. for (i = 0; i < 8; i++)
  703. fprintf( stderr, ",bcr%u=%08x,bvr%u=%08x",
  704. i, ctx.debug.arm_regs.bcr[i], i, ctx.debug.arm_regs.bvr[i] );
  705. fprintf( stderr, ",wcr0=%08x,wvr0=%08x",
  706. ctx.debug.arm_regs.wcr[0], ctx.debug.arm_regs.wvr[0] );
  707. }
  708. if (ctx.flags & SERVER_CTX_FLOATING_POINT)
  709. {
  710. for (i = 0; i < 32; i++)
  711. {
  712. fprintf( stderr, ",d%u=", i );
  713. dump_uint64( "", &ctx.fp.arm_regs.d[i] );
  714. }
  715. fprintf( stderr, ",fpscr=%08x", ctx.fp.arm_regs.fpscr );
  716. }
  717. break;
  718. case IMAGE_FILE_MACHINE_ARM64:
  719. fprintf( stderr, "%s{machine=arm64", prefix );
  720. if (ctx.flags & SERVER_CTX_CONTROL)
  721. {
  722. dump_uint64( ",sp=", &ctx.ctl.arm64_regs.sp );
  723. dump_uint64( ",pc=", &ctx.ctl.arm64_regs.pc );
  724. dump_uint64( ",pstate=", &ctx.ctl.arm64_regs.pstate );
  725. }
  726. if (ctx.flags & SERVER_CTX_INTEGER)
  727. {
  728. for (i = 0; i < 31; i++)
  729. {
  730. fprintf( stderr, ",x%u=", i );
  731. dump_uint64( "", &ctx.integer.arm64_regs.x[i] );
  732. }
  733. }
  734. if (ctx.flags & SERVER_CTX_DEBUG_REGISTERS)
  735. {
  736. for (i = 0; i < 8; i++)
  737. {
  738. fprintf( stderr, ",bcr%u=%08x,bvr%u=", i, ctx.debug.arm64_regs.bcr[i], i );
  739. dump_uint64( "", &ctx.debug.arm64_regs.bvr[i] );
  740. }
  741. for (i = 0; i < 2; i++)
  742. {
  743. fprintf( stderr, ",wcr%u=%08x,wvr%u=", i, ctx.debug.arm64_regs.wcr[i], i );
  744. dump_uint64( "", &ctx.debug.arm64_regs.wvr[i] );
  745. }
  746. }
  747. if (ctx.flags & SERVER_CTX_FLOATING_POINT)
  748. {
  749. for (i = 0; i < 32; i++)
  750. {
  751. fprintf( stderr, ",q%u=", i );
  752. dump_uint64( "", &ctx.fp.arm64_regs.q[i].high );
  753. dump_uint64( "", &ctx.fp.arm64_regs.q[i].low );
  754. }
  755. fprintf( stderr, ",fpcr=%08x,fpsr=%08x", ctx.fp.arm64_regs.fpcr, ctx.fp.arm64_regs.fpsr );
  756. }
  757. break;
  758. default:
  759. fprintf( stderr, "%s{machine=%04x", prefix, ctx.machine );
  760. break;
  761. }
  762. fputc( '}', stderr );
  763. remove_data( size );
  764. }
  765. static void dump_varargs_contexts( const char *prefix, data_size_t size )
  766. {
  767. if (!size)
  768. {
  769. fprintf( stderr, "%s{}", prefix );
  770. return;
  771. }
  772. fprintf( stderr, "%s{", prefix );
  773. while (cur_size)
  774. {
  775. dump_varargs_context( "", cur_size );
  776. fputc( cur_size ? ',' : '}', stderr );
  777. }
  778. }
  779. static void dump_varargs_debug_event( const char *prefix, data_size_t size )
  780. {
  781. debug_event_t event;
  782. unsigned int i;
  783. if (!size)
  784. {
  785. fprintf( stderr, "%s{}", prefix );
  786. return;
  787. }
  788. size = min( size, sizeof(event) );
  789. memset( &event, 0, sizeof(event) );
  790. memcpy( &event, cur_data, size );
  791. switch(event.code)
  792. {
  793. case DbgIdle:
  794. fprintf( stderr, "%s{idle}", prefix );
  795. break;
  796. case DbgReplyPending:
  797. fprintf( stderr, "%s{pending}", prefix );
  798. break;
  799. case DbgCreateThreadStateChange:
  800. fprintf( stderr, "%s{create_thread,thread=%04x", prefix, event.create_thread.handle );
  801. dump_uint64( ",start=", &event.create_thread.start );
  802. fputc( '}', stderr );
  803. break;
  804. case DbgCreateProcessStateChange:
  805. fprintf( stderr, "%s{create_process,file=%04x,process=%04x,thread=%04x", prefix,
  806. event.create_process.file, event.create_process.process,
  807. event.create_process.thread );
  808. dump_uint64( ",base=", &event.create_process.base );
  809. fprintf( stderr, ",offset=%d,size=%d",
  810. event.create_process.dbg_offset, event.create_process.dbg_size );
  811. dump_uint64( ",start=", &event.create_process.start );
  812. fputc( '}', stderr );
  813. break;
  814. case DbgExitThreadStateChange:
  815. fprintf( stderr, "%s{exit_thread,code=%d}", prefix, event.exit.exit_code );
  816. break;
  817. case DbgExitProcessStateChange:
  818. fprintf( stderr, "%s{exit_process,code=%d}", prefix, event.exit.exit_code );
  819. break;
  820. case DbgExceptionStateChange:
  821. case DbgBreakpointStateChange:
  822. case DbgSingleStepStateChange:
  823. fprintf( stderr, "%s{%s,first=%d,exc_code=%08x,flags=%08x", prefix,
  824. event.code == DbgBreakpointStateChange ? "breakpoint" :
  825. event.code == DbgSingleStepStateChange ? "singlestep" : "exception",
  826. event.exception.first, event.exception.exc_code, event.exception.flags );
  827. dump_uint64( ",record=", &event.exception.record );
  828. dump_uint64( ",address=", &event.exception.address );
  829. fprintf( stderr, ",params={" );
  830. event.exception.nb_params = min( event.exception.nb_params, EXCEPTION_MAXIMUM_PARAMETERS );
  831. for (i = 0; i < event.exception.nb_params; i++)
  832. {
  833. dump_uint64( "", &event.exception.params[i] );
  834. if (i < event.exception.nb_params) fputc( ',', stderr );
  835. }
  836. fprintf( stderr, "}}" );
  837. break;
  838. case DbgLoadDllStateChange:
  839. fprintf( stderr, "%s{load_dll,file=%04x", prefix, event.load_dll.handle );
  840. dump_uint64( ",base=", &event.load_dll.base );
  841. fprintf( stderr, ",offset=%d,size=%d",
  842. event.load_dll.dbg_offset, event.load_dll.dbg_size );
  843. dump_uint64( ",name=", &event.load_dll.name );
  844. fputc( '}', stderr );
  845. break;
  846. case DbgUnloadDllStateChange:
  847. fprintf( stderr, "%s{unload_dll", prefix );
  848. dump_uint64( ",base=", &event.unload_dll.base );
  849. fputc( '}', stderr );
  850. break;
  851. default:
  852. fprintf( stderr, "%s{code=??? (%d)}", prefix, event.code );
  853. break;
  854. }
  855. remove_data( size );
  856. }
  857. /* dump a unicode string contained in a buffer; helper for dump_varargs_startup_info */
  858. static data_size_t dump_inline_unicode_string( const char *prefix, data_size_t pos, data_size_t len, data_size_t total_size )
  859. {
  860. fputs( prefix, stderr );
  861. if (pos >= total_size) return pos;
  862. if (len > total_size - pos) len = total_size - pos;
  863. dump_strW( (const WCHAR *)cur_data + pos/sizeof(WCHAR), len, stderr, "\"\"" );
  864. return pos + (len / sizeof(WCHAR)) * sizeof(WCHAR);
  865. }
  866. static void dump_varargs_startup_info( const char *prefix, data_size_t size )
  867. {
  868. startup_info_t info;
  869. data_size_t pos = sizeof(info);
  870. memset( &info, 0, sizeof(info) );
  871. memcpy( &info, cur_data, min( size, sizeof(info) ));
  872. fprintf( stderr,
  873. "%s{debug_flags=%x,console_flags=%x,console=%04x,hstdin=%04x,hstdout=%04x,hstderr=%04x,"
  874. "x=%u,y=%u,xsize=%u,ysize=%u,xchars=%u,ychars=%u,attribute=%02x,flags=%x,show=%u",
  875. prefix, info.debug_flags, info.console_flags, info.console,
  876. info.hstdin, info.hstdout, info.hstderr, info.x, info.y, info.xsize, info.ysize,
  877. info.xchars, info.ychars, info.attribute, info.flags, info.show );
  878. pos = dump_inline_unicode_string( ",curdir=L\"", pos, info.curdir_len, size );
  879. pos = dump_inline_unicode_string( "\",dllpath=L\"", pos, info.dllpath_len, size );
  880. pos = dump_inline_unicode_string( "\",imagepath=L\"", pos, info.imagepath_len, size );
  881. pos = dump_inline_unicode_string( "\",cmdline=L\"", pos, info.cmdline_len, size );
  882. pos = dump_inline_unicode_string( "\",title=L\"", pos, info.title_len, size );
  883. pos = dump_inline_unicode_string( "\",desktop=L\"", pos, info.desktop_len, size );
  884. pos = dump_inline_unicode_string( "\",shellinfo=L\"", pos, info.shellinfo_len, size );
  885. pos = dump_inline_unicode_string( "\",runtime=L\"", pos, info.runtime_len, size );
  886. fprintf( stderr, "\"}" );
  887. remove_data( size );
  888. }
  889. static void dump_varargs_rectangles( const char *prefix, data_size_t size )
  890. {
  891. const rectangle_t *rect = cur_data;
  892. data_size_t len = size / sizeof(*rect);
  893. fprintf( stderr,"%s{", prefix );
  894. while (len > 0)
  895. {
  896. dump_rectangle( "", rect++ );
  897. if (--len) fputc( ',', stderr );
  898. }
  899. fputc( '}', stderr );
  900. remove_data( size );
  901. }
  902. static void dump_varargs_cursor_positions( const char *prefix, data_size_t size )
  903. {
  904. const cursor_pos_t *pos = cur_data;
  905. data_size_t len = size / sizeof(*pos);
  906. fprintf( stderr, "%s{", prefix );
  907. while (len > 0)
  908. {
  909. fprintf( stderr, "{x=%d,y=%d,time=%u", pos->x, pos->y, pos->time );
  910. dump_uint64( ",info=", &pos->info );
  911. fputc( '}', stderr );
  912. pos++;
  913. if (--len) fputc( ',', stderr );
  914. }
  915. fputc( '}', stderr );
  916. remove_data( size );
  917. }
  918. static void dump_varargs_message_data( const char *prefix, data_size_t size )
  919. {
  920. /* FIXME: dump the structured data */
  921. dump_varargs_bytes( prefix, size );
  922. }
  923. static void dump_varargs_properties( const char *prefix, data_size_t size )
  924. {
  925. const property_data_t *prop = cur_data;
  926. data_size_t len = size / sizeof(*prop);
  927. fprintf( stderr,"%s{", prefix );
  928. while (len > 0)
  929. {
  930. fprintf( stderr, "{atom=%04x,str=%d", prop->atom, prop->string );
  931. dump_uint64( ",data=", &prop->data );
  932. fputc( '}', stderr );
  933. prop++;
  934. if (--len) fputc( ',', stderr );
  935. }
  936. fputc( '}', stderr );
  937. remove_data( size );
  938. }
  939. static void dump_varargs_luid_attr( const char *prefix, data_size_t size )
  940. {
  941. const struct luid_attr *lat = cur_data;
  942. data_size_t len = size / sizeof(*lat);
  943. fprintf( stderr,"%s{", prefix );
  944. while (len > 0)
  945. {
  946. fprintf( stderr, "{luid=%08x%08x,attrs=%x}", lat->luid.high_part, lat->luid.low_part, lat->attrs );
  947. lat++;
  948. if (--len) fputc( ',', stderr );
  949. }
  950. fputc( '}', stderr );
  951. remove_data( size );
  952. }
  953. static void dump_inline_sid( const char *prefix, const struct sid *sid, data_size_t size )
  954. {
  955. DWORD i;
  956. fprintf( stderr,"%s", prefix );
  957. if (sid_valid_size( sid, size ))
  958. {
  959. fprintf( stderr, "S-%u-%u", sid->revision,
  960. ((unsigned int)sid->id_auth[2] << 24) |
  961. ((unsigned int)sid->id_auth[3] << 16) |
  962. ((unsigned int)sid->id_auth[4] << 8) |
  963. ((unsigned int)sid->id_auth[5]) );
  964. for (i = 0; i < sid->sub_count; i++) fprintf( stderr, "-%u", sid->sub_auth[i] );
  965. }
  966. else fprintf( stderr, "<invalid>" );
  967. }
  968. static void dump_varargs_sid( const char *prefix, data_size_t size )
  969. {
  970. const struct sid *sid = cur_data;
  971. if (size) dump_inline_sid( prefix, sid, size );
  972. remove_data( size );
  973. }
  974. static void dump_varargs_sids( const char *prefix, data_size_t size )
  975. {
  976. const struct sid *sid = cur_data;
  977. data_size_t len = size;
  978. fprintf( stderr,"%s{", prefix );
  979. while (len > 0)
  980. {
  981. if (!sid_valid_size( sid, len ))
  982. {
  983. fprintf( stderr, "bad len %u", len);
  984. break;
  985. }
  986. dump_inline_sid( "", sid, size );
  987. len -= sid_len( sid );
  988. sid = (const struct sid *)((const char *)sid + sid_len( sid ));
  989. if (len) fputc( ',', stderr );
  990. }
  991. fputc( '}', stderr );
  992. remove_data( size );
  993. }
  994. static void dump_inline_acl( const char *prefix, const struct acl *acl, data_size_t size )
  995. {
  996. const struct ace *ace;
  997. ULONG i;
  998. fprintf( stderr,"%s{", prefix );
  999. if (size)
  1000. {
  1001. if (size < sizeof(*acl))
  1002. {
  1003. fprintf( stderr, "<invalid acl>}" );
  1004. return;
  1005. }
  1006. size -= sizeof(*acl);
  1007. for (i = 0, ace = ace_first( acl ); i < acl->count; i++, ace = ace_next( ace ))
  1008. {
  1009. const struct sid *sid = (const struct sid *)(ace + 1);
  1010. data_size_t sid_size;
  1011. if (size < sizeof(*ace) || size < ace->size) break;
  1012. size -= ace->size;
  1013. sid_size = ace->size - sizeof(*ace);
  1014. if (i != 0) fputc( ',', stderr );
  1015. fprintf( stderr, "{type=" );
  1016. switch (ace->type)
  1017. {
  1018. case ACCESS_DENIED_ACE_TYPE: fprintf( stderr, "ACCESS_DENIED" ); break;
  1019. case ACCESS_ALLOWED_ACE_TYPE: fprintf( stderr, "ACCESS_ALLOWED" ); break;
  1020. case SYSTEM_AUDIT_ACE_TYPE: fprintf( stderr, "SYSTEM_AUDIT" ); break;
  1021. case SYSTEM_ALARM_ACE_TYPE: fprintf( stderr, "SYSTEM_ALARM" ); break;
  1022. case SYSTEM_MANDATORY_LABEL_ACE_TYPE: fprintf( stderr, "SYSTEM_MANDATORY_LABEL" ); break;
  1023. default:
  1024. fprintf( stderr, "%02x", ace->type );
  1025. sid = NULL;
  1026. break;
  1027. }
  1028. fprintf( stderr, ",flags=%x,mask=%x", ace->flags, ace->mask );
  1029. if (sid) dump_inline_sid( ",sid=", sid, sid_size );
  1030. fputc( '}', stderr );
  1031. }
  1032. }
  1033. fputc( '}', stderr );
  1034. }
  1035. static void dump_varargs_acl( const char *prefix, data_size_t size )
  1036. {
  1037. const struct acl *acl = cur_data;
  1038. dump_inline_acl( prefix, acl, size );
  1039. remove_data( size );
  1040. }
  1041. static void dump_inline_security_descriptor( const char *prefix, const struct security_descriptor *sd, data_size_t size )
  1042. {
  1043. fprintf( stderr,"%s{", prefix );
  1044. if (size >= sizeof(struct security_descriptor))
  1045. {
  1046. size_t offset = sizeof(struct security_descriptor);
  1047. fprintf( stderr, "control=%08x", sd->control );
  1048. if ((sd->owner_len > offsetof(struct sid, sub_auth[255])) || (offset + sd->owner_len > size))
  1049. return;
  1050. if (sd->owner_len)
  1051. dump_inline_sid( ",owner=", (const struct sid *)((const char *)sd + offset), sd->owner_len );
  1052. else
  1053. fprintf( stderr, ",owner=<not present>" );
  1054. offset += sd->owner_len;
  1055. if ((sd->group_len > offsetof(struct sid, sub_auth[255])) || (offset + sd->group_len > size))
  1056. return;
  1057. if (sd->group_len)
  1058. dump_inline_sid( ",group=", (const struct sid *)((const char *)sd + offset), sd->group_len );
  1059. else
  1060. fprintf( stderr, ",group=<not present>" );
  1061. offset += sd->group_len;
  1062. if ((sd->sacl_len >= MAX_ACL_LEN) || (offset + sd->sacl_len > size))
  1063. return;
  1064. dump_inline_acl( ",sacl=", (const struct acl *)((const char *)sd + offset), sd->sacl_len );
  1065. offset += sd->sacl_len;
  1066. if ((sd->dacl_len >= MAX_ACL_LEN) || (offset + sd->dacl_len > size))
  1067. return;
  1068. dump_inline_acl( ",dacl=", (const struct acl *)((const char *)sd + offset), sd->dacl_len );
  1069. offset += sd->dacl_len;
  1070. }
  1071. fputc( '}', stderr );
  1072. }
  1073. static void dump_varargs_security_descriptor( const char *prefix, data_size_t size )
  1074. {
  1075. const struct security_descriptor *sd = cur_data;
  1076. dump_inline_security_descriptor( prefix, sd, size );
  1077. remove_data( size );
  1078. }
  1079. static void dump_varargs_process_info( const char *prefix, data_size_t size )
  1080. {
  1081. data_size_t pos = 0;
  1082. unsigned int i;
  1083. fprintf( stderr,"%s{", prefix );
  1084. while (size - pos >= sizeof(struct process_info))
  1085. {
  1086. const struct process_info *process;
  1087. pos = (pos + 7) & ~7;
  1088. process = (const struct process_info *)((const char *)cur_data + pos);
  1089. if (size - pos < sizeof(*process)) break;
  1090. if (pos) fputc( ',', stderr );
  1091. dump_timeout( "{start_time=", &process->start_time );
  1092. fprintf( stderr, ",thread_count=%u,priority=%d,pid=%04x,parent_pid=%04x,session_id=%08x,handle_count=%u,unix_pid=%d,",
  1093. process->thread_count, process->priority, process->pid,
  1094. process->parent_pid, process->session_id, process->handle_count, process->unix_pid );
  1095. pos += sizeof(*process);
  1096. pos = dump_inline_unicode_string( "name=L\"", pos, process->name_len, size );
  1097. pos = (pos + 7) & ~7;
  1098. fprintf( stderr, "\",threads={" );
  1099. for (i = 0; i < process->thread_count; i++)
  1100. {
  1101. const struct thread_info *thread = (const struct thread_info *)((const char *)cur_data + pos);
  1102. if (size - pos < sizeof(*thread)) break;
  1103. if (i) fputc( ',', stderr );
  1104. dump_timeout( "{start_time=", &thread->start_time );
  1105. fprintf( stderr, ",tid=%04x,base_priority=%d,current_priority=%d,unix_tid=%d}",
  1106. thread->tid, thread->base_priority, thread->current_priority, thread->unix_tid );
  1107. pos += sizeof(*thread);
  1108. }
  1109. fprintf( stderr, "}}" );
  1110. }
  1111. fputc( '}', stderr );
  1112. remove_data( size );
  1113. }
  1114. static void dump_varargs_object_attributes( const char *prefix, data_size_t size )
  1115. {
  1116. const struct object_attributes *objattr = cur_data;
  1117. fprintf( stderr,"%s{", prefix );
  1118. if (size)
  1119. {
  1120. const WCHAR *str;
  1121. if (size < sizeof(*objattr) ||
  1122. (size - sizeof(*objattr) < objattr->sd_len) ||
  1123. (size - sizeof(*objattr) - objattr->sd_len < objattr->name_len))
  1124. {
  1125. fprintf( stderr, "***invalid***}" );
  1126. remove_data( size );
  1127. return;
  1128. }
  1129. fprintf( stderr, "rootdir=%04x,attributes=%08x", objattr->rootdir, objattr->attributes );
  1130. dump_inline_security_descriptor( ",sd=", (const struct security_descriptor *)(objattr + 1), objattr->sd_len );
  1131. str = (const WCHAR *)objattr + (sizeof(*objattr) + objattr->sd_len) / sizeof(WCHAR);
  1132. fprintf( stderr, ",name=L\"" );
  1133. dump_strW( str, objattr->name_len, stderr, "\"\"" );
  1134. fputc( '\"', stderr );
  1135. remove_data( (sizeof(*objattr) + (objattr->sd_len & ~1) + (objattr->name_len & ~1) + 3) & ~3 );
  1136. }
  1137. fputc( '}', stderr );
  1138. }
  1139. static void dump_varargs_object_type_info( const char *prefix, data_size_t size )
  1140. {
  1141. const struct object_type_info *info = cur_data;
  1142. fprintf( stderr,"%s{", prefix );
  1143. if (size)
  1144. {
  1145. if (size < sizeof(*info) || (size - sizeof(*info) < info->name_len))
  1146. {
  1147. fprintf( stderr, "***invalid***}" );
  1148. remove_data( size );
  1149. return;
  1150. }
  1151. fprintf( stderr, "index=%u,obj_count=%u,handle_count=%u,obj_max=%u,handle_max=%u,valid=%08x",
  1152. info->index,info->obj_count, info->handle_count, info->obj_max, info->handle_max,
  1153. info->valid_access );
  1154. dump_generic_map( ",access=", &info->mapping );
  1155. fprintf( stderr, ",name=L\"" );
  1156. dump_strW( (const WCHAR *)(info + 1), info->name_len, stderr, "\"\"" );
  1157. fputc( '\"', stderr );
  1158. remove_data( min( size, sizeof(*info) + ((info->name_len + 2) & ~3 )));
  1159. }
  1160. fputc( '}', stderr );
  1161. }
  1162. static void dump_varargs_object_types_info( const char *prefix, data_size_t size )
  1163. {
  1164. fprintf( stderr,"%s{", prefix );
  1165. while (cur_size) dump_varargs_object_type_info( ",", cur_size );
  1166. fputc( '}', stderr );
  1167. }
  1168. static void dump_varargs_filesystem_event( const char *prefix, data_size_t size )
  1169. {
  1170. static const char * const actions[] = {
  1171. NULL,
  1172. "ADDED",
  1173. "REMOVED",
  1174. "MODIFIED",
  1175. "RENAMED_OLD_NAME",
  1176. "RENAMED_NEW_NAME",
  1177. "ADDED_STREAM",
  1178. "REMOVED_STREAM",
  1179. "MODIFIED_STREAM"
  1180. };
  1181. fprintf( stderr,"%s{", prefix );
  1182. while (size)
  1183. {
  1184. const struct filesystem_event *event = cur_data;
  1185. data_size_t len = (offsetof( struct filesystem_event, name[event->len] ) + sizeof(int)-1)
  1186. / sizeof(int) * sizeof(int);
  1187. if (size < len) break;
  1188. if (event->action < ARRAY_SIZE( actions ) && actions[event->action])
  1189. fprintf( stderr, "{action=%s", actions[event->action] );
  1190. else
  1191. fprintf( stderr, "{action=%u", event->action );
  1192. fprintf( stderr, ",name=\"%.*s\"}", event->len, event->name );
  1193. size -= len;
  1194. remove_data( len );
  1195. if (size)fputc( ',', stderr );
  1196. }
  1197. fputc( '}', stderr );
  1198. }
  1199. static void dump_varargs_pe_image_info( const char *prefix, data_size_t size )
  1200. {
  1201. pe_image_info_t info;
  1202. if (!size)
  1203. {
  1204. fprintf( stderr, "%s{}", prefix );
  1205. return;
  1206. }
  1207. memset( &info, 0, sizeof(info) );
  1208. memcpy( &info, cur_data, min( size, sizeof(info) ));
  1209. fprintf( stderr, "%s{", prefix );
  1210. dump_uint64( "base=", &info.base );
  1211. dump_uint64( ",stack_size=", &info.stack_size );
  1212. dump_uint64( ",stack_commit=", &info.stack_commit );
  1213. fprintf( stderr, ",entry_point=%08x,map_size=%08x,zerobits=%08x,subsystem=%08x,subsystem_minor=%04x,subsystem_major=%04x"
  1214. ",osversion_major=%04x,osversion_minor=%04x,image_charact=%04x,dll_charact=%04x,machine=%04x"
  1215. ",contains_code=%u,image_flags=%02x"
  1216. ",loader_flags=%08x,header_size=%08x,file_size=%08x,checksum=%08x}",
  1217. info.entry_point, info.map_size, info.zerobits, info.subsystem, info.subsystem_minor,
  1218. info.subsystem_major, info.osversion_major, info.osversion_minor, info.image_charact,
  1219. info.dll_charact, info.machine, info.contains_code, info.image_flags, info.loader_flags,
  1220. info.header_size, info.file_size, info.checksum );
  1221. remove_data( min( size, sizeof(info) ));
  1222. }
  1223. static void dump_varargs_rawinput_devices(const char *prefix, data_size_t size )
  1224. {
  1225. const struct rawinput_device *device;
  1226. fprintf( stderr, "%s{", prefix );
  1227. while (size >= sizeof(*device))
  1228. {
  1229. device = cur_data;
  1230. fprintf( stderr, "{usage_page=%04x,usage=%04x,flags=%08x,target=%08x}",
  1231. device->usage_page, device->usage, device->flags, device->target );
  1232. size -= sizeof(*device);
  1233. remove_data( sizeof(*device) );
  1234. if (size) fputc( ',', stderr );
  1235. }
  1236. fputc( '}', stderr );
  1237. }
  1238. static void dump_varargs_handle_infos( const char *prefix, data_size_t size )
  1239. {
  1240. const struct handle_info *handle;
  1241. fprintf( stderr, "%s{", prefix );
  1242. while (size >= sizeof(*handle))
  1243. {
  1244. handle = cur_data;
  1245. fprintf( stderr, "{owner=%04x,handle=%04x,access=%08x,attributes=%08x,type=%u}",
  1246. handle->owner, handle->handle, handle->access, handle->attributes, handle->type );
  1247. size -= sizeof(*handle);
  1248. remove_data( sizeof(*handle) );
  1249. if (size) fputc( ',', stderr );
  1250. }
  1251. fputc( '}', stderr );
  1252. }
  1253. static void dump_varargs_directory_entries( const char *prefix, data_size_t size )
  1254. {
  1255. fprintf( stderr, "%s{", prefix );
  1256. while (size)
  1257. {
  1258. const struct directory_entry *entry = cur_data;
  1259. data_size_t entry_size;
  1260. const char *next;
  1261. if (size < sizeof(*entry) ||
  1262. (size - sizeof(*entry) < entry->name_len) ||
  1263. (size - sizeof(*entry) - entry->name_len < entry->type_len))
  1264. {
  1265. fprintf( stderr, "***invalid***}" );
  1266. remove_data( size );
  1267. return;
  1268. }
  1269. next = (const char *)(entry + 1);
  1270. fprintf( stderr, "{name=L\"" );
  1271. dump_strW( (const WCHAR *)next, entry->name_len, stderr, "\"\"" );
  1272. next += entry->name_len;
  1273. fprintf( stderr, "\",type=L\"" );
  1274. dump_strW( (const WCHAR *)next, entry->type_len, stderr, "\"\"" );
  1275. fprintf( stderr, "\"}" );
  1276. entry_size = min( size, (sizeof(*entry) + entry->name_len + entry->type_len + 3) & ~3 );
  1277. size -= entry_size;
  1278. remove_data( entry_size );
  1279. if (size) fputc( ',', stderr );
  1280. }
  1281. fputc( '}', stderr );
  1282. }
  1283. typedef void (*dump_func)( const void *req );
  1284. /* Everything below this line is generated automatically by tools/make_requests */
  1285. /* ### make_requests begin ### */
  1286. static void dump_new_process_request( const struct new_process_request *req )
  1287. {
  1288. fprintf( stderr, " token=%04x", req->token );
  1289. fprintf( stderr, ", debug=%04x", req->debug );
  1290. fprintf( stderr, ", parent_process=%04x", req->parent_process );
  1291. fprintf( stderr, ", flags=%08x", req->flags );
  1292. fprintf( stderr, ", socket_fd=%d", req->socket_fd );
  1293. fprintf( stderr, ", access=%08x", req->access );
  1294. fprintf( stderr, ", machine=%04x", req->machine );
  1295. fprintf( stderr, ", info_size=%u", req->info_size );
  1296. fprintf( stderr, ", handles_size=%u", req->handles_size );
  1297. fprintf( stderr, ", jobs_size=%u", req->jobs_size );
  1298. dump_varargs_object_attributes( ", objattr=", cur_size );
  1299. dump_varargs_uints( ", handles=", min(cur_size,req->handles_size) );
  1300. dump_varargs_uints( ", jobs=", min(cur_size,req->jobs_size) );
  1301. dump_varargs_startup_info( ", info=", min(cur_size,req->info_size) );
  1302. dump_varargs_unicode_str( ", env=", cur_size );
  1303. }
  1304. static void dump_new_process_reply( const struct new_process_reply *req )
  1305. {
  1306. fprintf( stderr, " info=%04x", req->info );
  1307. fprintf( stderr, ", pid=%04x", req->pid );
  1308. fprintf( stderr, ", handle=%04x", req->handle );
  1309. }
  1310. static void dump_get_new_process_info_request( const struct get_new_process_info_request *req )
  1311. {
  1312. fprintf( stderr, " info=%04x", req->info );
  1313. }
  1314. static void dump_get_new_process_info_reply( const struct get_new_process_info_reply *req )
  1315. {
  1316. fprintf( stderr, " success=%d", req->success );
  1317. fprintf( stderr, ", exit_code=%d", req->exit_code );
  1318. }
  1319. static void dump_new_thread_request( const struct new_thread_request *req )
  1320. {
  1321. fprintf( stderr, " process=%04x", req->process );
  1322. fprintf( stderr, ", access=%08x", req->access );
  1323. fprintf( stderr, ", flags=%08x", req->flags );
  1324. fprintf( stderr, ", request_fd=%d", req->request_fd );
  1325. dump_varargs_object_attributes( ", objattr=", cur_size );
  1326. }
  1327. static void dump_new_thread_reply( const struct new_thread_reply *req )
  1328. {
  1329. fprintf( stderr, " tid=%04x", req->tid );
  1330. fprintf( stderr, ", handle=%04x", req->handle );
  1331. }
  1332. static void dump_get_startup_info_request( const struct get_startup_info_request *req )
  1333. {
  1334. }
  1335. static void dump_get_startup_info_reply( const struct get_startup_info_reply *req )
  1336. {
  1337. fprintf( stderr, " info_size=%u", req->info_size );
  1338. dump_varargs_startup_info( ", info=", min(cur_size,req->info_size) );
  1339. dump_varargs_unicode_str( ", env=", cur_size );
  1340. }
  1341. static void dump_init_process_done_request( const struct init_process_done_request *req )
  1342. {
  1343. dump_uint64( " teb=", &req->teb );
  1344. dump_uint64( ", peb=", &req->peb );
  1345. dump_uint64( ", ldt_copy=", &req->ldt_copy );
  1346. }
  1347. static void dump_init_process_done_reply( const struct init_process_done_reply *req )
  1348. {
  1349. dump_uint64( " entry=", &req->entry );
  1350. fprintf( stderr, ", suspend=%d", req->suspend );
  1351. }
  1352. static void dump_init_first_thread_request( const struct init_first_thread_request *req )
  1353. {
  1354. fprintf( stderr, " unix_pid=%d", req->unix_pid );
  1355. fprintf( stderr, ", unix_tid=%d", req->unix_tid );
  1356. fprintf( stderr, ", debug_level=%d", req->debug_level );
  1357. fprintf( stderr, ", reply_fd=%d", req->reply_fd );
  1358. fprintf( stderr, ", wait_fd=%d", req->wait_fd );
  1359. }
  1360. static void dump_init_first_thread_reply( const struct init_first_thread_reply *req )
  1361. {
  1362. fprintf( stderr, " pid=%04x", req->pid );
  1363. fprintf( stderr, ", tid=%04x", req->tid );
  1364. dump_timeout( ", server_start=", &req->server_start );
  1365. fprintf( stderr, ", session_id=%08x", req->session_id );
  1366. fprintf( stderr, ", info_size=%u", req->info_size );
  1367. dump_varargs_ushorts( ", machines=", cur_size );
  1368. }
  1369. static void dump_init_thread_request( const struct init_thread_request *req )
  1370. {
  1371. fprintf( stderr, " unix_tid=%d", req->unix_tid );
  1372. fprintf( stderr, ", reply_fd=%d", req->reply_fd );
  1373. fprintf( stderr, ", wait_fd=%d", req->wait_fd );
  1374. dump_uint64( ", teb=", &req->teb );
  1375. dump_uint64( ", entry=", &req->entry );
  1376. }
  1377. static void dump_init_thread_reply( const struct init_thread_reply *req )
  1378. {
  1379. fprintf( stderr, " suspend=%d", req->suspend );
  1380. }
  1381. static void dump_terminate_process_request( const struct terminate_process_request *req )
  1382. {
  1383. fprintf( stderr, " handle=%04x", req->handle );
  1384. fprintf( stderr, ", exit_code=%d", req->exit_code );
  1385. }
  1386. static void dump_terminate_process_reply( const struct terminate_process_reply *req )
  1387. {
  1388. fprintf( stderr, " self=%d", req->self );
  1389. }
  1390. static void dump_terminate_thread_request( const struct terminate_thread_request *req )
  1391. {
  1392. fprintf( stderr, " handle=%04x", req->handle );
  1393. fprintf( stderr, ", exit_code=%d", req->exit_code );
  1394. }
  1395. static void dump_terminate_thread_reply( const struct terminate_thread_reply *req )
  1396. {
  1397. fprintf( stderr, " self=%d", req->self );
  1398. }
  1399. static void dump_get_process_info_request( const struct get_process_info_request *req )
  1400. {
  1401. fprintf( stderr, " handle=%04x", req->handle );
  1402. }
  1403. static void dump_get_process_info_reply( const struct get_process_info_reply *req )
  1404. {
  1405. fprintf( stderr, " pid=%04x", req->pid );
  1406. fprintf( stderr, ", ppid=%04x", req->ppid );
  1407. dump_uint64( ", affinity=", &req->affinity );
  1408. dump_uint64( ", peb=", &req->peb );
  1409. dump_timeout( ", start_time=", &req->start_time );
  1410. dump_timeout( ", end_time=", &req->end_time );
  1411. fprintf( stderr, ", session_id=%08x", req->session_id );
  1412. fprintf( stderr, ", exit_code=%d", req->exit_code );
  1413. fprintf( stderr, ", priority=%d", req->priority );
  1414. fprintf( stderr, ", machine=%04x", req->machine );
  1415. dump_varargs_pe_image_info( ", image=", cur_size );
  1416. }
  1417. static void dump_get_process_debug_info_request( const struct get_process_debug_info_request *req )
  1418. {
  1419. fprintf( stderr, " handle=%04x", req->handle );
  1420. }
  1421. static void dump_get_process_debug_info_reply( const struct get_process_debug_info_reply *req )
  1422. {
  1423. fprintf( stderr, " debug=%04x", req->debug );
  1424. fprintf( stderr, ", debug_children=%d", req->debug_children );
  1425. dump_varargs_pe_image_info( ", image=", cur_size );
  1426. }
  1427. static void dump_get_process_image_name_request( const struct get_process_image_name_request *req )
  1428. {
  1429. fprintf( stderr, " handle=%04x", req->handle );
  1430. fprintf( stderr, ", win32=%d", req->win32 );
  1431. }
  1432. static void dump_get_process_image_name_reply( const struct get_process_image_name_reply *req )
  1433. {
  1434. fprintf( stderr, " len=%u", req->len );
  1435. dump_varargs_unicode_str( ", name=", cur_size );
  1436. }
  1437. static void dump_get_process_vm_counters_request( const struct get_process_vm_counters_request *req )
  1438. {
  1439. fprintf( stderr, " handle=%04x", req->handle );
  1440. }
  1441. static void dump_get_process_vm_counters_reply( const struct get_process_vm_counters_reply *req )
  1442. {
  1443. dump_uint64( " peak_virtual_size=", &req->peak_virtual_size );
  1444. dump_uint64( ", virtual_size=", &req->virtual_size );
  1445. dump_uint64( ", peak_working_set_size=", &req->peak_working_set_size );
  1446. dump_uint64( ", working_set_size=", &req->working_set_size );
  1447. dump_uint64( ", pagefile_usage=", &req->pagefile_usage );
  1448. dump_uint64( ", peak_pagefile_usage=", &req->peak_pagefile_usage );
  1449. }
  1450. static void dump_set_process_info_request( const struct set_process_info_request *req )
  1451. {
  1452. fprintf( stderr, " handle=%04x", req->handle );
  1453. fprintf( stderr, ", mask=%d", req->mask );
  1454. fprintf( stderr, ", priority=%d", req->priority );
  1455. dump_uint64( ", affinity=", &req->affinity );
  1456. }
  1457. static void dump_get_thread_info_request( const struct get_thread_info_request *req )
  1458. {
  1459. fprintf( stderr, " handle=%04x", req->handle );
  1460. fprintf( stderr, ", access=%08x", req->access );
  1461. }
  1462. static void dump_get_thread_info_reply( const struct get_thread_info_reply *req )
  1463. {
  1464. fprintf( stderr, " pid=%04x", req->pid );
  1465. fprintf( stderr, ", tid=%04x", req->tid );
  1466. dump_uint64( ", teb=", &req->teb );
  1467. dump_uint64( ", entry_point=", &req->entry_point );
  1468. dump_uint64( ", affinity=", &req->affinity );
  1469. fprintf( stderr, ", exit_code=%d", req->exit_code );
  1470. fprintf( stderr, ", priority=%d", req->priority );
  1471. fprintf( stderr, ", last=%d", req->last );
  1472. fprintf( stderr, ", suspend_count=%d", req->suspend_count );
  1473. fprintf( stderr, ", dbg_hidden=%d", req->dbg_hidden );
  1474. fprintf( stderr, ", desc_len=%u", req->desc_len );
  1475. dump_varargs_unicode_str( ", desc=", cur_size );
  1476. }
  1477. static void dump_get_thread_times_request( const struct get_thread_times_request *req )
  1478. {
  1479. fprintf( stderr, " handle=%04x", req->handle );
  1480. }
  1481. static void dump_get_thread_times_reply( const struct get_thread_times_reply *req )
  1482. {
  1483. dump_timeout( " creation_time=", &req->creation_time );
  1484. dump_timeout( ", exit_time=", &req->exit_time );
  1485. fprintf( stderr, ", unix_pid=%d", req->unix_pid );
  1486. fprintf( stderr, ", unix_tid=%d", req->unix_tid );
  1487. }
  1488. static void dump_set_thread_info_request( const struct set_thread_info_request *req )
  1489. {
  1490. fprintf( stderr, " handle=%04x", req->handle );
  1491. fprintf( stderr, ", mask=%d", req->mask );
  1492. fprintf( stderr, ", priority=%d", req->priority );
  1493. dump_uint64( ", affinity=", &req->affinity );
  1494. dump_uint64( ", entry_point=", &req->entry_point );
  1495. fprintf( stderr, ", token=%04x", req->token );
  1496. dump_varargs_unicode_str( ", desc=", cur_size );
  1497. }
  1498. static void dump_suspend_thread_request( const struct suspend_thread_request *req )
  1499. {
  1500. fprintf( stderr, " handle=%04x", req->handle );
  1501. }
  1502. static void dump_suspend_thread_reply( const struct suspend_thread_reply *req )
  1503. {
  1504. fprintf( stderr, " count=%d", req->count );
  1505. }
  1506. static void dump_resume_thread_request( const struct resume_thread_request *req )
  1507. {
  1508. fprintf( stderr, " handle=%04x", req->handle );
  1509. }
  1510. static void dump_resume_thread_reply( const struct resume_thread_reply *req )
  1511. {
  1512. fprintf( stderr, " count=%d", req->count );
  1513. }
  1514. static void dump_queue_apc_request( const struct queue_apc_request *req )
  1515. {
  1516. fprintf( stderr, " handle=%04x", req->handle );
  1517. dump_apc_call( ", call=", &req->call );
  1518. }
  1519. static void dump_queue_apc_reply( const struct queue_apc_reply *req )
  1520. {
  1521. fprintf( stderr, " handle=%04x", req->handle );
  1522. fprintf( stderr, ", self=%d", req->self );
  1523. }
  1524. static void dump_get_apc_result_request( const struct get_apc_result_request *req )
  1525. {
  1526. fprintf( stderr, " handle=%04x", req->handle );
  1527. }
  1528. static void dump_get_apc_result_reply( const struct get_apc_result_reply *req )
  1529. {
  1530. dump_apc_result( " result=", &req->result );
  1531. }
  1532. static void dump_close_handle_request( const struct close_handle_request *req )
  1533. {
  1534. fprintf( stderr, " handle=%04x", req->handle );
  1535. }
  1536. static void dump_set_handle_info_request( const struct set_handle_info_request *req )
  1537. {
  1538. fprintf( stderr, " handle=%04x", req->handle );
  1539. fprintf( stderr, ", flags=%d", req->flags );
  1540. fprintf( stderr, ", mask=%d", req->mask );
  1541. }
  1542. static void dump_set_handle_info_reply( const struct set_handle_info_reply *req )
  1543. {
  1544. fprintf( stderr, " old_flags=%d", req->old_flags );
  1545. }
  1546. static void dump_dup_handle_request( const struct dup_handle_request *req )
  1547. {
  1548. fprintf( stderr, " src_process=%04x", req->src_process );
  1549. fprintf( stderr, ", src_handle=%04x", req->src_handle );
  1550. fprintf( stderr, ", dst_process=%04x", req->dst_process );
  1551. fprintf( stderr, ", access=%08x", req->access );
  1552. fprintf( stderr, ", attributes=%08x", req->attributes );
  1553. fprintf( stderr, ", options=%08x", req->options );
  1554. }
  1555. static void dump_dup_handle_reply( const struct dup_handle_reply *req )
  1556. {
  1557. fprintf( stderr, " handle=%04x", req->handle );
  1558. }
  1559. static void dump_compare_objects_request( const struct compare_objects_request *req )
  1560. {
  1561. fprintf( stderr, " first=%04x", req->first );
  1562. fprintf( stderr, ", second=%04x", req->second );
  1563. }
  1564. static void dump_make_temporary_request( const struct make_temporary_request *req )
  1565. {
  1566. fprintf( stderr, " handle=%04x", req->handle );
  1567. }
  1568. static void dump_open_process_request( const struct open_process_request *req )
  1569. {
  1570. fprintf( stderr, " pid=%04x", req->pid );
  1571. fprintf( stderr, ", access=%08x", req->access );
  1572. fprintf( stderr, ", attributes=%08x", req->attributes );
  1573. }
  1574. static void dump_open_process_reply( const struct open_process_reply *req )
  1575. {
  1576. fprintf( stderr, " handle=%04x", req->handle );
  1577. }
  1578. static void dump_open_thread_request( const struct open_thread_request *req )
  1579. {
  1580. fprintf( stderr, " tid=%04x", req->tid );
  1581. fprintf( stderr, ", access=%08x", req->access );
  1582. fprintf( stderr, ", attributes=%08x", req->attributes );
  1583. }
  1584. static void dump_open_thread_reply( const struct open_thread_reply *req )
  1585. {
  1586. fprintf( stderr, " handle=%04x", req->handle );
  1587. }
  1588. static void dump_select_request( const struct select_request *req )
  1589. {
  1590. fprintf( stderr, " flags=%d", req->flags );
  1591. dump_uint64( ", cookie=", &req->cookie );
  1592. dump_abstime( ", timeout=", &req->timeout );
  1593. fprintf( stderr, ", size=%u", req->size );
  1594. fprintf( stderr, ", prev_apc=%04x", req->prev_apc );
  1595. dump_varargs_apc_result( ", result=", cur_size );
  1596. dump_varargs_select_op( ", data=", min(cur_size,req->size) );
  1597. dump_varargs_contexts( ", contexts=", cur_size );
  1598. }
  1599. static void dump_select_reply( const struct select_reply *req )
  1600. {
  1601. dump_apc_call( " call=", &req->call );
  1602. fprintf( stderr, ", apc_handle=%04x", req->apc_handle );
  1603. fprintf( stderr, ", signaled=%d", req->signaled );
  1604. dump_varargs_contexts( ", contexts=", cur_size );
  1605. }
  1606. static void dump_create_event_request( const struct create_event_request *req )
  1607. {
  1608. fprintf( stderr, " access=%08x", req->access );
  1609. fprintf( stderr, ", manual_reset=%d", req->manual_reset );
  1610. fprintf( stderr, ", initial_state=%d", req->initial_state );
  1611. dump_varargs_object_attributes( ", objattr=", cur_size );
  1612. }
  1613. static void dump_create_event_reply( const struct create_event_reply *req )
  1614. {
  1615. fprintf( stderr, " handle=%04x", req->handle );
  1616. }
  1617. static void dump_event_op_request( const struct event_op_request *req )
  1618. {
  1619. fprintf( stderr, " handle=%04x", req->handle );
  1620. fprintf( stderr, ", op=%d", req->op );
  1621. }
  1622. static void dump_event_op_reply( const struct event_op_reply *req )
  1623. {
  1624. fprintf( stderr, " state=%d", req->state );
  1625. }
  1626. static void dump_query_event_request( const struct query_event_request *req )
  1627. {
  1628. fprintf( stderr, " handle=%04x", req->handle );
  1629. }
  1630. static void dump_query_event_reply( const struct query_event_reply *req )
  1631. {
  1632. fprintf( stderr, " manual_reset=%d", req->manual_reset );
  1633. fprintf( stderr, ", state=%d", req->state );
  1634. }
  1635. static void dump_open_event_request( const struct open_event_request *req )
  1636. {
  1637. fprintf( stderr, " access=%08x", req->access );
  1638. fprintf( stderr, ", attributes=%08x", req->attributes );
  1639. fprintf( stderr, ", rootdir=%04x", req->rootdir );
  1640. dump_varargs_unicode_str( ", name=", cur_size );
  1641. }
  1642. static void dump_open_event_reply( const struct open_event_reply *req )
  1643. {
  1644. fprintf( stderr, " handle=%04x", req->handle );
  1645. }
  1646. static void dump_create_keyed_event_request( const struct create_keyed_event_request *req )
  1647. {
  1648. fprintf( stderr, " access=%08x", req->access );
  1649. dump_varargs_object_attributes( ", objattr=", cur_size );
  1650. }
  1651. static void dump_create_keyed_event_reply( const struct create_keyed_event_reply *req )
  1652. {
  1653. fprintf( stderr, " handle=%04x", req->handle );
  1654. }
  1655. static void dump_open_keyed_event_request( const struct open_keyed_event_request *req )
  1656. {
  1657. fprintf( stderr, " access=%08x", req->access );
  1658. fprintf( stderr, ", attributes=%08x", req->attributes );
  1659. fprintf( stderr, ", rootdir=%04x", req->rootdir );
  1660. dump_varargs_unicode_str( ", name=", cur_size );
  1661. }
  1662. static void dump_open_keyed_event_reply( const struct open_keyed_event_reply *req )
  1663. {
  1664. fprintf( stderr, " handle=%04x", req->handle );
  1665. }
  1666. static void dump_create_mutex_request( const struct create_mutex_request *req )
  1667. {
  1668. fprintf( stderr, " access=%08x", req->access );
  1669. fprintf( stderr, ", owned=%d", req->owned );
  1670. dump_varargs_object_attributes( ", objattr=", cur_size );
  1671. }
  1672. static void dump_create_mutex_reply( const struct create_mutex_reply *req )
  1673. {
  1674. fprintf( stderr, " handle=%04x", req->handle );
  1675. }
  1676. static void dump_release_mutex_request( const struct release_mutex_request *req )
  1677. {
  1678. fprintf( stderr, " handle=%04x", req->handle );
  1679. }
  1680. static void dump_release_mutex_reply( const struct release_mutex_reply *req )
  1681. {
  1682. fprintf( stderr, " prev_count=%08x", req->prev_count );
  1683. }
  1684. static void dump_open_mutex_request( const struct open_mutex_request *req )
  1685. {
  1686. fprintf( stderr, " access=%08x", req->access );
  1687. fprintf( stderr, ", attributes=%08x", req->attributes );
  1688. fprintf( stderr, ", rootdir=%04x", req->rootdir );
  1689. dump_varargs_unicode_str( ", name=", cur_size );
  1690. }
  1691. static void dump_open_mutex_reply( const struct open_mutex_reply *req )
  1692. {
  1693. fprintf( stderr, " handle=%04x", req->handle );
  1694. }
  1695. static void dump_query_mutex_request( const struct query_mutex_request *req )
  1696. {
  1697. fprintf( stderr, " handle=%04x", req->handle );
  1698. }
  1699. static void dump_query_mutex_reply( const struct query_mutex_reply *req )
  1700. {
  1701. fprintf( stderr, " count=%08x", req->count );
  1702. fprintf( stderr, ", owned=%d", req->owned );
  1703. fprintf( stderr, ", abandoned=%d", req->abandoned );
  1704. }
  1705. static void dump_create_semaphore_request( const struct create_semaphore_request *req )
  1706. {
  1707. fprintf( stderr, " access=%08x", req->access );
  1708. fprintf( stderr, ", initial=%08x", req->initial );
  1709. fprintf( stderr, ", max=%08x", req->max );
  1710. dump_varargs_object_attributes( ", objattr=", cur_size );
  1711. }
  1712. static void dump_create_semaphore_reply( const struct create_semaphore_reply *req )
  1713. {
  1714. fprintf( stderr, " handle=%04x", req->handle );
  1715. }
  1716. static void dump_release_semaphore_request( const struct release_semaphore_request *req )
  1717. {
  1718. fprintf( stderr, " handle=%04x", req->handle );
  1719. fprintf( stderr, ", count=%08x", req->count );
  1720. }
  1721. static void dump_release_semaphore_reply( const struct release_semaphore_reply *req )
  1722. {
  1723. fprintf( stderr, " prev_count=%08x", req->prev_count );
  1724. }
  1725. static void dump_query_semaphore_request( const struct query_semaphore_request *req )
  1726. {
  1727. fprintf( stderr, " handle=%04x", req->handle );
  1728. }
  1729. static void dump_query_semaphore_reply( const struct query_semaphore_reply *req )
  1730. {
  1731. fprintf( stderr, " current=%08x", req->current );
  1732. fprintf( stderr, ", max=%08x", req->max );
  1733. }
  1734. static void dump_open_semaphore_request( const struct open_semaphore_request *req )
  1735. {
  1736. fprintf( stderr, " access=%08x", req->access );
  1737. fprintf( stderr, ", attributes=%08x", req->attributes );
  1738. fprintf( stderr, ", rootdir=%04x", req->rootdir );
  1739. dump_varargs_unicode_str( ", name=", cur_size );
  1740. }
  1741. static void dump_open_semaphore_reply( const struct open_semaphore_reply *req )
  1742. {
  1743. fprintf( stderr, " handle=%04x", req->handle );
  1744. }
  1745. static void dump_create_file_request( const struct create_file_request *req )
  1746. {
  1747. fprintf( stderr, " access=%08x", req->access );
  1748. fprintf( stderr, ", sharing=%08x", req->sharing );
  1749. fprintf( stderr, ", create=%d", req->create );
  1750. fprintf( stderr, ", options=%08x", req->options );
  1751. fprintf( stderr, ", attrs=%08x", req->attrs );
  1752. dump_varargs_object_attributes( ", objattr=", cur_size );
  1753. dump_varargs_string( ", filename=", cur_size );
  1754. }
  1755. static void dump_create_file_reply( const struct create_file_reply *req )
  1756. {
  1757. fprintf( stderr, " handle=%04x", req->handle );
  1758. }
  1759. static void dump_open_file_object_request( const struct open_file_object_request *req )
  1760. {
  1761. fprintf( stderr, " access=%08x", req->access );
  1762. fprintf( stderr, ", attributes=%08x", req->attributes );
  1763. fprintf( stderr, ", rootdir=%04x", req->rootdir );
  1764. fprintf( stderr, ", sharing=%08x", req->sharing );
  1765. fprintf( stderr, ", options=%08x", req->options );
  1766. dump_varargs_unicode_str( ", filename=", cur_size );
  1767. }
  1768. static void dump_open_file_object_reply( const struct open_file_object_reply *req )
  1769. {
  1770. fprintf( stderr, " handle=%04x", req->handle );
  1771. }
  1772. static void dump_alloc_file_handle_request( const struct alloc_file_handle_request *req )
  1773. {
  1774. fprintf( stderr, " access=%08x", req->access );
  1775. fprintf( stderr, ", attributes=%08x", req->attributes );
  1776. fprintf( stderr, ", fd=%d", req->fd );
  1777. }
  1778. static void dump_alloc_file_handle_reply( const struct alloc_file_handle_reply *req )
  1779. {
  1780. fprintf( stderr, " handle=%04x", req->handle );
  1781. }
  1782. static void dump_get_handle_unix_name_request( const struct get_handle_unix_name_request *req )
  1783. {
  1784. fprintf( stderr, " handle=%04x", req->handle );
  1785. }
  1786. static void dump_get_handle_unix_name_reply( const struct get_handle_unix_name_reply *req )
  1787. {
  1788. fprintf( stderr, " name_len=%u", req->name_len );
  1789. dump_varargs_string( ", name=", cur_size );
  1790. }
  1791. static void dump_get_handle_fd_request( const struct get_handle_fd_request *req )
  1792. {
  1793. fprintf( stderr, " handle=%04x", req->handle );
  1794. }
  1795. static void dump_get_handle_fd_reply( const struct get_handle_fd_reply *req )
  1796. {
  1797. fprintf( stderr, " type=%d", req->type );
  1798. fprintf( stderr, ", cacheable=%d", req->cacheable );
  1799. fprintf( stderr, ", access=%08x", req->access );
  1800. fprintf( stderr, ", options=%08x", req->options );
  1801. }
  1802. static void dump_get_directory_cache_entry_request( const struct get_directory_cache_entry_request *req )
  1803. {
  1804. fprintf( stderr, " handle=%04x", req->handle );
  1805. }
  1806. static void dump_get_directory_cache_entry_reply( const struct get_directory_cache_entry_reply *req )
  1807. {
  1808. fprintf( stderr, " entry=%d", req->entry );
  1809. dump_varargs_ints( ", free=", cur_size );
  1810. }
  1811. static void dump_flush_request( const struct flush_request *req )
  1812. {
  1813. dump_async_data( " async=", &req->async );
  1814. }
  1815. static void dump_flush_reply( const struct flush_reply *req )
  1816. {
  1817. fprintf( stderr, " event=%04x", req->event );
  1818. }
  1819. static void dump_get_file_info_request( const struct get_file_info_request *req )
  1820. {
  1821. fprintf( stderr, " handle=%04x", req->handle );
  1822. fprintf( stderr, ", info_class=%08x", req->info_class );
  1823. }
  1824. static void dump_get_file_info_reply( const struct get_file_info_reply *req )
  1825. {
  1826. dump_varargs_bytes( " data=", cur_size );
  1827. }
  1828. static void dump_get_volume_info_request( const struct get_volume_info_request *req )
  1829. {
  1830. fprintf( stderr, " handle=%04x", req->handle );
  1831. dump_async_data( ", async=", &req->async );
  1832. fprintf( stderr, ", info_class=%08x", req->info_class );
  1833. }
  1834. static void dump_get_volume_info_reply( const struct get_volume_info_reply *req )
  1835. {
  1836. fprintf( stderr, " wait=%04x", req->wait );
  1837. dump_varargs_bytes( ", data=", cur_size );
  1838. }
  1839. static void dump_lock_file_request( const struct lock_file_request *req )
  1840. {
  1841. fprintf( stderr, " handle=%04x", req->handle );
  1842. dump_uint64( ", offset=", &req->offset );
  1843. dump_uint64( ", count=", &req->count );
  1844. fprintf( stderr, ", shared=%d", req->shared );
  1845. fprintf( stderr, ", wait=%d", req->wait );
  1846. }
  1847. static void dump_lock_file_reply( const struct lock_file_reply *req )
  1848. {
  1849. fprintf( stderr, " handle=%04x", req->handle );
  1850. fprintf( stderr, ", overlapped=%d", req->overlapped );
  1851. }
  1852. static void dump_unlock_file_request( const struct unlock_file_request *req )
  1853. {
  1854. fprintf( stderr, " handle=%04x", req->handle );
  1855. dump_uint64( ", offset=", &req->offset );
  1856. dump_uint64( ", count=", &req->count );
  1857. }
  1858. static void dump_recv_socket_request( const struct recv_socket_request *req )
  1859. {
  1860. fprintf( stderr, " oob=%d", req->oob );
  1861. dump_async_data( ", async=", &req->async );
  1862. fprintf( stderr, ", force_async=%d", req->force_async );
  1863. }
  1864. static void dump_recv_socket_reply( const struct recv_socket_reply *req )
  1865. {
  1866. fprintf( stderr, " wait=%04x", req->wait );
  1867. fprintf( stderr, ", options=%08x", req->options );
  1868. fprintf( stderr, ", nonblocking=%d", req->nonblocking );
  1869. }
  1870. static void dump_send_socket_request( const struct send_socket_request *req )
  1871. {
  1872. dump_async_data( " async=", &req->async );
  1873. fprintf( stderr, ", force_async=%d", req->force_async );
  1874. }
  1875. static void dump_send_socket_reply( const struct send_socket_reply *req )
  1876. {
  1877. fprintf( stderr, " wait=%04x", req->wait );
  1878. fprintf( stderr, ", options=%08x", req->options );
  1879. fprintf( stderr, ", nonblocking=%d", req->nonblocking );
  1880. }
  1881. static void dump_get_next_console_request_request( const struct get_next_console_request_request *req )
  1882. {
  1883. fprintf( stderr, " handle=%04x", req->handle );
  1884. fprintf( stderr, ", signal=%d", req->signal );
  1885. fprintf( stderr, ", read=%d", req->read );
  1886. fprintf( stderr, ", status=%08x", req->status );
  1887. dump_varargs_bytes( ", out_data=", cur_size );
  1888. }
  1889. static void dump_get_next_console_request_reply( const struct get_next_console_request_reply *req )
  1890. {
  1891. fprintf( stderr, " code=%08x", req->code );
  1892. fprintf( stderr, ", output=%08x", req->output );
  1893. fprintf( stderr, ", out_size=%u", req->out_size );
  1894. dump_varargs_bytes( ", in_data=", cur_size );
  1895. }
  1896. static void dump_read_directory_changes_request( const struct read_directory_changes_request *req )
  1897. {
  1898. fprintf( stderr, " filter=%08x", req->filter );
  1899. fprintf( stderr, ", subtree=%d", req->subtree );
  1900. fprintf( stderr, ", want_data=%d", req->want_data );
  1901. dump_async_data( ", async=", &req->async );
  1902. }
  1903. static void dump_read_change_request( const struct read_change_request *req )
  1904. {
  1905. fprintf( stderr, " handle=%04x", req->handle );
  1906. }
  1907. static void dump_read_change_reply( const struct read_change_reply *req )
  1908. {
  1909. dump_varargs_filesystem_event( " events=", cur_size );
  1910. }
  1911. static void dump_create_mapping_request( const struct create_mapping_request *req )
  1912. {
  1913. fprintf( stderr, " access=%08x", req->access );
  1914. fprintf( stderr, ", flags=%08x", req->flags );
  1915. fprintf( stderr, ", file_access=%08x", req->file_access );
  1916. dump_uint64( ", size=", &req->size );
  1917. fprintf( stderr, ", file_handle=%04x", req->file_handle );
  1918. dump_varargs_object_attributes( ", objattr=", cur_size );
  1919. }
  1920. static void dump_create_mapping_reply( const struct create_mapping_reply *req )
  1921. {
  1922. fprintf( stderr, " handle=%04x", req->handle );
  1923. }
  1924. static void dump_open_mapping_request( const struct open_mapping_request *req )
  1925. {
  1926. fprintf( stderr, " access=%08x", req->access );
  1927. fprintf( stderr, ", attributes=%08x", req->attributes );
  1928. fprintf( stderr, ", rootdir=%04x", req->rootdir );
  1929. dump_varargs_unicode_str( ", name=", cur_size );
  1930. }
  1931. static void dump_open_mapping_reply( const struct open_mapping_reply *req )
  1932. {
  1933. fprintf( stderr, " handle=%04x", req->handle );
  1934. }
  1935. static void dump_get_mapping_info_request( const struct get_mapping_info_request *req )
  1936. {
  1937. fprintf( stderr, " handle=%04x", req->handle );
  1938. fprintf( stderr, ", access=%08x", req->access );
  1939. }
  1940. static void dump_get_mapping_info_reply( const struct get_mapping_info_reply *req )
  1941. {
  1942. dump_uint64( " size=", &req->size );
  1943. fprintf( stderr, ", flags=%08x", req->flags );
  1944. fprintf( stderr, ", shared_file=%04x", req->shared_file );
  1945. fprintf( stderr, ", total=%u", req->total );
  1946. dump_varargs_pe_image_info( ", image=", cur_size );
  1947. dump_varargs_unicode_str( ", name=", cur_size );
  1948. }
  1949. static void dump_map_view_request( const struct map_view_request *req )
  1950. {
  1951. fprintf( stderr, " mapping=%04x", req->mapping );
  1952. fprintf( stderr, ", access=%08x", req->access );
  1953. dump_uint64( ", base=", &req->base );
  1954. dump_uint64( ", size=", &req->size );
  1955. dump_uint64( ", start=", &req->start );
  1956. dump_varargs_pe_image_info( ", image=", cur_size );
  1957. dump_varargs_unicode_str( ", name=", cur_size );
  1958. }
  1959. static void dump_unmap_view_request( const struct unmap_view_request *req )
  1960. {
  1961. dump_uint64( " base=", &req->base );
  1962. }
  1963. static void dump_get_mapping_committed_range_request( const struct get_mapping_committed_range_request *req )
  1964. {
  1965. dump_uint64( " base=", &req->base );
  1966. dump_uint64( ", offset=", &req->offset );
  1967. }
  1968. static void dump_get_mapping_committed_range_reply( const struct get_mapping_committed_range_reply *req )
  1969. {
  1970. dump_uint64( " size=", &req->size );
  1971. fprintf( stderr, ", committed=%d", req->committed );
  1972. }
  1973. static void dump_add_mapping_committed_range_request( const struct add_mapping_committed_range_request *req )
  1974. {
  1975. dump_uint64( " base=", &req->base );
  1976. dump_uint64( ", offset=", &req->offset );
  1977. dump_uint64( ", size=", &req->size );
  1978. }
  1979. static void dump_is_same_mapping_request( const struct is_same_mapping_request *req )
  1980. {
  1981. dump_uint64( " base1=", &req->base1 );
  1982. dump_uint64( ", base2=", &req->base2 );
  1983. }
  1984. static void dump_get_mapping_filename_request( const struct get_mapping_filename_request *req )
  1985. {
  1986. fprintf( stderr, " process=%04x", req->process );
  1987. dump_uint64( ", addr=", &req->addr );
  1988. }
  1989. static void dump_get_mapping_filename_reply( const struct get_mapping_filename_reply *req )
  1990. {
  1991. fprintf( stderr, " len=%u", req->len );
  1992. dump_varargs_unicode_str( ", filename=", cur_size );
  1993. }
  1994. static void dump_list_processes_request( const struct list_processes_request *req )
  1995. {
  1996. }
  1997. static void dump_list_processes_reply( const struct list_processes_reply *req )
  1998. {
  1999. fprintf( stderr, " info_size=%u", req->info_size );
  2000. fprintf( stderr, ", process_count=%d", req->process_count );
  2001. fprintf( stderr, ", total_thread_count=%d", req->total_thread_count );
  2002. fprintf( stderr, ", total_name_len=%u", req->total_name_len );
  2003. dump_varargs_process_info( ", data=", min(cur_size,req->info_size) );
  2004. }
  2005. static void dump_create_debug_obj_request( const struct create_debug_obj_request *req )
  2006. {
  2007. fprintf( stderr, " access=%08x", req->access );
  2008. fprintf( stderr, ", flags=%08x", req->flags );
  2009. dump_varargs_object_attributes( ", objattr=", cur_size );
  2010. }
  2011. static void dump_create_debug_obj_reply( const struct create_debug_obj_reply *req )
  2012. {
  2013. fprintf( stderr, " handle=%04x", req->handle );
  2014. }
  2015. static void dump_wait_debug_event_request( const struct wait_debug_event_request *req )
  2016. {
  2017. fprintf( stderr, " debug=%04x", req->debug );
  2018. }
  2019. static void dump_wait_debug_event_reply( const struct wait_debug_event_reply *req )
  2020. {
  2021. fprintf( stderr, " pid=%04x", req->pid );
  2022. fprintf( stderr, ", tid=%04x", req->tid );
  2023. dump_varargs_debug_event( ", event=", cur_size );
  2024. }
  2025. static void dump_queue_exception_event_request( const struct queue_exception_event_request *req )
  2026. {
  2027. fprintf( stderr, " first=%d", req->first );
  2028. fprintf( stderr, ", code=%08x", req->code );
  2029. fprintf( stderr, ", flags=%08x", req->flags );
  2030. dump_uint64( ", record=", &req->record );
  2031. dump_uint64( ", address=", &req->address );
  2032. fprintf( stderr, ", len=%u", req->len );
  2033. dump_varargs_uints64( ", params=", min(cur_size,req->len) );
  2034. }
  2035. static void dump_queue_exception_event_reply( const struct queue_exception_event_reply *req )
  2036. {
  2037. fprintf( stderr, " handle=%04x", req->handle );
  2038. }
  2039. static void dump_get_exception_status_request( const struct get_exception_status_request *req )
  2040. {
  2041. fprintf( stderr, " handle=%04x", req->handle );
  2042. }
  2043. static void dump_continue_debug_event_request( const struct continue_debug_event_request *req )
  2044. {
  2045. fprintf( stderr, " debug=%04x", req->debug );
  2046. fprintf( stderr, ", pid=%04x", req->pid );
  2047. fprintf( stderr, ", tid=%04x", req->tid );
  2048. fprintf( stderr, ", status=%08x", req->status );
  2049. }
  2050. static void dump_debug_process_request( const struct debug_process_request *req )
  2051. {
  2052. fprintf( stderr, " handle=%04x", req->handle );
  2053. fprintf( stderr, ", debug=%04x", req->debug );
  2054. fprintf( stderr, ", attach=%d", req->attach );
  2055. }
  2056. static void dump_set_debug_obj_info_request( const struct set_debug_obj_info_request *req )
  2057. {
  2058. fprintf( stderr, " debug=%04x", req->debug );
  2059. fprintf( stderr, ", flags=%08x", req->flags );
  2060. }
  2061. static void dump_read_process_memory_request( const struct read_process_memory_request *req )
  2062. {
  2063. fprintf( stderr, " handle=%04x", req->handle );
  2064. dump_uint64( ", addr=", &req->addr );
  2065. }
  2066. static void dump_read_process_memory_reply( const struct read_process_memory_reply *req )
  2067. {
  2068. dump_varargs_bytes( " data=", cur_size );
  2069. }
  2070. static void dump_write_process_memory_request( const struct write_process_memory_request *req )
  2071. {
  2072. fprintf( stderr, " handle=%04x", req->handle );
  2073. dump_uint64( ", addr=", &req->addr );
  2074. dump_varargs_bytes( ", data=", cur_size );
  2075. }
  2076. static void dump_create_key_request( const struct create_key_request *req )
  2077. {
  2078. fprintf( stderr, " access=%08x", req->access );
  2079. fprintf( stderr, ", options=%08x", req->options );
  2080. dump_varargs_object_attributes( ", objattr=", cur_size );
  2081. dump_varargs_unicode_str( ", class=", cur_size );
  2082. }
  2083. static void dump_create_key_reply( const struct create_key_reply *req )
  2084. {
  2085. fprintf( stderr, " hkey=%04x", req->hkey );
  2086. fprintf( stderr, ", created=%d", req->created );
  2087. }
  2088. static void dump_open_key_request( const struct open_key_request *req )
  2089. {
  2090. fprintf( stderr, " parent=%04x", req->parent );
  2091. fprintf( stderr, ", access=%08x", req->access );
  2092. fprintf( stderr, ", attributes=%08x", req->attributes );
  2093. dump_varargs_unicode_str( ", name=", cur_size );
  2094. }
  2095. static void dump_open_key_reply( const struct open_key_reply *req )
  2096. {
  2097. fprintf( stderr, " hkey=%04x", req->hkey );
  2098. }
  2099. static void dump_delete_key_request( const struct delete_key_request *req )
  2100. {
  2101. fprintf( stderr, " hkey=%04x", req->hkey );
  2102. }
  2103. static void dump_flush_key_request( const struct flush_key_request *req )
  2104. {
  2105. fprintf( stderr, " hkey=%04x", req->hkey );
  2106. }
  2107. static void dump_enum_key_request( const struct enum_key_request *req )
  2108. {
  2109. fprintf( stderr, " hkey=%04x", req->hkey );
  2110. fprintf( stderr, ", index=%d", req->index );
  2111. fprintf( stderr, ", info_class=%d", req->info_class );
  2112. }
  2113. static void dump_enum_key_reply( const struct enum_key_reply *req )
  2114. {
  2115. fprintf( stderr, " subkeys=%d", req->subkeys );
  2116. fprintf( stderr, ", max_subkey=%d", req->max_subkey );
  2117. fprintf( stderr, ", max_class=%d", req->max_class );
  2118. fprintf( stderr, ", values=%d", req->values );
  2119. fprintf( stderr, ", max_value=%d", req->max_value );
  2120. fprintf( stderr, ", max_data=%d", req->max_data );
  2121. dump_timeout( ", modif=", &req->modif );
  2122. fprintf( stderr, ", total=%u", req->total );
  2123. fprintf( stderr, ", namelen=%u", req->namelen );
  2124. dump_varargs_unicode_str( ", name=", min(cur_size,req->namelen) );
  2125. dump_varargs_unicode_str( ", class=", cur_size );
  2126. }
  2127. static void dump_set_key_value_request( const struct set_key_value_request *req )
  2128. {
  2129. fprintf( stderr, " hkey=%04x", req->hkey );
  2130. fprintf( stderr, ", type=%d", req->type );
  2131. fprintf( stderr, ", namelen=%u", req->namelen );
  2132. dump_varargs_unicode_str( ", name=", min(cur_size,req->namelen) );
  2133. dump_varargs_bytes( ", data=", cur_size );
  2134. }
  2135. static void dump_get_key_value_request( const struct get_key_value_request *req )
  2136. {
  2137. fprintf( stderr, " hkey=%04x", req->hkey );
  2138. dump_varargs_unicode_str( ", name=", cur_size );
  2139. }
  2140. static void dump_get_key_value_reply( const struct get_key_value_reply *req )
  2141. {
  2142. fprintf( stderr, " type=%d", req->type );
  2143. fprintf( stderr, ", total=%u", req->total );
  2144. dump_varargs_bytes( ", data=", cur_size );
  2145. }
  2146. static void dump_enum_key_value_request( const struct enum_key_value_request *req )
  2147. {
  2148. fprintf( stderr, " hkey=%04x", req->hkey );
  2149. fprintf( stderr, ", index=%d", req->index );
  2150. fprintf( stderr, ", info_class=%d", req->info_class );
  2151. }
  2152. static void dump_enum_key_value_reply( const struct enum_key_value_reply *req )
  2153. {
  2154. fprintf( stderr, " type=%d", req->type );
  2155. fprintf( stderr, ", total=%u", req->total );
  2156. fprintf( stderr, ", namelen=%u", req->namelen );
  2157. dump_varargs_unicode_str( ", name=", min(cur_size,req->namelen) );
  2158. dump_varargs_bytes( ", data=", cur_size );
  2159. }
  2160. static void dump_delete_key_value_request( const struct delete_key_value_request *req )
  2161. {
  2162. fprintf( stderr, " hkey=%04x", req->hkey );
  2163. dump_varargs_unicode_str( ", name=", cur_size );
  2164. }
  2165. static void dump_load_registry_request( const struct load_registry_request *req )
  2166. {
  2167. fprintf( stderr, " file=%04x", req->file );
  2168. dump_varargs_object_attributes( ", objattr=", cur_size );
  2169. }
  2170. static void dump_unload_registry_request( const struct unload_registry_request *req )
  2171. {
  2172. fprintf( stderr, " parent=%04x", req->parent );
  2173. fprintf( stderr, ", attributes=%08x", req->attributes );
  2174. dump_varargs_unicode_str( ", name=", cur_size );
  2175. }
  2176. static void dump_save_registry_request( const struct save_registry_request *req )
  2177. {
  2178. fprintf( stderr, " hkey=%04x", req->hkey );
  2179. fprintf( stderr, ", file=%04x", req->file );
  2180. }
  2181. static void dump_set_registry_notification_request( const struct set_registry_notification_request *req )
  2182. {
  2183. fprintf( stderr, " hkey=%04x", req->hkey );
  2184. fprintf( stderr, ", event=%04x", req->event );
  2185. fprintf( stderr, ", subtree=%d", req->subtree );
  2186. fprintf( stderr, ", filter=%08x", req->filter );
  2187. }
  2188. static void dump_create_timer_request( const struct create_timer_request *req )
  2189. {
  2190. fprintf( stderr, " access=%08x", req->access );
  2191. fprintf( stderr, ", manual=%d", req->manual );
  2192. dump_varargs_object_attributes( ", objattr=", cur_size );
  2193. }
  2194. static void dump_create_timer_reply( const struct create_timer_reply *req )
  2195. {
  2196. fprintf( stderr, " handle=%04x", req->handle );
  2197. }
  2198. static void dump_open_timer_request( const struct open_timer_request *req )
  2199. {
  2200. fprintf( stderr, " access=%08x", req->access );
  2201. fprintf( stderr, ", attributes=%08x", req->attributes );
  2202. fprintf( stderr, ", rootdir=%04x", req->rootdir );
  2203. dump_varargs_unicode_str( ", name=", cur_size );
  2204. }
  2205. static void dump_open_timer_reply( const struct open_timer_reply *req )
  2206. {
  2207. fprintf( stderr, " handle=%04x", req->handle );
  2208. }
  2209. static void dump_set_timer_request( const struct set_timer_request *req )
  2210. {
  2211. fprintf( stderr, " handle=%04x", req->handle );
  2212. dump_timeout( ", expire=", &req->expire );
  2213. dump_uint64( ", callback=", &req->callback );
  2214. dump_uint64( ", arg=", &req->arg );
  2215. fprintf( stderr, ", period=%d", req->period );
  2216. }
  2217. static void dump_set_timer_reply( const struct set_timer_reply *req )
  2218. {
  2219. fprintf( stderr, " signaled=%d", req->signaled );
  2220. }
  2221. static void dump_cancel_timer_request( const struct cancel_timer_request *req )
  2222. {
  2223. fprintf( stderr, " handle=%04x", req->handle );
  2224. }
  2225. static void dump_cancel_timer_reply( const struct cancel_timer_reply *req )
  2226. {
  2227. fprintf( stderr, " signaled=%d", req->signaled );
  2228. }
  2229. static void dump_get_timer_info_request( const struct get_timer_info_request *req )
  2230. {
  2231. fprintf( stderr, " handle=%04x", req->handle );
  2232. }
  2233. static void dump_get_timer_info_reply( const struct get_timer_info_reply *req )
  2234. {
  2235. dump_timeout( " when=", &req->when );
  2236. fprintf( stderr, ", signaled=%d", req->signaled );
  2237. }
  2238. static void dump_get_thread_context_request( const struct get_thread_context_request *req )
  2239. {
  2240. fprintf( stderr, " handle=%04x", req->handle );
  2241. fprintf( stderr, ", context=%04x", req->context );
  2242. fprintf( stderr, ", flags=%08x", req->flags );
  2243. fprintf( stderr, ", machine=%04x", req->machine );
  2244. }
  2245. static void dump_get_thread_context_reply( const struct get_thread_context_reply *req )
  2246. {
  2247. fprintf( stderr, " self=%d", req->self );
  2248. fprintf( stderr, ", handle=%04x", req->handle );
  2249. dump_varargs_contexts( ", contexts=", cur_size );
  2250. }
  2251. static void dump_set_thread_context_request( const struct set_thread_context_request *req )
  2252. {
  2253. fprintf( stderr, " handle=%04x", req->handle );
  2254. dump_varargs_contexts( ", contexts=", cur_size );
  2255. }
  2256. static void dump_set_thread_context_reply( const struct set_thread_context_reply *req )
  2257. {
  2258. fprintf( stderr, " self=%d", req->self );
  2259. }
  2260. static void dump_get_selector_entry_request( const struct get_selector_entry_request *req )
  2261. {
  2262. fprintf( stderr, " handle=%04x", req->handle );
  2263. fprintf( stderr, ", entry=%d", req->entry );
  2264. }
  2265. static void dump_get_selector_entry_reply( const struct get_selector_entry_reply *req )
  2266. {
  2267. fprintf( stderr, " base=%08x", req->base );
  2268. fprintf( stderr, ", limit=%08x", req->limit );
  2269. fprintf( stderr, ", flags=%02x", req->flags );
  2270. }
  2271. static void dump_add_atom_request( const struct add_atom_request *req )
  2272. {
  2273. dump_varargs_unicode_str( " name=", cur_size );
  2274. }
  2275. static void dump_add_atom_reply( const struct add_atom_reply *req )
  2276. {
  2277. fprintf( stderr, " atom=%04x", req->atom );
  2278. }
  2279. static void dump_delete_atom_request( const struct delete_atom_request *req )
  2280. {
  2281. fprintf( stderr, " atom=%04x", req->atom );
  2282. }
  2283. static void dump_find_atom_request( const struct find_atom_request *req )
  2284. {
  2285. dump_varargs_unicode_str( " name=", cur_size );
  2286. }
  2287. static void dump_find_atom_reply( const struct find_atom_reply *req )
  2288. {
  2289. fprintf( stderr, " atom=%04x", req->atom );
  2290. }
  2291. static void dump_get_atom_information_request( const struct get_atom_information_request *req )
  2292. {
  2293. fprintf( stderr, " atom=%04x", req->atom );
  2294. }
  2295. static void dump_get_atom_information_reply( const struct get_atom_information_reply *req )
  2296. {
  2297. fprintf( stderr, " count=%d", req->count );
  2298. fprintf( stderr, ", pinned=%d", req->pinned );
  2299. fprintf( stderr, ", total=%u", req->total );
  2300. dump_varargs_unicode_str( ", name=", cur_size );
  2301. }
  2302. static void dump_get_msg_queue_request( const struct get_msg_queue_request *req )
  2303. {
  2304. }
  2305. static void dump_get_msg_queue_reply( const struct get_msg_queue_reply *req )
  2306. {
  2307. fprintf( stderr, " handle=%04x", req->handle );
  2308. }
  2309. static void dump_set_queue_fd_request( const struct set_queue_fd_request *req )
  2310. {
  2311. fprintf( stderr, " handle=%04x", req->handle );
  2312. }
  2313. static void dump_set_queue_mask_request( const struct set_queue_mask_request *req )
  2314. {
  2315. fprintf( stderr, " wake_mask=%08x", req->wake_mask );
  2316. fprintf( stderr, ", changed_mask=%08x", req->changed_mask );
  2317. fprintf( stderr, ", skip_wait=%d", req->skip_wait );
  2318. }
  2319. static void dump_set_queue_mask_reply( const struct set_queue_mask_reply *req )
  2320. {
  2321. fprintf( stderr, " wake_bits=%08x", req->wake_bits );
  2322. fprintf( stderr, ", changed_bits=%08x", req->changed_bits );
  2323. }
  2324. static void dump_get_queue_status_request( const struct get_queue_status_request *req )
  2325. {
  2326. fprintf( stderr, " clear_bits=%08x", req->clear_bits );
  2327. }
  2328. static void dump_get_queue_status_reply( const struct get_queue_status_reply *req )
  2329. {
  2330. fprintf( stderr, " wake_bits=%08x", req->wake_bits );
  2331. fprintf( stderr, ", changed_bits=%08x", req->changed_bits );
  2332. }
  2333. static void dump_get_process_idle_event_request( const struct get_process_idle_event_request *req )
  2334. {
  2335. fprintf( stderr, " handle=%04x", req->handle );
  2336. }
  2337. static void dump_get_process_idle_event_reply( const struct get_process_idle_event_reply *req )
  2338. {
  2339. fprintf( stderr, " event=%04x", req->event );
  2340. }
  2341. static void dump_send_message_request( const struct send_message_request *req )
  2342. {
  2343. fprintf( stderr, " id=%04x", req->id );
  2344. fprintf( stderr, ", type=%d", req->type );
  2345. fprintf( stderr, ", flags=%d", req->flags );
  2346. fprintf( stderr, ", win=%08x", req->win );
  2347. fprintf( stderr, ", msg=%08x", req->msg );
  2348. dump_uint64( ", wparam=", &req->wparam );
  2349. dump_uint64( ", lparam=", &req->lparam );
  2350. dump_timeout( ", timeout=", &req->timeout );
  2351. dump_varargs_message_data( ", data=", cur_size );
  2352. }
  2353. static void dump_post_quit_message_request( const struct post_quit_message_request *req )
  2354. {
  2355. fprintf( stderr, " exit_code=%d", req->exit_code );
  2356. }
  2357. static void dump_send_hardware_message_request( const struct send_hardware_message_request *req )
  2358. {
  2359. fprintf( stderr, " win=%08x", req->win );
  2360. dump_hw_input( ", input=", &req->input );
  2361. fprintf( stderr, ", flags=%08x", req->flags );
  2362. dump_varargs_bytes( ", report=", cur_size );
  2363. }
  2364. static void dump_send_hardware_message_reply( const struct send_hardware_message_reply *req )
  2365. {
  2366. fprintf( stderr, " wait=%d", req->wait );
  2367. fprintf( stderr, ", prev_x=%d", req->prev_x );
  2368. fprintf( stderr, ", prev_y=%d", req->prev_y );
  2369. fprintf( stderr, ", new_x=%d", req->new_x );
  2370. fprintf( stderr, ", new_y=%d", req->new_y );
  2371. dump_varargs_bytes( ", keystate=", cur_size );
  2372. }
  2373. static void dump_get_message_request( const struct get_message_request *req )
  2374. {
  2375. fprintf( stderr, " flags=%08x", req->flags );
  2376. fprintf( stderr, ", get_win=%08x", req->get_win );
  2377. fprintf( stderr, ", get_first=%08x", req->get_first );
  2378. fprintf( stderr, ", get_last=%08x", req->get_last );
  2379. fprintf( stderr, ", hw_id=%08x", req->hw_id );
  2380. fprintf( stderr, ", wake_mask=%08x", req->wake_mask );
  2381. fprintf( stderr, ", changed_mask=%08x", req->changed_mask );
  2382. }
  2383. static void dump_get_message_reply( const struct get_message_reply *req )
  2384. {
  2385. fprintf( stderr, " win=%08x", req->win );
  2386. fprintf( stderr, ", msg=%08x", req->msg );
  2387. dump_uint64( ", wparam=", &req->wparam );
  2388. dump_uint64( ", lparam=", &req->lparam );
  2389. fprintf( stderr, ", type=%d", req->type );
  2390. fprintf( stderr, ", x=%d", req->x );
  2391. fprintf( stderr, ", y=%d", req->y );
  2392. fprintf( stderr, ", time=%08x", req->time );
  2393. fprintf( stderr, ", active_hooks=%08x", req->active_hooks );
  2394. fprintf( stderr, ", total=%u", req->total );
  2395. dump_varargs_message_data( ", data=", cur_size );
  2396. }
  2397. static void dump_reply_message_request( const struct reply_message_request *req )
  2398. {
  2399. fprintf( stderr, " remove=%d", req->remove );
  2400. dump_uint64( ", result=", &req->result );
  2401. dump_varargs_bytes( ", data=", cur_size );
  2402. }
  2403. static void dump_accept_hardware_message_request( const struct accept_hardware_message_request *req )
  2404. {
  2405. fprintf( stderr, " hw_id=%08x", req->hw_id );
  2406. }
  2407. static void dump_get_message_reply_request( const struct get_message_reply_request *req )
  2408. {
  2409. fprintf( stderr, " cancel=%d", req->cancel );
  2410. }
  2411. static void dump_get_message_reply_reply( const struct get_message_reply_reply *req )
  2412. {
  2413. dump_uint64( " result=", &req->result );
  2414. dump_varargs_bytes( ", data=", cur_size );
  2415. }
  2416. static void dump_set_win_timer_request( const struct set_win_timer_request *req )
  2417. {
  2418. fprintf( stderr, " win=%08x", req->win );
  2419. fprintf( stderr, ", msg=%08x", req->msg );
  2420. fprintf( stderr, ", rate=%08x", req->rate );
  2421. dump_uint64( ", id=", &req->id );
  2422. dump_uint64( ", lparam=", &req->lparam );
  2423. }
  2424. static void dump_set_win_timer_reply( const struct set_win_timer_reply *req )
  2425. {
  2426. dump_uint64( " id=", &req->id );
  2427. }
  2428. static void dump_kill_win_timer_request( const struct kill_win_timer_request *req )
  2429. {
  2430. fprintf( stderr, " win=%08x", req->win );
  2431. dump_uint64( ", id=", &req->id );
  2432. fprintf( stderr, ", msg=%08x", req->msg );
  2433. }
  2434. static void dump_is_window_hung_request( const struct is_window_hung_request *req )
  2435. {
  2436. fprintf( stderr, " win=%08x", req->win );
  2437. }
  2438. static void dump_is_window_hung_reply( const struct is_window_hung_reply *req )
  2439. {
  2440. fprintf( stderr, " is_hung=%d", req->is_hung );
  2441. }
  2442. static void dump_get_serial_info_request( const struct get_serial_info_request *req )
  2443. {
  2444. fprintf( stderr, " handle=%04x", req->handle );
  2445. fprintf( stderr, ", flags=%d", req->flags );
  2446. }
  2447. static void dump_get_serial_info_reply( const struct get_serial_info_reply *req )
  2448. {
  2449. fprintf( stderr, " eventmask=%08x", req->eventmask );
  2450. fprintf( stderr, ", cookie=%08x", req->cookie );
  2451. fprintf( stderr, ", pending_write=%08x", req->pending_write );
  2452. }
  2453. static void dump_set_serial_info_request( const struct set_serial_info_request *req )
  2454. {
  2455. fprintf( stderr, " handle=%04x", req->handle );
  2456. fprintf( stderr, ", flags=%d", req->flags );
  2457. }
  2458. static void dump_register_async_request( const struct register_async_request *req )
  2459. {
  2460. fprintf( stderr, " type=%d", req->type );
  2461. dump_async_data( ", async=", &req->async );
  2462. fprintf( stderr, ", count=%d", req->count );
  2463. }
  2464. static void dump_cancel_async_request( const struct cancel_async_request *req )
  2465. {
  2466. fprintf( stderr, " handle=%04x", req->handle );
  2467. dump_uint64( ", iosb=", &req->iosb );
  2468. fprintf( stderr, ", only_thread=%d", req->only_thread );
  2469. }
  2470. static void dump_get_async_result_request( const struct get_async_result_request *req )
  2471. {
  2472. dump_uint64( " user_arg=", &req->user_arg );
  2473. }
  2474. static void dump_get_async_result_reply( const struct get_async_result_reply *req )
  2475. {
  2476. dump_varargs_bytes( " out_data=", cur_size );
  2477. }
  2478. static void dump_set_async_direct_result_request( const struct set_async_direct_result_request *req )
  2479. {
  2480. fprintf( stderr, " handle=%04x", req->handle );
  2481. dump_uint64( ", information=", &req->information );
  2482. fprintf( stderr, ", status=%08x", req->status );
  2483. fprintf( stderr, ", mark_pending=%d", req->mark_pending );
  2484. }
  2485. static void dump_set_async_direct_result_reply( const struct set_async_direct_result_reply *req )
  2486. {
  2487. fprintf( stderr, " handle=%04x", req->handle );
  2488. }
  2489. static void dump_read_request( const struct read_request *req )
  2490. {
  2491. dump_async_data( " async=", &req->async );
  2492. dump_uint64( ", pos=", &req->pos );
  2493. }
  2494. static void dump_read_reply( const struct read_reply *req )
  2495. {
  2496. fprintf( stderr, " wait=%04x", req->wait );
  2497. fprintf( stderr, ", options=%08x", req->options );
  2498. dump_varargs_bytes( ", data=", cur_size );
  2499. }
  2500. static void dump_write_request( const struct write_request *req )
  2501. {
  2502. dump_async_data( " async=", &req->async );
  2503. dump_uint64( ", pos=", &req->pos );
  2504. dump_varargs_bytes( ", data=", cur_size );
  2505. }
  2506. static void dump_write_reply( const struct write_reply *req )
  2507. {
  2508. fprintf( stderr, " wait=%04x", req->wait );
  2509. fprintf( stderr, ", options=%08x", req->options );
  2510. fprintf( stderr, ", size=%u", req->size );
  2511. }
  2512. static void dump_ioctl_request( const struct ioctl_request *req )
  2513. {
  2514. dump_ioctl_code( " code=", &req->code );
  2515. dump_async_data( ", async=", &req->async );
  2516. dump_varargs_bytes( ", in_data=", cur_size );
  2517. }
  2518. static void dump_ioctl_reply( const struct ioctl_reply *req )
  2519. {
  2520. fprintf( stderr, " wait=%04x", req->wait );
  2521. fprintf( stderr, ", options=%08x", req->options );
  2522. dump_varargs_bytes( ", out_data=", cur_size );
  2523. }
  2524. static void dump_set_irp_result_request( const struct set_irp_result_request *req )
  2525. {
  2526. fprintf( stderr, " handle=%04x", req->handle );
  2527. fprintf( stderr, ", status=%08x", req->status );
  2528. fprintf( stderr, ", size=%u", req->size );
  2529. dump_varargs_bytes( ", data=", cur_size );
  2530. }
  2531. static void dump_create_named_pipe_request( const struct create_named_pipe_request *req )
  2532. {
  2533. fprintf( stderr, " access=%08x", req->access );
  2534. fprintf( stderr, ", options=%08x", req->options );
  2535. fprintf( stderr, ", sharing=%08x", req->sharing );
  2536. fprintf( stderr, ", maxinstances=%08x", req->maxinstances );
  2537. fprintf( stderr, ", outsize=%08x", req->outsize );
  2538. fprintf( stderr, ", insize=%08x", req->insize );
  2539. dump_timeout( ", timeout=", &req->timeout );
  2540. fprintf( stderr, ", flags=%08x", req->flags );
  2541. dump_varargs_object_attributes( ", objattr=", cur_size );
  2542. }
  2543. static void dump_create_named_pipe_reply( const struct create_named_pipe_reply *req )
  2544. {
  2545. fprintf( stderr, " handle=%04x", req->handle );
  2546. }
  2547. static void dump_set_named_pipe_info_request( const struct set_named_pipe_info_request *req )
  2548. {
  2549. fprintf( stderr, " handle=%04x", req->handle );
  2550. fprintf( stderr, ", flags=%08x", req->flags );
  2551. }
  2552. static void dump_create_window_request( const struct create_window_request *req )
  2553. {
  2554. fprintf( stderr, " parent=%08x", req->parent );
  2555. fprintf( stderr, ", owner=%08x", req->owner );
  2556. fprintf( stderr, ", atom=%04x", req->atom );
  2557. dump_uint64( ", instance=", &req->instance );
  2558. fprintf( stderr, ", dpi=%d", req->dpi );
  2559. fprintf( stderr, ", awareness=%d", req->awareness );
  2560. fprintf( stderr, ", style=%08x", req->style );
  2561. fprintf( stderr, ", ex_style=%08x", req->ex_style );
  2562. dump_varargs_unicode_str( ", class=", cur_size );
  2563. }
  2564. static void dump_create_window_reply( const struct create_window_reply *req )
  2565. {
  2566. fprintf( stderr, " handle=%08x", req->handle );
  2567. fprintf( stderr, ", parent=%08x", req->parent );
  2568. fprintf( stderr, ", owner=%08x", req->owner );
  2569. fprintf( stderr, ", extra=%d", req->extra );
  2570. dump_uint64( ", class_ptr=", &req->class_ptr );
  2571. fprintf( stderr, ", dpi=%d", req->dpi );
  2572. fprintf( stderr, ", awareness=%d", req->awareness );
  2573. }
  2574. static void dump_destroy_window_request( const struct destroy_window_request *req )
  2575. {
  2576. fprintf( stderr, " handle=%08x", req->handle );
  2577. }
  2578. static void dump_get_desktop_window_request( const struct get_desktop_window_request *req )
  2579. {
  2580. fprintf( stderr, " force=%d", req->force );
  2581. }
  2582. static void dump_get_desktop_window_reply( const struct get_desktop_window_reply *req )
  2583. {
  2584. fprintf( stderr, " top_window=%08x", req->top_window );
  2585. fprintf( stderr, ", msg_window=%08x", req->msg_window );
  2586. }
  2587. static void dump_set_window_owner_request( const struct set_window_owner_request *req )
  2588. {
  2589. fprintf( stderr, " handle=%08x", req->handle );
  2590. fprintf( stderr, ", owner=%08x", req->owner );
  2591. }
  2592. static void dump_set_window_owner_reply( const struct set_window_owner_reply *req )
  2593. {
  2594. fprintf( stderr, " full_owner=%08x", req->full_owner );
  2595. fprintf( stderr, ", prev_owner=%08x", req->prev_owner );
  2596. }
  2597. static void dump_get_window_info_request( const struct get_window_info_request *req )
  2598. {
  2599. fprintf( stderr, " handle=%08x", req->handle );
  2600. }
  2601. static void dump_get_window_info_reply( const struct get_window_info_reply *req )
  2602. {
  2603. fprintf( stderr, " full_handle=%08x", req->full_handle );
  2604. fprintf( stderr, ", last_active=%08x", req->last_active );
  2605. fprintf( stderr, ", pid=%04x", req->pid );
  2606. fprintf( stderr, ", tid=%04x", req->tid );
  2607. fprintf( stderr, ", atom=%04x", req->atom );
  2608. fprintf( stderr, ", is_unicode=%d", req->is_unicode );
  2609. fprintf( stderr, ", dpi=%d", req->dpi );
  2610. fprintf( stderr, ", awareness=%d", req->awareness );
  2611. }
  2612. static void dump_set_window_info_request( const struct set_window_info_request *req )
  2613. {
  2614. fprintf( stderr, " flags=%04x", req->flags );
  2615. fprintf( stderr, ", is_unicode=%d", req->is_unicode );
  2616. fprintf( stderr, ", handle=%08x", req->handle );
  2617. fprintf( stderr, ", style=%08x", req->style );
  2618. fprintf( stderr, ", ex_style=%08x", req->ex_style );
  2619. fprintf( stderr, ", extra_size=%u", req->extra_size );
  2620. dump_uint64( ", instance=", &req->instance );
  2621. dump_uint64( ", user_data=", &req->user_data );
  2622. dump_uint64( ", extra_value=", &req->extra_value );
  2623. fprintf( stderr, ", extra_offset=%d", req->extra_offset );
  2624. }
  2625. static void dump_set_window_info_reply( const struct set_window_info_reply *req )
  2626. {
  2627. fprintf( stderr, " old_style=%08x", req->old_style );
  2628. fprintf( stderr, ", old_ex_style=%08x", req->old_ex_style );
  2629. dump_uint64( ", old_instance=", &req->old_instance );
  2630. dump_uint64( ", old_user_data=", &req->old_user_data );
  2631. dump_uint64( ", old_extra_value=", &req->old_extra_value );
  2632. dump_uint64( ", old_id=", &req->old_id );
  2633. }
  2634. static void dump_set_parent_request( const struct set_parent_request *req )
  2635. {
  2636. fprintf( stderr, " handle=%08x", req->handle );
  2637. fprintf( stderr, ", parent=%08x", req->parent );
  2638. }
  2639. static void dump_set_parent_reply( const struct set_parent_reply *req )
  2640. {
  2641. fprintf( stderr, " old_parent=%08x", req->old_parent );
  2642. fprintf( stderr, ", full_parent=%08x", req->full_parent );
  2643. fprintf( stderr, ", dpi=%d", req->dpi );
  2644. fprintf( stderr, ", awareness=%d", req->awareness );
  2645. }
  2646. static void dump_get_window_parents_request( const struct get_window_parents_request *req )
  2647. {
  2648. fprintf( stderr, " handle=%08x", req->handle );
  2649. }
  2650. static void dump_get_window_parents_reply( const struct get_window_parents_reply *req )
  2651. {
  2652. fprintf( stderr, " count=%d", req->count );
  2653. dump_varargs_user_handles( ", parents=", cur_size );
  2654. }
  2655. static void dump_get_window_children_request( const struct get_window_children_request *req )
  2656. {
  2657. fprintf( stderr, " desktop=%04x", req->desktop );
  2658. fprintf( stderr, ", parent=%08x", req->parent );
  2659. fprintf( stderr, ", atom=%04x", req->atom );
  2660. fprintf( stderr, ", tid=%04x", req->tid );
  2661. dump_varargs_unicode_str( ", class=", cur_size );
  2662. }
  2663. static void dump_get_window_children_reply( const struct get_window_children_reply *req )
  2664. {
  2665. fprintf( stderr, " count=%d", req->count );
  2666. dump_varargs_user_handles( ", children=", cur_size );
  2667. }
  2668. static void dump_get_window_children_from_point_request( const struct get_window_children_from_point_request *req )
  2669. {
  2670. fprintf( stderr, " parent=%08x", req->parent );
  2671. fprintf( stderr, ", x=%d", req->x );
  2672. fprintf( stderr, ", y=%d", req->y );
  2673. fprintf( stderr, ", dpi=%d", req->dpi );
  2674. }
  2675. static void dump_get_window_children_from_point_reply( const struct get_window_children_from_point_reply *req )
  2676. {
  2677. fprintf( stderr, " count=%d", req->count );
  2678. dump_varargs_user_handles( ", children=", cur_size );
  2679. }
  2680. static void dump_get_window_tree_request( const struct get_window_tree_request *req )
  2681. {
  2682. fprintf( stderr, " handle=%08x", req->handle );
  2683. }
  2684. static void dump_get_window_tree_reply( const struct get_window_tree_reply *req )
  2685. {
  2686. fprintf( stderr, " parent=%08x", req->parent );
  2687. fprintf( stderr, ", owner=%08x", req->owner );
  2688. fprintf( stderr, ", next_sibling=%08x", req->next_sibling );
  2689. fprintf( stderr, ", prev_sibling=%08x", req->prev_sibling );
  2690. fprintf( stderr, ", first_sibling=%08x", req->first_sibling );
  2691. fprintf( stderr, ", last_sibling=%08x", req->last_sibling );
  2692. fprintf( stderr, ", first_child=%08x", req->first_child );
  2693. fprintf( stderr, ", last_child=%08x", req->last_child );
  2694. }
  2695. static void dump_set_window_pos_request( const struct set_window_pos_request *req )
  2696. {
  2697. fprintf( stderr, " swp_flags=%04x", req->swp_flags );
  2698. fprintf( stderr, ", paint_flags=%04x", req->paint_flags );
  2699. fprintf( stderr, ", handle=%08x", req->handle );
  2700. fprintf( stderr, ", previous=%08x", req->previous );
  2701. dump_rectangle( ", window=", &req->window );
  2702. dump_rectangle( ", client=", &req->client );
  2703. dump_varargs_rectangles( ", valid=", cur_size );
  2704. }
  2705. static void dump_set_window_pos_reply( const struct set_window_pos_reply *req )
  2706. {
  2707. fprintf( stderr, " new_style=%08x", req->new_style );
  2708. fprintf( stderr, ", new_ex_style=%08x", req->new_ex_style );
  2709. fprintf( stderr, ", surface_win=%08x", req->surface_win );
  2710. fprintf( stderr, ", needs_update=%d", req->needs_update );
  2711. }
  2712. static void dump_get_window_rectangles_request( const struct get_window_rectangles_request *req )
  2713. {
  2714. fprintf( stderr, " handle=%08x", req->handle );
  2715. fprintf( stderr, ", relative=%d", req->relative );
  2716. fprintf( stderr, ", dpi=%d", req->dpi );
  2717. }
  2718. static void dump_get_window_rectangles_reply( const struct get_window_rectangles_reply *req )
  2719. {
  2720. dump_rectangle( " window=", &req->window );
  2721. dump_rectangle( ", client=", &req->client );
  2722. }
  2723. static void dump_get_window_text_request( const struct get_window_text_request *req )
  2724. {
  2725. fprintf( stderr, " handle=%08x", req->handle );
  2726. }
  2727. static void dump_get_window_text_reply( const struct get_window_text_reply *req )
  2728. {
  2729. fprintf( stderr, " length=%u", req->length );
  2730. dump_varargs_unicode_str( ", text=", cur_size );
  2731. }
  2732. static void dump_set_window_text_request( const struct set_window_text_request *req )
  2733. {
  2734. fprintf( stderr, " handle=%08x", req->handle );
  2735. dump_varargs_unicode_str( ", text=", cur_size );
  2736. }
  2737. static void dump_get_windows_offset_request( const struct get_windows_offset_request *req )
  2738. {
  2739. fprintf( stderr, " from=%08x", req->from );
  2740. fprintf( stderr, ", to=%08x", req->to );
  2741. fprintf( stderr, ", dpi=%d", req->dpi );
  2742. }
  2743. static void dump_get_windows_offset_reply( const struct get_windows_offset_reply *req )
  2744. {
  2745. fprintf( stderr, " x=%d", req->x );
  2746. fprintf( stderr, ", y=%d", req->y );
  2747. fprintf( stderr, ", mirror=%d", req->mirror );
  2748. }
  2749. static void dump_get_visible_region_request( const struct get_visible_region_request *req )
  2750. {
  2751. fprintf( stderr, " window=%08x", req->window );
  2752. fprintf( stderr, ", flags=%08x", req->flags );
  2753. }
  2754. static void dump_get_visible_region_reply( const struct get_visible_region_reply *req )
  2755. {
  2756. fprintf( stderr, " top_win=%08x", req->top_win );
  2757. dump_rectangle( ", top_rect=", &req->top_rect );
  2758. dump_rectangle( ", win_rect=", &req->win_rect );
  2759. fprintf( stderr, ", paint_flags=%08x", req->paint_flags );
  2760. fprintf( stderr, ", total_size=%u", req->total_size );
  2761. dump_varargs_rectangles( ", region=", cur_size );
  2762. }
  2763. static void dump_get_surface_region_request( const struct get_surface_region_request *req )
  2764. {
  2765. fprintf( stderr, " window=%08x", req->window );
  2766. }
  2767. static void dump_get_surface_region_reply( const struct get_surface_region_reply *req )
  2768. {
  2769. dump_rectangle( " visible_rect=", &req->visible_rect );
  2770. fprintf( stderr, ", total_size=%u", req->total_size );
  2771. dump_varargs_rectangles( ", region=", cur_size );
  2772. }
  2773. static void dump_get_window_region_request( const struct get_window_region_request *req )
  2774. {
  2775. fprintf( stderr, " window=%08x", req->window );
  2776. }
  2777. static void dump_get_window_region_reply( const struct get_window_region_reply *req )
  2778. {
  2779. fprintf( stderr, " total_size=%u", req->total_size );
  2780. dump_varargs_rectangles( ", region=", cur_size );
  2781. }
  2782. static void dump_set_window_region_request( const struct set_window_region_request *req )
  2783. {
  2784. fprintf( stderr, " window=%08x", req->window );
  2785. fprintf( stderr, ", redraw=%d", req->redraw );
  2786. dump_varargs_rectangles( ", region=", cur_size );
  2787. }
  2788. static void dump_get_update_region_request( const struct get_update_region_request *req )
  2789. {
  2790. fprintf( stderr, " window=%08x", req->window );
  2791. fprintf( stderr, ", from_child=%08x", req->from_child );
  2792. fprintf( stderr, ", flags=%08x", req->flags );
  2793. }
  2794. static void dump_get_update_region_reply( const struct get_update_region_reply *req )
  2795. {
  2796. fprintf( stderr, " child=%08x", req->child );
  2797. fprintf( stderr, ", flags=%08x", req->flags );
  2798. fprintf( stderr, ", total_size=%u", req->total_size );
  2799. dump_varargs_rectangles( ", region=", cur_size );
  2800. }
  2801. static void dump_update_window_zorder_request( const struct update_window_zorder_request *req )
  2802. {
  2803. fprintf( stderr, " window=%08x", req->window );
  2804. dump_rectangle( ", rect=", &req->rect );
  2805. }
  2806. static void dump_redraw_window_request( const struct redraw_window_request *req )
  2807. {
  2808. fprintf( stderr, " window=%08x", req->window );
  2809. fprintf( stderr, ", flags=%08x", req->flags );
  2810. dump_varargs_rectangles( ", region=", cur_size );
  2811. }
  2812. static void dump_set_window_property_request( const struct set_window_property_request *req )
  2813. {
  2814. fprintf( stderr, " window=%08x", req->window );
  2815. dump_uint64( ", data=", &req->data );
  2816. fprintf( stderr, ", atom=%04x", req->atom );
  2817. dump_varargs_unicode_str( ", name=", cur_size );
  2818. }
  2819. static void dump_remove_window_property_request( const struct remove_window_property_request *req )
  2820. {
  2821. fprintf( stderr, " window=%08x", req->window );
  2822. fprintf( stderr, ", atom=%04x", req->atom );
  2823. dump_varargs_unicode_str( ", name=", cur_size );
  2824. }
  2825. static void dump_remove_window_property_reply( const struct remove_window_property_reply *req )
  2826. {
  2827. dump_uint64( " data=", &req->data );
  2828. }
  2829. static void dump_get_window_property_request( const struct get_window_property_request *req )
  2830. {
  2831. fprintf( stderr, " window=%08x", req->window );
  2832. fprintf( stderr, ", atom=%04x", req->atom );
  2833. dump_varargs_unicode_str( ", name=", cur_size );
  2834. }
  2835. static void dump_get_window_property_reply( const struct get_window_property_reply *req )
  2836. {
  2837. dump_uint64( " data=", &req->data );
  2838. }
  2839. static void dump_get_window_properties_request( const struct get_window_properties_request *req )
  2840. {
  2841. fprintf( stderr, " window=%08x", req->window );
  2842. }
  2843. static void dump_get_window_properties_reply( const struct get_window_properties_reply *req )
  2844. {
  2845. fprintf( stderr, " total=%d", req->total );
  2846. dump_varargs_properties( ", props=", cur_size );
  2847. }
  2848. static void dump_create_winstation_request( const struct create_winstation_request *req )
  2849. {
  2850. fprintf( stderr, " flags=%08x", req->flags );
  2851. fprintf( stderr, ", access=%08x", req->access );
  2852. fprintf( stderr, ", attributes=%08x", req->attributes );
  2853. fprintf( stderr, ", rootdir=%04x", req->rootdir );
  2854. dump_varargs_unicode_str( ", name=", cur_size );
  2855. }
  2856. static void dump_create_winstation_reply( const struct create_winstation_reply *req )
  2857. {
  2858. fprintf( stderr, " handle=%04x", req->handle );
  2859. }
  2860. static void dump_open_winstation_request( const struct open_winstation_request *req )
  2861. {
  2862. fprintf( stderr, " access=%08x", req->access );
  2863. fprintf( stderr, ", attributes=%08x", req->attributes );
  2864. fprintf( stderr, ", rootdir=%04x", req->rootdir );
  2865. dump_varargs_unicode_str( ", name=", cur_size );
  2866. }
  2867. static void dump_open_winstation_reply( const struct open_winstation_reply *req )
  2868. {
  2869. fprintf( stderr, " handle=%04x", req->handle );
  2870. }
  2871. static void dump_close_winstation_request( const struct close_winstation_request *req )
  2872. {
  2873. fprintf( stderr, " handle=%04x", req->handle );
  2874. }
  2875. static void dump_get_process_winstation_request( const struct get_process_winstation_request *req )
  2876. {
  2877. }
  2878. static void dump_get_process_winstation_reply( const struct get_process_winstation_reply *req )
  2879. {
  2880. fprintf( stderr, " handle=%04x", req->handle );
  2881. }
  2882. static void dump_set_process_winstation_request( const struct set_process_winstation_request *req )
  2883. {
  2884. fprintf( stderr, " handle=%04x", req->handle );
  2885. }
  2886. static void dump_enum_winstation_request( const struct enum_winstation_request *req )
  2887. {
  2888. fprintf( stderr, " index=%08x", req->index );
  2889. }
  2890. static void dump_enum_winstation_reply( const struct enum_winstation_reply *req )
  2891. {
  2892. fprintf( stderr, " next=%08x", req->next );
  2893. dump_varargs_unicode_str( ", name=", cur_size );
  2894. }
  2895. static void dump_create_desktop_request( const struct create_desktop_request *req )
  2896. {
  2897. fprintf( stderr, " flags=%08x", req->flags );
  2898. fprintf( stderr, ", access=%08x", req->access );
  2899. fprintf( stderr, ", attributes=%08x", req->attributes );
  2900. dump_varargs_unicode_str( ", name=", cur_size );
  2901. }
  2902. static void dump_create_desktop_reply( const struct create_desktop_reply *req )
  2903. {
  2904. fprintf( stderr, " handle=%04x", req->handle );
  2905. }
  2906. static void dump_open_desktop_request( const struct open_desktop_request *req )
  2907. {
  2908. fprintf( stderr, " winsta=%04x", req->winsta );
  2909. fprintf( stderr, ", flags=%08x", req->flags );
  2910. fprintf( stderr, ", access=%08x", req->access );
  2911. fprintf( stderr, ", attributes=%08x", req->attributes );
  2912. dump_varargs_unicode_str( ", name=", cur_size );
  2913. }
  2914. static void dump_open_desktop_reply( const struct open_desktop_reply *req )
  2915. {
  2916. fprintf( stderr, " handle=%04x", req->handle );
  2917. }
  2918. static void dump_open_input_desktop_request( const struct open_input_desktop_request *req )
  2919. {
  2920. fprintf( stderr, " flags=%08x", req->flags );
  2921. fprintf( stderr, ", access=%08x", req->access );
  2922. fprintf( stderr, ", attributes=%08x", req->attributes );
  2923. }
  2924. static void dump_open_input_desktop_reply( const struct open_input_desktop_reply *req )
  2925. {
  2926. fprintf( stderr, " handle=%04x", req->handle );
  2927. }
  2928. static void dump_close_desktop_request( const struct close_desktop_request *req )
  2929. {
  2930. fprintf( stderr, " handle=%04x", req->handle );
  2931. }
  2932. static void dump_get_thread_desktop_request( const struct get_thread_desktop_request *req )
  2933. {
  2934. fprintf( stderr, " tid=%04x", req->tid );
  2935. }
  2936. static void dump_get_thread_desktop_reply( const struct get_thread_desktop_reply *req )
  2937. {
  2938. fprintf( stderr, " handle=%04x", req->handle );
  2939. }
  2940. static void dump_set_thread_desktop_request( const struct set_thread_desktop_request *req )
  2941. {
  2942. fprintf( stderr, " handle=%04x", req->handle );
  2943. }
  2944. static void dump_enum_desktop_request( const struct enum_desktop_request *req )
  2945. {
  2946. fprintf( stderr, " winstation=%04x", req->winstation );
  2947. fprintf( stderr, ", index=%08x", req->index );
  2948. }
  2949. static void dump_enum_desktop_reply( const struct enum_desktop_reply *req )
  2950. {
  2951. fprintf( stderr, " next=%08x", req->next );
  2952. dump_varargs_unicode_str( ", name=", cur_size );
  2953. }
  2954. static void dump_set_user_object_info_request( const struct set_user_object_info_request *req )
  2955. {
  2956. fprintf( stderr, " handle=%04x", req->handle );
  2957. fprintf( stderr, ", flags=%08x", req->flags );
  2958. fprintf( stderr, ", obj_flags=%08x", req->obj_flags );
  2959. }
  2960. static void dump_set_user_object_info_reply( const struct set_user_object_info_reply *req )
  2961. {
  2962. fprintf( stderr, " is_desktop=%d", req->is_desktop );
  2963. fprintf( stderr, ", old_obj_flags=%08x", req->old_obj_flags );
  2964. dump_varargs_unicode_str( ", name=", cur_size );
  2965. }
  2966. static void dump_register_hotkey_request( const struct register_hotkey_request *req )
  2967. {
  2968. fprintf( stderr, " window=%08x", req->window );
  2969. fprintf( stderr, ", id=%d", req->id );
  2970. fprintf( stderr, ", flags=%08x", req->flags );
  2971. fprintf( stderr, ", vkey=%08x", req->vkey );
  2972. }
  2973. static void dump_register_hotkey_reply( const struct register_hotkey_reply *req )
  2974. {
  2975. fprintf( stderr, " replaced=%d", req->replaced );
  2976. fprintf( stderr, ", flags=%08x", req->flags );
  2977. fprintf( stderr, ", vkey=%08x", req->vkey );
  2978. }
  2979. static void dump_unregister_hotkey_request( const struct unregister_hotkey_request *req )
  2980. {
  2981. fprintf( stderr, " window=%08x", req->window );
  2982. fprintf( stderr, ", id=%d", req->id );
  2983. }
  2984. static void dump_unregister_hotkey_reply( const struct unregister_hotkey_reply *req )
  2985. {
  2986. fprintf( stderr, " flags=%08x", req->flags );
  2987. fprintf( stderr, ", vkey=%08x", req->vkey );
  2988. }
  2989. static void dump_attach_thread_input_request( const struct attach_thread_input_request *req )
  2990. {
  2991. fprintf( stderr, " tid_from=%04x", req->tid_from );
  2992. fprintf( stderr, ", tid_to=%04x", req->tid_to );
  2993. fprintf( stderr, ", attach=%d", req->attach );
  2994. }
  2995. static void dump_get_thread_input_request( const struct get_thread_input_request *req )
  2996. {
  2997. fprintf( stderr, " tid=%04x", req->tid );
  2998. }
  2999. static void dump_get_thread_input_reply( const struct get_thread_input_reply *req )
  3000. {
  3001. fprintf( stderr, " focus=%08x", req->focus );
  3002. fprintf( stderr, ", capture=%08x", req->capture );
  3003. fprintf( stderr, ", active=%08x", req->active );
  3004. fprintf( stderr, ", foreground=%08x", req->foreground );
  3005. fprintf( stderr, ", menu_owner=%08x", req->menu_owner );
  3006. fprintf( stderr, ", move_size=%08x", req->move_size );
  3007. fprintf( stderr, ", caret=%08x", req->caret );
  3008. fprintf( stderr, ", cursor=%08x", req->cursor );
  3009. fprintf( stderr, ", show_count=%d", req->show_count );
  3010. dump_rectangle( ", rect=", &req->rect );
  3011. }
  3012. static void dump_get_last_input_time_request( const struct get_last_input_time_request *req )
  3013. {
  3014. }
  3015. static void dump_get_last_input_time_reply( const struct get_last_input_time_reply *req )
  3016. {
  3017. fprintf( stderr, " time=%08x", req->time );
  3018. }
  3019. static void dump_get_key_state_request( const struct get_key_state_request *req )
  3020. {
  3021. fprintf( stderr, " async=%d", req->async );
  3022. fprintf( stderr, ", key=%d", req->key );
  3023. }
  3024. static void dump_get_key_state_reply( const struct get_key_state_reply *req )
  3025. {
  3026. fprintf( stderr, " state=%02x", req->state );
  3027. dump_varargs_bytes( ", keystate=", cur_size );
  3028. }
  3029. static void dump_set_key_state_request( const struct set_key_state_request *req )
  3030. {
  3031. fprintf( stderr, " async=%d", req->async );
  3032. dump_varargs_bytes( ", keystate=", cur_size );
  3033. }
  3034. static void dump_set_foreground_window_request( const struct set_foreground_window_request *req )
  3035. {
  3036. fprintf( stderr, " handle=%08x", req->handle );
  3037. }
  3038. static void dump_set_foreground_window_reply( const struct set_foreground_window_reply *req )
  3039. {
  3040. fprintf( stderr, " previous=%08x", req->previous );
  3041. fprintf( stderr, ", send_msg_old=%d", req->send_msg_old );
  3042. fprintf( stderr, ", send_msg_new=%d", req->send_msg_new );
  3043. }
  3044. static void dump_set_focus_window_request( const struct set_focus_window_request *req )
  3045. {
  3046. fprintf( stderr, " handle=%08x", req->handle );
  3047. }
  3048. static void dump_set_focus_window_reply( const struct set_focus_window_reply *req )
  3049. {
  3050. fprintf( stderr, " previous=%08x", req->previous );
  3051. }
  3052. static void dump_set_active_window_request( const struct set_active_window_request *req )
  3053. {
  3054. fprintf( stderr, " handle=%08x", req->handle );
  3055. }
  3056. static void dump_set_active_window_reply( const struct set_active_window_reply *req )
  3057. {
  3058. fprintf( stderr, " previous=%08x", req->previous );
  3059. }
  3060. static void dump_set_capture_window_request( const struct set_capture_window_request *req )
  3061. {
  3062. fprintf( stderr, " handle=%08x", req->handle );
  3063. fprintf( stderr, ", flags=%08x", req->flags );
  3064. }
  3065. static void dump_set_capture_window_reply( const struct set_capture_window_reply *req )
  3066. {
  3067. fprintf( stderr, " previous=%08x", req->previous );
  3068. fprintf( stderr, ", full_handle=%08x", req->full_handle );
  3069. }
  3070. static void dump_set_caret_window_request( const struct set_caret_window_request *req )
  3071. {
  3072. fprintf( stderr, " handle=%08x", req->handle );
  3073. fprintf( stderr, ", width=%d", req->width );
  3074. fprintf( stderr, ", height=%d", req->height );
  3075. }
  3076. static void dump_set_caret_window_reply( const struct set_caret_window_reply *req )
  3077. {
  3078. fprintf( stderr, " previous=%08x", req->previous );
  3079. dump_rectangle( ", old_rect=", &req->old_rect );
  3080. fprintf( stderr, ", old_hide=%d", req->old_hide );
  3081. fprintf( stderr, ", old_state=%d", req->old_state );
  3082. }
  3083. static void dump_set_caret_info_request( const struct set_caret_info_request *req )
  3084. {
  3085. fprintf( stderr, " flags=%08x", req->flags );
  3086. fprintf( stderr, ", handle=%08x", req->handle );
  3087. fprintf( stderr, ", x=%d", req->x );
  3088. fprintf( stderr, ", y=%d", req->y );
  3089. fprintf( stderr, ", hide=%d", req->hide );
  3090. fprintf( stderr, ", state=%d", req->state );
  3091. }
  3092. static void dump_set_caret_info_reply( const struct set_caret_info_reply *req )
  3093. {
  3094. fprintf( stderr, " full_handle=%08x", req->full_handle );
  3095. dump_rectangle( ", old_rect=", &req->old_rect );
  3096. fprintf( stderr, ", old_hide=%d", req->old_hide );
  3097. fprintf( stderr, ", old_state=%d", req->old_state );
  3098. }
  3099. static void dump_set_hook_request( const struct set_hook_request *req )
  3100. {
  3101. fprintf( stderr, " id=%d", req->id );
  3102. fprintf( stderr, ", pid=%04x", req->pid );
  3103. fprintf( stderr, ", tid=%04x", req->tid );
  3104. fprintf( stderr, ", event_min=%d", req->event_min );
  3105. fprintf( stderr, ", event_max=%d", req->event_max );
  3106. dump_uint64( ", proc=", &req->proc );
  3107. fprintf( stderr, ", flags=%d", req->flags );
  3108. fprintf( stderr, ", unicode=%d", req->unicode );
  3109. dump_varargs_unicode_str( ", module=", cur_size );
  3110. }
  3111. static void dump_set_hook_reply( const struct set_hook_reply *req )
  3112. {
  3113. fprintf( stderr, " handle=%08x", req->handle );
  3114. fprintf( stderr, ", active_hooks=%08x", req->active_hooks );
  3115. }
  3116. static void dump_remove_hook_request( const struct remove_hook_request *req )
  3117. {
  3118. fprintf( stderr, " handle=%08x", req->handle );
  3119. dump_uint64( ", proc=", &req->proc );
  3120. fprintf( stderr, ", id=%d", req->id );
  3121. }
  3122. static void dump_remove_hook_reply( const struct remove_hook_reply *req )
  3123. {
  3124. fprintf( stderr, " active_hooks=%08x", req->active_hooks );
  3125. }
  3126. static void dump_start_hook_chain_request( const struct start_hook_chain_request *req )
  3127. {
  3128. fprintf( stderr, " id=%d", req->id );
  3129. fprintf( stderr, ", event=%d", req->event );
  3130. fprintf( stderr, ", window=%08x", req->window );
  3131. fprintf( stderr, ", object_id=%d", req->object_id );
  3132. fprintf( stderr, ", child_id=%d", req->child_id );
  3133. }
  3134. static void dump_start_hook_chain_reply( const struct start_hook_chain_reply *req )
  3135. {
  3136. fprintf( stderr, " handle=%08x", req->handle );
  3137. fprintf( stderr, ", pid=%04x", req->pid );
  3138. fprintf( stderr, ", tid=%04x", req->tid );
  3139. fprintf( stderr, ", unicode=%d", req->unicode );
  3140. dump_uint64( ", proc=", &req->proc );
  3141. fprintf( stderr, ", active_hooks=%08x", req->active_hooks );
  3142. dump_varargs_unicode_str( ", module=", cur_size );
  3143. }
  3144. static void dump_finish_hook_chain_request( const struct finish_hook_chain_request *req )
  3145. {
  3146. fprintf( stderr, " id=%d", req->id );
  3147. }
  3148. static void dump_get_hook_info_request( const struct get_hook_info_request *req )
  3149. {
  3150. fprintf( stderr, " handle=%08x", req->handle );
  3151. fprintf( stderr, ", get_next=%d", req->get_next );
  3152. fprintf( stderr, ", event=%d", req->event );
  3153. fprintf( stderr, ", window=%08x", req->window );
  3154. fprintf( stderr, ", object_id=%d", req->object_id );
  3155. fprintf( stderr, ", child_id=%d", req->child_id );
  3156. }
  3157. static void dump_get_hook_info_reply( const struct get_hook_info_reply *req )
  3158. {
  3159. fprintf( stderr, " handle=%08x", req->handle );
  3160. fprintf( stderr, ", id=%d", req->id );
  3161. fprintf( stderr, ", pid=%04x", req->pid );
  3162. fprintf( stderr, ", tid=%04x", req->tid );
  3163. dump_uint64( ", proc=", &req->proc );
  3164. fprintf( stderr, ", unicode=%d", req->unicode );
  3165. dump_varargs_unicode_str( ", module=", cur_size );
  3166. }
  3167. static void dump_create_class_request( const struct create_class_request *req )
  3168. {
  3169. fprintf( stderr, " local=%d", req->local );
  3170. fprintf( stderr, ", atom=%04x", req->atom );
  3171. fprintf( stderr, ", style=%08x", req->style );
  3172. dump_uint64( ", instance=", &req->instance );
  3173. fprintf( stderr, ", extra=%d", req->extra );
  3174. fprintf( stderr, ", win_extra=%d", req->win_extra );
  3175. dump_uint64( ", client_ptr=", &req->client_ptr );
  3176. fprintf( stderr, ", name_offset=%u", req->name_offset );
  3177. dump_varargs_unicode_str( ", name=", cur_size );
  3178. }
  3179. static void dump_create_class_reply( const struct create_class_reply *req )
  3180. {
  3181. fprintf( stderr, " atom=%04x", req->atom );
  3182. }
  3183. static void dump_destroy_class_request( const struct destroy_class_request *req )
  3184. {
  3185. fprintf( stderr, " atom=%04x", req->atom );
  3186. dump_uint64( ", instance=", &req->instance );
  3187. dump_varargs_unicode_str( ", name=", cur_size );
  3188. }
  3189. static void dump_destroy_class_reply( const struct destroy_class_reply *req )
  3190. {
  3191. dump_uint64( " client_ptr=", &req->client_ptr );
  3192. }
  3193. static void dump_set_class_info_request( const struct set_class_info_request *req )
  3194. {
  3195. fprintf( stderr, " window=%08x", req->window );
  3196. fprintf( stderr, ", flags=%08x", req->flags );
  3197. fprintf( stderr, ", atom=%04x", req->atom );
  3198. fprintf( stderr, ", style=%08x", req->style );
  3199. fprintf( stderr, ", win_extra=%d", req->win_extra );
  3200. dump_uint64( ", instance=", &req->instance );
  3201. fprintf( stderr, ", extra_offset=%d", req->extra_offset );
  3202. fprintf( stderr, ", extra_size=%u", req->extra_size );
  3203. dump_uint64( ", extra_value=", &req->extra_value );
  3204. }
  3205. static void dump_set_class_info_reply( const struct set_class_info_reply *req )
  3206. {
  3207. fprintf( stderr, " old_atom=%04x", req->old_atom );
  3208. fprintf( stderr, ", base_atom=%04x", req->base_atom );
  3209. dump_uint64( ", old_instance=", &req->old_instance );
  3210. dump_uint64( ", old_extra_value=", &req->old_extra_value );
  3211. fprintf( stderr, ", old_style=%08x", req->old_style );
  3212. fprintf( stderr, ", old_extra=%d", req->old_extra );
  3213. fprintf( stderr, ", old_win_extra=%d", req->old_win_extra );
  3214. }
  3215. static void dump_open_clipboard_request( const struct open_clipboard_request *req )
  3216. {
  3217. fprintf( stderr, " window=%08x", req->window );
  3218. }
  3219. static void dump_open_clipboard_reply( const struct open_clipboard_reply *req )
  3220. {
  3221. fprintf( stderr, " owner=%08x", req->owner );
  3222. }
  3223. static void dump_close_clipboard_request( const struct close_clipboard_request *req )
  3224. {
  3225. }
  3226. static void dump_close_clipboard_reply( const struct close_clipboard_reply *req )
  3227. {
  3228. fprintf( stderr, " viewer=%08x", req->viewer );
  3229. fprintf( stderr, ", owner=%08x", req->owner );
  3230. }
  3231. static void dump_empty_clipboard_request( const struct empty_clipboard_request *req )
  3232. {
  3233. }
  3234. static void dump_set_clipboard_data_request( const struct set_clipboard_data_request *req )
  3235. {
  3236. fprintf( stderr, " format=%08x", req->format );
  3237. fprintf( stderr, ", lcid=%08x", req->lcid );
  3238. dump_varargs_bytes( ", data=", cur_size );
  3239. }
  3240. static void dump_set_clipboard_data_reply( const struct set_clipboard_data_reply *req )
  3241. {
  3242. fprintf( stderr, " seqno=%08x", req->seqno );
  3243. }
  3244. static void dump_get_clipboard_data_request( const struct get_clipboard_data_request *req )
  3245. {
  3246. fprintf( stderr, " format=%08x", req->format );
  3247. fprintf( stderr, ", render=%d", req->render );
  3248. fprintf( stderr, ", cached=%d", req->cached );
  3249. fprintf( stderr, ", seqno=%08x", req->seqno );
  3250. }
  3251. static void dump_get_clipboard_data_reply( const struct get_clipboard_data_reply *req )
  3252. {
  3253. fprintf( stderr, " from=%08x", req->from );
  3254. fprintf( stderr, ", owner=%08x", req->owner );
  3255. fprintf( stderr, ", seqno=%08x", req->seqno );
  3256. fprintf( stderr, ", total=%u", req->total );
  3257. dump_varargs_bytes( ", data=", cur_size );
  3258. }
  3259. static void dump_get_clipboard_formats_request( const struct get_clipboard_formats_request *req )
  3260. {
  3261. fprintf( stderr, " format=%08x", req->format );
  3262. }
  3263. static void dump_get_clipboard_formats_reply( const struct get_clipboard_formats_reply *req )
  3264. {
  3265. fprintf( stderr, " count=%08x", req->count );
  3266. dump_varargs_uints( ", formats=", cur_size );
  3267. }
  3268. static void dump_enum_clipboard_formats_request( const struct enum_clipboard_formats_request *req )
  3269. {
  3270. fprintf( stderr, " previous=%08x", req->previous );
  3271. }
  3272. static void dump_enum_clipboard_formats_reply( const struct enum_clipboard_formats_reply *req )
  3273. {
  3274. fprintf( stderr, " format=%08x", req->format );
  3275. }
  3276. static void dump_release_clipboard_request( const struct release_clipboard_request *req )
  3277. {
  3278. fprintf( stderr, " owner=%08x", req->owner );
  3279. }
  3280. static void dump_release_clipboard_reply( const struct release_clipboard_reply *req )
  3281. {
  3282. fprintf( stderr, " viewer=%08x", req->viewer );
  3283. fprintf( stderr, ", owner=%08x", req->owner );
  3284. }
  3285. static void dump_get_clipboard_info_request( const struct get_clipboard_info_request *req )
  3286. {
  3287. }
  3288. static void dump_get_clipboard_info_reply( const struct get_clipboard_info_reply *req )
  3289. {
  3290. fprintf( stderr, " window=%08x", req->window );
  3291. fprintf( stderr, ", owner=%08x", req->owner );
  3292. fprintf( stderr, ", viewer=%08x", req->viewer );
  3293. fprintf( stderr, ", seqno=%08x", req->seqno );
  3294. }
  3295. static void dump_set_clipboard_viewer_request( const struct set_clipboard_viewer_request *req )
  3296. {
  3297. fprintf( stderr, " viewer=%08x", req->viewer );
  3298. fprintf( stderr, ", previous=%08x", req->previous );
  3299. }
  3300. static void dump_set_clipboard_viewer_reply( const struct set_clipboard_viewer_reply *req )
  3301. {
  3302. fprintf( stderr, " old_viewer=%08x", req->old_viewer );
  3303. fprintf( stderr, ", owner=%08x", req->owner );
  3304. }
  3305. static void dump_add_clipboard_listener_request( const struct add_clipboard_listener_request *req )
  3306. {
  3307. fprintf( stderr, " window=%08x", req->window );
  3308. }
  3309. static void dump_remove_clipboard_listener_request( const struct remove_clipboard_listener_request *req )
  3310. {
  3311. fprintf( stderr, " window=%08x", req->window );
  3312. }
  3313. static void dump_open_token_request( const struct open_token_request *req )
  3314. {
  3315. fprintf( stderr, " handle=%04x", req->handle );
  3316. fprintf( stderr, ", access=%08x", req->access );
  3317. fprintf( stderr, ", attributes=%08x", req->attributes );
  3318. fprintf( stderr, ", flags=%08x", req->flags );
  3319. }
  3320. static void dump_open_token_reply( const struct open_token_reply *req )
  3321. {
  3322. fprintf( stderr, " token=%04x", req->token );
  3323. }
  3324. static void dump_set_global_windows_request( const struct set_global_windows_request *req )
  3325. {
  3326. fprintf( stderr, " flags=%08x", req->flags );
  3327. fprintf( stderr, ", shell_window=%08x", req->shell_window );
  3328. fprintf( stderr, ", shell_listview=%08x", req->shell_listview );
  3329. fprintf( stderr, ", progman_window=%08x", req->progman_window );
  3330. fprintf( stderr, ", taskman_window=%08x", req->taskman_window );
  3331. }
  3332. static void dump_set_global_windows_reply( const struct set_global_windows_reply *req )
  3333. {
  3334. fprintf( stderr, " old_shell_window=%08x", req->old_shell_window );
  3335. fprintf( stderr, ", old_shell_listview=%08x", req->old_shell_listview );
  3336. fprintf( stderr, ", old_progman_window=%08x", req->old_progman_window );
  3337. fprintf( stderr, ", old_taskman_window=%08x", req->old_taskman_window );
  3338. }
  3339. static void dump_adjust_token_privileges_request( const struct adjust_token_privileges_request *req )
  3340. {
  3341. fprintf( stderr, " handle=%04x", req->handle );
  3342. fprintf( stderr, ", disable_all=%d", req->disable_all );
  3343. fprintf( stderr, ", get_modified_state=%d", req->get_modified_state );
  3344. dump_varargs_luid_attr( ", privileges=", cur_size );
  3345. }
  3346. static void dump_adjust_token_privileges_reply( const struct adjust_token_privileges_reply *req )
  3347. {
  3348. fprintf( stderr, " len=%08x", req->len );
  3349. dump_varargs_luid_attr( ", privileges=", cur_size );
  3350. }
  3351. static void dump_get_token_privileges_request( const struct get_token_privileges_request *req )
  3352. {
  3353. fprintf( stderr, " handle=%04x", req->handle );
  3354. }
  3355. static void dump_get_token_privileges_reply( const struct get_token_privileges_reply *req )
  3356. {
  3357. fprintf( stderr, " len=%08x", req->len );
  3358. dump_varargs_luid_attr( ", privileges=", cur_size );
  3359. }
  3360. static void dump_check_token_privileges_request( const struct check_token_privileges_request *req )
  3361. {
  3362. fprintf( stderr, " handle=%04x", req->handle );
  3363. fprintf( stderr, ", all_required=%d", req->all_required );
  3364. dump_varargs_luid_attr( ", privileges=", cur_size );
  3365. }
  3366. static void dump_check_token_privileges_reply( const struct check_token_privileges_reply *req )
  3367. {
  3368. fprintf( stderr, " has_privileges=%d", req->has_privileges );
  3369. dump_varargs_luid_attr( ", privileges=", cur_size );
  3370. }
  3371. static void dump_duplicate_token_request( const struct duplicate_token_request *req )
  3372. {
  3373. fprintf( stderr, " handle=%04x", req->handle );
  3374. fprintf( stderr, ", access=%08x", req->access );
  3375. fprintf( stderr, ", primary=%d", req->primary );
  3376. fprintf( stderr, ", impersonation_level=%d", req->impersonation_level );
  3377. dump_varargs_object_attributes( ", objattr=", cur_size );
  3378. }
  3379. static void dump_duplicate_token_reply( const struct duplicate_token_reply *req )
  3380. {
  3381. fprintf( stderr, " new_handle=%04x", req->new_handle );
  3382. }
  3383. static void dump_filter_token_request( const struct filter_token_request *req )
  3384. {
  3385. fprintf( stderr, " handle=%04x", req->handle );
  3386. fprintf( stderr, ", flags=%08x", req->flags );
  3387. fprintf( stderr, ", privileges_size=%u", req->privileges_size );
  3388. dump_varargs_luid_attr( ", privileges=", min(cur_size,req->privileges_size) );
  3389. dump_varargs_sid( ", disable_sids=", cur_size );
  3390. }
  3391. static void dump_filter_token_reply( const struct filter_token_reply *req )
  3392. {
  3393. fprintf( stderr, " new_handle=%04x", req->new_handle );
  3394. }
  3395. static void dump_access_check_request( const struct access_check_request *req )
  3396. {
  3397. fprintf( stderr, " handle=%04x", req->handle );
  3398. fprintf( stderr, ", desired_access=%08x", req->desired_access );
  3399. dump_generic_map( ", mapping=", &req->mapping );
  3400. dump_varargs_security_descriptor( ", sd=", cur_size );
  3401. }
  3402. static void dump_access_check_reply( const struct access_check_reply *req )
  3403. {
  3404. fprintf( stderr, " access_granted=%08x", req->access_granted );
  3405. fprintf( stderr, ", access_status=%08x", req->access_status );
  3406. fprintf( stderr, ", privileges_len=%08x", req->privileges_len );
  3407. dump_varargs_luid_attr( ", privileges=", cur_size );
  3408. }
  3409. static void dump_get_token_sid_request( const struct get_token_sid_request *req )
  3410. {
  3411. fprintf( stderr, " handle=%04x", req->handle );
  3412. fprintf( stderr, ", which_sid=%08x", req->which_sid );
  3413. }
  3414. static void dump_get_token_sid_reply( const struct get_token_sid_reply *req )
  3415. {
  3416. fprintf( stderr, " sid_len=%u", req->sid_len );
  3417. dump_varargs_sid( ", sid=", cur_size );
  3418. }
  3419. static void dump_get_token_groups_request( const struct get_token_groups_request *req )
  3420. {
  3421. fprintf( stderr, " handle=%04x", req->handle );
  3422. }
  3423. static void dump_get_token_groups_reply( const struct get_token_groups_reply *req )
  3424. {
  3425. fprintf( stderr, " attr_len=%u", req->attr_len );
  3426. fprintf( stderr, ", sid_len=%u", req->sid_len );
  3427. dump_varargs_uints( ", attrs=", min(cur_size,req->attr_len) );
  3428. dump_varargs_sids( ", sids=", cur_size );
  3429. }
  3430. static void dump_get_token_default_dacl_request( const struct get_token_default_dacl_request *req )
  3431. {
  3432. fprintf( stderr, " handle=%04x", req->handle );
  3433. }
  3434. static void dump_get_token_default_dacl_reply( const struct get_token_default_dacl_reply *req )
  3435. {
  3436. fprintf( stderr, " acl_len=%u", req->acl_len );
  3437. dump_varargs_acl( ", acl=", cur_size );
  3438. }
  3439. static void dump_set_token_default_dacl_request( const struct set_token_default_dacl_request *req )
  3440. {
  3441. fprintf( stderr, " handle=%04x", req->handle );
  3442. dump_varargs_acl( ", acl=", cur_size );
  3443. }
  3444. static void dump_set_security_object_request( const struct set_security_object_request *req )
  3445. {
  3446. fprintf( stderr, " handle=%04x", req->handle );
  3447. fprintf( stderr, ", security_info=%08x", req->security_info );
  3448. dump_varargs_security_descriptor( ", sd=", cur_size );
  3449. }
  3450. static void dump_get_security_object_request( const struct get_security_object_request *req )
  3451. {
  3452. fprintf( stderr, " handle=%04x", req->handle );
  3453. fprintf( stderr, ", security_info=%08x", req->security_info );
  3454. }
  3455. static void dump_get_security_object_reply( const struct get_security_object_reply *req )
  3456. {
  3457. fprintf( stderr, " sd_len=%08x", req->sd_len );
  3458. dump_varargs_security_descriptor( ", sd=", cur_size );
  3459. }
  3460. static void dump_get_system_handles_request( const struct get_system_handles_request *req )
  3461. {
  3462. }
  3463. static void dump_get_system_handles_reply( const struct get_system_handles_reply *req )
  3464. {
  3465. fprintf( stderr, " count=%08x", req->count );
  3466. dump_varargs_handle_infos( ", data=", cur_size );
  3467. }
  3468. static void dump_create_mailslot_request( const struct create_mailslot_request *req )
  3469. {
  3470. fprintf( stderr, " access=%08x", req->access );
  3471. dump_timeout( ", read_timeout=", &req->read_timeout );
  3472. fprintf( stderr, ", max_msgsize=%08x", req->max_msgsize );
  3473. dump_varargs_object_attributes( ", objattr=", cur_size );
  3474. }
  3475. static void dump_create_mailslot_reply( const struct create_mailslot_reply *req )
  3476. {
  3477. fprintf( stderr, " handle=%04x", req->handle );
  3478. }
  3479. static void dump_set_mailslot_info_request( const struct set_mailslot_info_request *req )
  3480. {
  3481. fprintf( stderr, " handle=%04x", req->handle );
  3482. dump_timeout( ", read_timeout=", &req->read_timeout );
  3483. fprintf( stderr, ", flags=%08x", req->flags );
  3484. }
  3485. static void dump_set_mailslot_info_reply( const struct set_mailslot_info_reply *req )
  3486. {
  3487. dump_timeout( " read_timeout=", &req->read_timeout );
  3488. fprintf( stderr, ", max_msgsize=%08x", req->max_msgsize );
  3489. }
  3490. static void dump_create_directory_request( const struct create_directory_request *req )
  3491. {
  3492. fprintf( stderr, " access=%08x", req->access );
  3493. dump_varargs_object_attributes( ", objattr=", cur_size );
  3494. }
  3495. static void dump_create_directory_reply( const struct create_directory_reply *req )
  3496. {
  3497. fprintf( stderr, " handle=%04x", req->handle );
  3498. }
  3499. static void dump_open_directory_request( const struct open_directory_request *req )
  3500. {
  3501. fprintf( stderr, " access=%08x", req->access );
  3502. fprintf( stderr, ", attributes=%08x", req->attributes );
  3503. fprintf( stderr, ", rootdir=%04x", req->rootdir );
  3504. dump_varargs_unicode_str( ", directory_name=", cur_size );
  3505. }
  3506. static void dump_open_directory_reply( const struct open_directory_reply *req )
  3507. {
  3508. fprintf( stderr, " handle=%04x", req->handle );
  3509. }
  3510. static void dump_get_directory_entries_request( const struct get_directory_entries_request *req )
  3511. {
  3512. fprintf( stderr, " handle=%04x", req->handle );
  3513. fprintf( stderr, ", index=%08x", req->index );
  3514. fprintf( stderr, ", max_count=%08x", req->max_count );
  3515. }
  3516. static void dump_get_directory_entries_reply( const struct get_directory_entries_reply *req )
  3517. {
  3518. fprintf( stderr, " count=%08x", req->count );
  3519. fprintf( stderr, ", total_count=%08x", req->total_count );
  3520. fprintf( stderr, ", total_len=%u", req->total_len );
  3521. dump_varargs_directory_entries( ", entries=", cur_size );
  3522. }
  3523. static void dump_create_symlink_request( const struct create_symlink_request *req )
  3524. {
  3525. fprintf( stderr, " access=%08x", req->access );
  3526. dump_varargs_object_attributes( ", objattr=", cur_size );
  3527. dump_varargs_unicode_str( ", target_name=", cur_size );
  3528. }
  3529. static void dump_create_symlink_reply( const struct create_symlink_reply *req )
  3530. {
  3531. fprintf( stderr, " handle=%04x", req->handle );
  3532. }
  3533. static void dump_open_symlink_request( const struct open_symlink_request *req )
  3534. {
  3535. fprintf( stderr, " access=%08x", req->access );
  3536. fprintf( stderr, ", attributes=%08x", req->attributes );
  3537. fprintf( stderr, ", rootdir=%04x", req->rootdir );
  3538. dump_varargs_unicode_str( ", name=", cur_size );
  3539. }
  3540. static void dump_open_symlink_reply( const struct open_symlink_reply *req )
  3541. {
  3542. fprintf( stderr, " handle=%04x", req->handle );
  3543. }
  3544. static void dump_query_symlink_request( const struct query_symlink_request *req )
  3545. {
  3546. fprintf( stderr, " handle=%04x", req->handle );
  3547. }
  3548. static void dump_query_symlink_reply( const struct query_symlink_reply *req )
  3549. {
  3550. fprintf( stderr, " total=%u", req->total );
  3551. dump_varargs_unicode_str( ", target_name=", cur_size );
  3552. }
  3553. static void dump_get_object_info_request( const struct get_object_info_request *req )
  3554. {
  3555. fprintf( stderr, " handle=%04x", req->handle );
  3556. }
  3557. static void dump_get_object_info_reply( const struct get_object_info_reply *req )
  3558. {
  3559. fprintf( stderr, " access=%08x", req->access );
  3560. fprintf( stderr, ", ref_count=%08x", req->ref_count );
  3561. fprintf( stderr, ", handle_count=%08x", req->handle_count );
  3562. }
  3563. static void dump_get_object_name_request( const struct get_object_name_request *req )
  3564. {
  3565. fprintf( stderr, " handle=%04x", req->handle );
  3566. }
  3567. static void dump_get_object_name_reply( const struct get_object_name_reply *req )
  3568. {
  3569. fprintf( stderr, " total=%u", req->total );
  3570. dump_varargs_unicode_str( ", name=", cur_size );
  3571. }
  3572. static void dump_get_object_type_request( const struct get_object_type_request *req )
  3573. {
  3574. fprintf( stderr, " handle=%04x", req->handle );
  3575. }
  3576. static void dump_get_object_type_reply( const struct get_object_type_reply *req )
  3577. {
  3578. dump_varargs_object_type_info( " info=", cur_size );
  3579. }
  3580. static void dump_get_object_types_request( const struct get_object_types_request *req )
  3581. {
  3582. }
  3583. static void dump_get_object_types_reply( const struct get_object_types_reply *req )
  3584. {
  3585. fprintf( stderr, " count=%d", req->count );
  3586. dump_varargs_object_types_info( ", info=", cur_size );
  3587. }
  3588. static void dump_allocate_locally_unique_id_request( const struct allocate_locally_unique_id_request *req )
  3589. {
  3590. }
  3591. static void dump_allocate_locally_unique_id_reply( const struct allocate_locally_unique_id_reply *req )
  3592. {
  3593. dump_luid( " luid=", &req->luid );
  3594. }
  3595. static void dump_create_device_manager_request( const struct create_device_manager_request *req )
  3596. {
  3597. fprintf( stderr, " access=%08x", req->access );
  3598. fprintf( stderr, ", attributes=%08x", req->attributes );
  3599. }
  3600. static void dump_create_device_manager_reply( const struct create_device_manager_reply *req )
  3601. {
  3602. fprintf( stderr, " handle=%04x", req->handle );
  3603. }
  3604. static void dump_create_device_request( const struct create_device_request *req )
  3605. {
  3606. fprintf( stderr, " rootdir=%04x", req->rootdir );
  3607. dump_uint64( ", user_ptr=", &req->user_ptr );
  3608. fprintf( stderr, ", manager=%04x", req->manager );
  3609. dump_varargs_unicode_str( ", name=", cur_size );
  3610. }
  3611. static void dump_delete_device_request( const struct delete_device_request *req )
  3612. {
  3613. fprintf( stderr, " manager=%04x", req->manager );
  3614. dump_uint64( ", device=", &req->device );
  3615. }
  3616. static void dump_get_next_device_request_request( const struct get_next_device_request_request *req )
  3617. {
  3618. fprintf( stderr, " manager=%04x", req->manager );
  3619. fprintf( stderr, ", prev=%04x", req->prev );
  3620. fprintf( stderr, ", status=%08x", req->status );
  3621. dump_uint64( ", user_ptr=", &req->user_ptr );
  3622. fprintf( stderr, ", pending=%d", req->pending );
  3623. fprintf( stderr, ", iosb_status=%08x", req->iosb_status );
  3624. fprintf( stderr, ", result=%u", req->result );
  3625. dump_varargs_bytes( ", data=", cur_size );
  3626. }
  3627. static void dump_get_next_device_request_reply( const struct get_next_device_request_reply *req )
  3628. {
  3629. dump_irp_params( " params=", &req->params );
  3630. fprintf( stderr, ", next=%04x", req->next );
  3631. fprintf( stderr, ", client_tid=%04x", req->client_tid );
  3632. dump_uint64( ", client_thread=", &req->client_thread );
  3633. fprintf( stderr, ", in_size=%u", req->in_size );
  3634. dump_varargs_bytes( ", next_data=", cur_size );
  3635. }
  3636. static void dump_get_kernel_object_ptr_request( const struct get_kernel_object_ptr_request *req )
  3637. {
  3638. fprintf( stderr, " manager=%04x", req->manager );
  3639. fprintf( stderr, ", handle=%04x", req->handle );
  3640. }
  3641. static void dump_get_kernel_object_ptr_reply( const struct get_kernel_object_ptr_reply *req )
  3642. {
  3643. dump_uint64( " user_ptr=", &req->user_ptr );
  3644. }
  3645. static void dump_set_kernel_object_ptr_request( const struct set_kernel_object_ptr_request *req )
  3646. {
  3647. fprintf( stderr, " manager=%04x", req->manager );
  3648. fprintf( stderr, ", handle=%04x", req->handle );
  3649. dump_uint64( ", user_ptr=", &req->user_ptr );
  3650. }
  3651. static void dump_grab_kernel_object_request( const struct grab_kernel_object_request *req )
  3652. {
  3653. fprintf( stderr, " manager=%04x", req->manager );
  3654. dump_uint64( ", user_ptr=", &req->user_ptr );
  3655. }
  3656. static void dump_release_kernel_object_request( const struct release_kernel_object_request *req )
  3657. {
  3658. fprintf( stderr, " manager=%04x", req->manager );
  3659. dump_uint64( ", user_ptr=", &req->user_ptr );
  3660. }
  3661. static void dump_get_kernel_object_handle_request( const struct get_kernel_object_handle_request *req )
  3662. {
  3663. fprintf( stderr, " manager=%04x", req->manager );
  3664. dump_uint64( ", user_ptr=", &req->user_ptr );
  3665. fprintf( stderr, ", access=%08x", req->access );
  3666. }
  3667. static void dump_get_kernel_object_handle_reply( const struct get_kernel_object_handle_reply *req )
  3668. {
  3669. fprintf( stderr, " handle=%04x", req->handle );
  3670. }
  3671. static void dump_make_process_system_request( const struct make_process_system_request *req )
  3672. {
  3673. fprintf( stderr, " handle=%04x", req->handle );
  3674. }
  3675. static void dump_make_process_system_reply( const struct make_process_system_reply *req )
  3676. {
  3677. fprintf( stderr, " event=%04x", req->event );
  3678. }
  3679. static void dump_get_token_info_request( const struct get_token_info_request *req )
  3680. {
  3681. fprintf( stderr, " handle=%04x", req->handle );
  3682. }
  3683. static void dump_get_token_info_reply( const struct get_token_info_reply *req )
  3684. {
  3685. dump_luid( " token_id=", &req->token_id );
  3686. dump_luid( ", modified_id=", &req->modified_id );
  3687. fprintf( stderr, ", session_id=%08x", req->session_id );
  3688. fprintf( stderr, ", primary=%d", req->primary );
  3689. fprintf( stderr, ", impersonation_level=%d", req->impersonation_level );
  3690. fprintf( stderr, ", elevation=%d", req->elevation );
  3691. fprintf( stderr, ", group_count=%d", req->group_count );
  3692. fprintf( stderr, ", privilege_count=%d", req->privilege_count );
  3693. }
  3694. static void dump_create_linked_token_request( const struct create_linked_token_request *req )
  3695. {
  3696. fprintf( stderr, " handle=%04x", req->handle );
  3697. }
  3698. static void dump_create_linked_token_reply( const struct create_linked_token_reply *req )
  3699. {
  3700. fprintf( stderr, " linked=%04x", req->linked );
  3701. }
  3702. static void dump_create_completion_request( const struct create_completion_request *req )
  3703. {
  3704. fprintf( stderr, " access=%08x", req->access );
  3705. fprintf( stderr, ", concurrent=%08x", req->concurrent );
  3706. dump_varargs_object_attributes( ", objattr=", cur_size );
  3707. }
  3708. static void dump_create_completion_reply( const struct create_completion_reply *req )
  3709. {
  3710. fprintf( stderr, " handle=%04x", req->handle );
  3711. }
  3712. static void dump_open_completion_request( const struct open_completion_request *req )
  3713. {
  3714. fprintf( stderr, " access=%08x", req->access );
  3715. fprintf( stderr, ", attributes=%08x", req->attributes );
  3716. fprintf( stderr, ", rootdir=%04x", req->rootdir );
  3717. dump_varargs_unicode_str( ", filename=", cur_size );
  3718. }
  3719. static void dump_open_completion_reply( const struct open_completion_reply *req )
  3720. {
  3721. fprintf( stderr, " handle=%04x", req->handle );
  3722. }
  3723. static void dump_add_completion_request( const struct add_completion_request *req )
  3724. {
  3725. fprintf( stderr, " handle=%04x", req->handle );
  3726. dump_uint64( ", ckey=", &req->ckey );
  3727. dump_uint64( ", cvalue=", &req->cvalue );
  3728. dump_uint64( ", information=", &req->information );
  3729. fprintf( stderr, ", status=%08x", req->status );
  3730. }
  3731. static void dump_remove_completion_request( const struct remove_completion_request *req )
  3732. {
  3733. fprintf( stderr, " handle=%04x", req->handle );
  3734. }
  3735. static void dump_remove_completion_reply( const struct remove_completion_reply *req )
  3736. {
  3737. dump_uint64( " ckey=", &req->ckey );
  3738. dump_uint64( ", cvalue=", &req->cvalue );
  3739. dump_uint64( ", information=", &req->information );
  3740. fprintf( stderr, ", status=%08x", req->status );
  3741. }
  3742. static void dump_query_completion_request( const struct query_completion_request *req )
  3743. {
  3744. fprintf( stderr, " handle=%04x", req->handle );
  3745. }
  3746. static void dump_query_completion_reply( const struct query_completion_reply *req )
  3747. {
  3748. fprintf( stderr, " depth=%08x", req->depth );
  3749. }
  3750. static void dump_set_completion_info_request( const struct set_completion_info_request *req )
  3751. {
  3752. fprintf( stderr, " handle=%04x", req->handle );
  3753. dump_uint64( ", ckey=", &req->ckey );
  3754. fprintf( stderr, ", chandle=%04x", req->chandle );
  3755. }
  3756. static void dump_add_fd_completion_request( const struct add_fd_completion_request *req )
  3757. {
  3758. fprintf( stderr, " handle=%04x", req->handle );
  3759. dump_uint64( ", cvalue=", &req->cvalue );
  3760. dump_uint64( ", information=", &req->information );
  3761. fprintf( stderr, ", status=%08x", req->status );
  3762. fprintf( stderr, ", async=%d", req->async );
  3763. }
  3764. static void dump_set_fd_completion_mode_request( const struct set_fd_completion_mode_request *req )
  3765. {
  3766. fprintf( stderr, " handle=%04x", req->handle );
  3767. fprintf( stderr, ", flags=%08x", req->flags );
  3768. }
  3769. static void dump_set_fd_disp_info_request( const struct set_fd_disp_info_request *req )
  3770. {
  3771. fprintf( stderr, " handle=%04x", req->handle );
  3772. fprintf( stderr, ", unlink=%d", req->unlink );
  3773. }
  3774. static void dump_set_fd_name_info_request( const struct set_fd_name_info_request *req )
  3775. {
  3776. fprintf( stderr, " handle=%04x", req->handle );
  3777. fprintf( stderr, ", rootdir=%04x", req->rootdir );
  3778. fprintf( stderr, ", namelen=%u", req->namelen );
  3779. fprintf( stderr, ", link=%d", req->link );
  3780. fprintf( stderr, ", replace=%d", req->replace );
  3781. dump_varargs_unicode_str( ", name=", min(cur_size,req->namelen) );
  3782. dump_varargs_string( ", filename=", cur_size );
  3783. }
  3784. static void dump_set_fd_eof_info_request( const struct set_fd_eof_info_request *req )
  3785. {
  3786. fprintf( stderr, " handle=%04x", req->handle );
  3787. dump_uint64( ", eof=", &req->eof );
  3788. }
  3789. static void dump_get_window_layered_info_request( const struct get_window_layered_info_request *req )
  3790. {
  3791. fprintf( stderr, " handle=%08x", req->handle );
  3792. }
  3793. static void dump_get_window_layered_info_reply( const struct get_window_layered_info_reply *req )
  3794. {
  3795. fprintf( stderr, " color_key=%08x", req->color_key );
  3796. fprintf( stderr, ", alpha=%08x", req->alpha );
  3797. fprintf( stderr, ", flags=%08x", req->flags );
  3798. }
  3799. static void dump_set_window_layered_info_request( const struct set_window_layered_info_request *req )
  3800. {
  3801. fprintf( stderr, " handle=%08x", req->handle );
  3802. fprintf( stderr, ", color_key=%08x", req->color_key );
  3803. fprintf( stderr, ", alpha=%08x", req->alpha );
  3804. fprintf( stderr, ", flags=%08x", req->flags );
  3805. }
  3806. static void dump_alloc_user_handle_request( const struct alloc_user_handle_request *req )
  3807. {
  3808. }
  3809. static void dump_alloc_user_handle_reply( const struct alloc_user_handle_reply *req )
  3810. {
  3811. fprintf( stderr, " handle=%08x", req->handle );
  3812. }
  3813. static void dump_free_user_handle_request( const struct free_user_handle_request *req )
  3814. {
  3815. fprintf( stderr, " handle=%08x", req->handle );
  3816. }
  3817. static void dump_set_cursor_request( const struct set_cursor_request *req )
  3818. {
  3819. fprintf( stderr, " flags=%08x", req->flags );
  3820. fprintf( stderr, ", handle=%08x", req->handle );
  3821. fprintf( stderr, ", show_count=%d", req->show_count );
  3822. fprintf( stderr, ", x=%d", req->x );
  3823. fprintf( stderr, ", y=%d", req->y );
  3824. dump_rectangle( ", clip=", &req->clip );
  3825. fprintf( stderr, ", clip_msg=%08x", req->clip_msg );
  3826. }
  3827. static void dump_set_cursor_reply( const struct set_cursor_reply *req )
  3828. {
  3829. fprintf( stderr, " prev_handle=%08x", req->prev_handle );
  3830. fprintf( stderr, ", prev_count=%d", req->prev_count );
  3831. fprintf( stderr, ", prev_x=%d", req->prev_x );
  3832. fprintf( stderr, ", prev_y=%d", req->prev_y );
  3833. fprintf( stderr, ", new_x=%d", req->new_x );
  3834. fprintf( stderr, ", new_y=%d", req->new_y );
  3835. dump_rectangle( ", new_clip=", &req->new_clip );
  3836. fprintf( stderr, ", last_change=%08x", req->last_change );
  3837. }
  3838. static void dump_get_cursor_history_request( const struct get_cursor_history_request *req )
  3839. {
  3840. }
  3841. static void dump_get_cursor_history_reply( const struct get_cursor_history_reply *req )
  3842. {
  3843. dump_varargs_cursor_positions( " history=", cur_size );
  3844. }
  3845. static void dump_get_rawinput_buffer_request( const struct get_rawinput_buffer_request *req )
  3846. {
  3847. fprintf( stderr, " rawinput_size=%u", req->rawinput_size );
  3848. fprintf( stderr, ", buffer_size=%u", req->buffer_size );
  3849. }
  3850. static void dump_get_rawinput_buffer_reply( const struct get_rawinput_buffer_reply *req )
  3851. {
  3852. fprintf( stderr, " next_size=%u", req->next_size );
  3853. fprintf( stderr, ", count=%08x", req->count );
  3854. dump_varargs_bytes( ", data=", cur_size );
  3855. }
  3856. static void dump_update_rawinput_devices_request( const struct update_rawinput_devices_request *req )
  3857. {
  3858. dump_varargs_rawinput_devices( " devices=", cur_size );
  3859. }
  3860. static void dump_get_rawinput_devices_request( const struct get_rawinput_devices_request *req )
  3861. {
  3862. }
  3863. static void dump_get_rawinput_devices_reply( const struct get_rawinput_devices_reply *req )
  3864. {
  3865. fprintf( stderr, " device_count=%08x", req->device_count );
  3866. dump_varargs_rawinput_devices( ", devices=", cur_size );
  3867. }
  3868. static void dump_create_job_request( const struct create_job_request *req )
  3869. {
  3870. fprintf( stderr, " access=%08x", req->access );
  3871. dump_varargs_object_attributes( ", objattr=", cur_size );
  3872. }
  3873. static void dump_create_job_reply( const struct create_job_reply *req )
  3874. {
  3875. fprintf( stderr, " handle=%04x", req->handle );
  3876. }
  3877. static void dump_open_job_request( const struct open_job_request *req )
  3878. {
  3879. fprintf( stderr, " access=%08x", req->access );
  3880. fprintf( stderr, ", attributes=%08x", req->attributes );
  3881. fprintf( stderr, ", rootdir=%04x", req->rootdir );
  3882. dump_varargs_unicode_str( ", name=", cur_size );
  3883. }
  3884. static void dump_open_job_reply( const struct open_job_reply *req )
  3885. {
  3886. fprintf( stderr, " handle=%04x", req->handle );
  3887. }
  3888. static void dump_assign_job_request( const struct assign_job_request *req )
  3889. {
  3890. fprintf( stderr, " job=%04x", req->job );
  3891. fprintf( stderr, ", process=%04x", req->process );
  3892. }
  3893. static void dump_process_in_job_request( const struct process_in_job_request *req )
  3894. {
  3895. fprintf( stderr, " job=%04x", req->job );
  3896. fprintf( stderr, ", process=%04x", req->process );
  3897. }
  3898. static void dump_set_job_limits_request( const struct set_job_limits_request *req )
  3899. {
  3900. fprintf( stderr, " handle=%04x", req->handle );
  3901. fprintf( stderr, ", limit_flags=%08x", req->limit_flags );
  3902. }
  3903. static void dump_set_job_completion_port_request( const struct set_job_completion_port_request *req )
  3904. {
  3905. fprintf( stderr, " job=%04x", req->job );
  3906. fprintf( stderr, ", port=%04x", req->port );
  3907. dump_uint64( ", key=", &req->key );
  3908. }
  3909. static void dump_get_job_info_request( const struct get_job_info_request *req )
  3910. {
  3911. fprintf( stderr, " handle=%04x", req->handle );
  3912. }
  3913. static void dump_get_job_info_reply( const struct get_job_info_reply *req )
  3914. {
  3915. fprintf( stderr, " total_processes=%d", req->total_processes );
  3916. fprintf( stderr, ", active_processes=%d", req->active_processes );
  3917. dump_varargs_uints( ", pids=", cur_size );
  3918. }
  3919. static void dump_terminate_job_request( const struct terminate_job_request *req )
  3920. {
  3921. fprintf( stderr, " handle=%04x", req->handle );
  3922. fprintf( stderr, ", status=%d", req->status );
  3923. }
  3924. static void dump_suspend_process_request( const struct suspend_process_request *req )
  3925. {
  3926. fprintf( stderr, " handle=%04x", req->handle );
  3927. }
  3928. static void dump_resume_process_request( const struct resume_process_request *req )
  3929. {
  3930. fprintf( stderr, " handle=%04x", req->handle );
  3931. }
  3932. static void dump_get_next_thread_request( const struct get_next_thread_request *req )
  3933. {
  3934. fprintf( stderr, " process=%04x", req->process );
  3935. fprintf( stderr, ", last=%04x", req->last );
  3936. fprintf( stderr, ", access=%08x", req->access );
  3937. fprintf( stderr, ", attributes=%08x", req->attributes );
  3938. fprintf( stderr, ", flags=%08x", req->flags );
  3939. }
  3940. static void dump_get_next_thread_reply( const struct get_next_thread_reply *req )
  3941. {
  3942. fprintf( stderr, " handle=%04x", req->handle );
  3943. }
  3944. static const dump_func req_dumpers[REQ_NB_REQUESTS] = {
  3945. (dump_func)dump_new_process_request,
  3946. (dump_func)dump_get_new_process_info_request,
  3947. (dump_func)dump_new_thread_request,
  3948. (dump_func)dump_get_startup_info_request,
  3949. (dump_func)dump_init_process_done_request,
  3950. (dump_func)dump_init_first_thread_request,
  3951. (dump_func)dump_init_thread_request,
  3952. (dump_func)dump_terminate_process_request,
  3953. (dump_func)dump_terminate_thread_request,
  3954. (dump_func)dump_get_process_info_request,
  3955. (dump_func)dump_get_process_debug_info_request,
  3956. (dump_func)dump_get_process_image_name_request,
  3957. (dump_func)dump_get_process_vm_counters_request,
  3958. (dump_func)dump_set_process_info_request,
  3959. (dump_func)dump_get_thread_info_request,
  3960. (dump_func)dump_get_thread_times_request,
  3961. (dump_func)dump_set_thread_info_request,
  3962. (dump_func)dump_suspend_thread_request,
  3963. (dump_func)dump_resume_thread_request,
  3964. (dump_func)dump_queue_apc_request,
  3965. (dump_func)dump_get_apc_result_request,
  3966. (dump_func)dump_close_handle_request,
  3967. (dump_func)dump_set_handle_info_request,
  3968. (dump_func)dump_dup_handle_request,
  3969. (dump_func)dump_compare_objects_request,
  3970. (dump_func)dump_make_temporary_request,
  3971. (dump_func)dump_open_process_request,
  3972. (dump_func)dump_open_thread_request,
  3973. (dump_func)dump_select_request,
  3974. (dump_func)dump_create_event_request,
  3975. (dump_func)dump_event_op_request,
  3976. (dump_func)dump_query_event_request,
  3977. (dump_func)dump_open_event_request,
  3978. (dump_func)dump_create_keyed_event_request,
  3979. (dump_func)dump_open_keyed_event_request,
  3980. (dump_func)dump_create_mutex_request,
  3981. (dump_func)dump_release_mutex_request,
  3982. (dump_func)dump_open_mutex_request,
  3983. (dump_func)dump_query_mutex_request,
  3984. (dump_func)dump_create_semaphore_request,
  3985. (dump_func)dump_release_semaphore_request,
  3986. (dump_func)dump_query_semaphore_request,
  3987. (dump_func)dump_open_semaphore_request,
  3988. (dump_func)dump_create_file_request,
  3989. (dump_func)dump_open_file_object_request,
  3990. (dump_func)dump_alloc_file_handle_request,
  3991. (dump_func)dump_get_handle_unix_name_request,
  3992. (dump_func)dump_get_handle_fd_request,
  3993. (dump_func)dump_get_directory_cache_entry_request,
  3994. (dump_func)dump_flush_request,
  3995. (dump_func)dump_get_file_info_request,
  3996. (dump_func)dump_get_volume_info_request,
  3997. (dump_func)dump_lock_file_request,
  3998. (dump_func)dump_unlock_file_request,
  3999. (dump_func)dump_recv_socket_request,
  4000. (dump_func)dump_send_socket_request,
  4001. (dump_func)dump_get_next_console_request_request,
  4002. (dump_func)dump_read_directory_changes_request,
  4003. (dump_func)dump_read_change_request,
  4004. (dump_func)dump_create_mapping_request,
  4005. (dump_func)dump_open_mapping_request,
  4006. (dump_func)dump_get_mapping_info_request,
  4007. (dump_func)dump_map_view_request,
  4008. (dump_func)dump_unmap_view_request,
  4009. (dump_func)dump_get_mapping_committed_range_request,
  4010. (dump_func)dump_add_mapping_committed_range_request,
  4011. (dump_func)dump_is_same_mapping_request,
  4012. (dump_func)dump_get_mapping_filename_request,
  4013. (dump_func)dump_list_processes_request,
  4014. (dump_func)dump_create_debug_obj_request,
  4015. (dump_func)dump_wait_debug_event_request,
  4016. (dump_func)dump_queue_exception_event_request,
  4017. (dump_func)dump_get_exception_status_request,
  4018. (dump_func)dump_continue_debug_event_request,
  4019. (dump_func)dump_debug_process_request,
  4020. (dump_func)dump_set_debug_obj_info_request,
  4021. (dump_func)dump_read_process_memory_request,
  4022. (dump_func)dump_write_process_memory_request,
  4023. (dump_func)dump_create_key_request,
  4024. (dump_func)dump_open_key_request,
  4025. (dump_func)dump_delete_key_request,
  4026. (dump_func)dump_flush_key_request,
  4027. (dump_func)dump_enum_key_request,
  4028. (dump_func)dump_set_key_value_request,
  4029. (dump_func)dump_get_key_value_request,
  4030. (dump_func)dump_enum_key_value_request,
  4031. (dump_func)dump_delete_key_value_request,
  4032. (dump_func)dump_load_registry_request,
  4033. (dump_func)dump_unload_registry_request,
  4034. (dump_func)dump_save_registry_request,
  4035. (dump_func)dump_set_registry_notification_request,
  4036. (dump_func)dump_create_timer_request,
  4037. (dump_func)dump_open_timer_request,
  4038. (dump_func)dump_set_timer_request,
  4039. (dump_func)dump_cancel_timer_request,
  4040. (dump_func)dump_get_timer_info_request,
  4041. (dump_func)dump_get_thread_context_request,
  4042. (dump_func)dump_set_thread_context_request,
  4043. (dump_func)dump_get_selector_entry_request,
  4044. (dump_func)dump_add_atom_request,
  4045. (dump_func)dump_delete_atom_request,
  4046. (dump_func)dump_find_atom_request,
  4047. (dump_func)dump_get_atom_information_request,
  4048. (dump_func)dump_get_msg_queue_request,
  4049. (dump_func)dump_set_queue_fd_request,
  4050. (dump_func)dump_set_queue_mask_request,
  4051. (dump_func)dump_get_queue_status_request,
  4052. (dump_func)dump_get_process_idle_event_request,
  4053. (dump_func)dump_send_message_request,
  4054. (dump_func)dump_post_quit_message_request,
  4055. (dump_func)dump_send_hardware_message_request,
  4056. (dump_func)dump_get_message_request,
  4057. (dump_func)dump_reply_message_request,
  4058. (dump_func)dump_accept_hardware_message_request,
  4059. (dump_func)dump_get_message_reply_request,
  4060. (dump_func)dump_set_win_timer_request,
  4061. (dump_func)dump_kill_win_timer_request,
  4062. (dump_func)dump_is_window_hung_request,
  4063. (dump_func)dump_get_serial_info_request,
  4064. (dump_func)dump_set_serial_info_request,
  4065. (dump_func)dump_register_async_request,
  4066. (dump_func)dump_cancel_async_request,
  4067. (dump_func)dump_get_async_result_request,
  4068. (dump_func)dump_set_async_direct_result_request,
  4069. (dump_func)dump_read_request,
  4070. (dump_func)dump_write_request,
  4071. (dump_func)dump_ioctl_request,
  4072. (dump_func)dump_set_irp_result_request,
  4073. (dump_func)dump_create_named_pipe_request,
  4074. (dump_func)dump_set_named_pipe_info_request,
  4075. (dump_func)dump_create_window_request,
  4076. (dump_func)dump_destroy_window_request,
  4077. (dump_func)dump_get_desktop_window_request,
  4078. (dump_func)dump_set_window_owner_request,
  4079. (dump_func)dump_get_window_info_request,
  4080. (dump_func)dump_set_window_info_request,
  4081. (dump_func)dump_set_parent_request,
  4082. (dump_func)dump_get_window_parents_request,
  4083. (dump_func)dump_get_window_children_request,
  4084. (dump_func)dump_get_window_children_from_point_request,
  4085. (dump_func)dump_get_window_tree_request,
  4086. (dump_func)dump_set_window_pos_request,
  4087. (dump_func)dump_get_window_rectangles_request,
  4088. (dump_func)dump_get_window_text_request,
  4089. (dump_func)dump_set_window_text_request,
  4090. (dump_func)dump_get_windows_offset_request,
  4091. (dump_func)dump_get_visible_region_request,
  4092. (dump_func)dump_get_surface_region_request,
  4093. (dump_func)dump_get_window_region_request,
  4094. (dump_func)dump_set_window_region_request,
  4095. (dump_func)dump_get_update_region_request,
  4096. (dump_func)dump_update_window_zorder_request,
  4097. (dump_func)dump_redraw_window_request,
  4098. (dump_func)dump_set_window_property_request,
  4099. (dump_func)dump_remove_window_property_request,
  4100. (dump_func)dump_get_window_property_request,
  4101. (dump_func)dump_get_window_properties_request,
  4102. (dump_func)dump_create_winstation_request,
  4103. (dump_func)dump_open_winstation_request,
  4104. (dump_func)dump_close_winstation_request,
  4105. (dump_func)dump_get_process_winstation_request,
  4106. (dump_func)dump_set_process_winstation_request,
  4107. (dump_func)dump_enum_winstation_request,
  4108. (dump_func)dump_create_desktop_request,
  4109. (dump_func)dump_open_desktop_request,
  4110. (dump_func)dump_open_input_desktop_request,
  4111. (dump_func)dump_close_desktop_request,
  4112. (dump_func)dump_get_thread_desktop_request,
  4113. (dump_func)dump_set_thread_desktop_request,
  4114. (dump_func)dump_enum_desktop_request,
  4115. (dump_func)dump_set_user_object_info_request,
  4116. (dump_func)dump_register_hotkey_request,
  4117. (dump_func)dump_unregister_hotkey_request,
  4118. (dump_func)dump_attach_thread_input_request,
  4119. (dump_func)dump_get_thread_input_request,
  4120. (dump_func)dump_get_last_input_time_request,
  4121. (dump_func)dump_get_key_state_request,
  4122. (dump_func)dump_set_key_state_request,
  4123. (dump_func)dump_set_foreground_window_request,
  4124. (dump_func)dump_set_focus_window_request,
  4125. (dump_func)dump_set_active_window_request,
  4126. (dump_func)dump_set_capture_window_request,
  4127. (dump_func)dump_set_caret_window_request,
  4128. (dump_func)dump_set_caret_info_request,
  4129. (dump_func)dump_set_hook_request,
  4130. (dump_func)dump_remove_hook_request,
  4131. (dump_func)dump_start_hook_chain_request,
  4132. (dump_func)dump_finish_hook_chain_request,
  4133. (dump_func)dump_get_hook_info_request,
  4134. (dump_func)dump_create_class_request,
  4135. (dump_func)dump_destroy_class_request,
  4136. (dump_func)dump_set_class_info_request,
  4137. (dump_func)dump_open_clipboard_request,
  4138. (dump_func)dump_close_clipboard_request,
  4139. (dump_func)dump_empty_clipboard_request,
  4140. (dump_func)dump_set_clipboard_data_request,
  4141. (dump_func)dump_get_clipboard_data_request,
  4142. (dump_func)dump_get_clipboard_formats_request,
  4143. (dump_func)dump_enum_clipboard_formats_request,
  4144. (dump_func)dump_release_clipboard_request,
  4145. (dump_func)dump_get_clipboard_info_request,
  4146. (dump_func)dump_set_clipboard_viewer_request,
  4147. (dump_func)dump_add_clipboard_listener_request,
  4148. (dump_func)dump_remove_clipboard_listener_request,
  4149. (dump_func)dump_open_token_request,
  4150. (dump_func)dump_set_global_windows_request,
  4151. (dump_func)dump_adjust_token_privileges_request,
  4152. (dump_func)dump_get_token_privileges_request,
  4153. (dump_func)dump_check_token_privileges_request,
  4154. (dump_func)dump_duplicate_token_request,
  4155. (dump_func)dump_filter_token_request,
  4156. (dump_func)dump_access_check_request,
  4157. (dump_func)dump_get_token_sid_request,
  4158. (dump_func)dump_get_token_groups_request,
  4159. (dump_func)dump_get_token_default_dacl_request,
  4160. (dump_func)dump_set_token_default_dacl_request,
  4161. (dump_func)dump_set_security_object_request,
  4162. (dump_func)dump_get_security_object_request,
  4163. (dump_func)dump_get_system_handles_request,
  4164. (dump_func)dump_create_mailslot_request,
  4165. (dump_func)dump_set_mailslot_info_request,
  4166. (dump_func)dump_create_directory_request,
  4167. (dump_func)dump_open_directory_request,
  4168. (dump_func)dump_get_directory_entries_request,
  4169. (dump_func)dump_create_symlink_request,
  4170. (dump_func)dump_open_symlink_request,
  4171. (dump_func)dump_query_symlink_request,
  4172. (dump_func)dump_get_object_info_request,
  4173. (dump_func)dump_get_object_name_request,
  4174. (dump_func)dump_get_object_type_request,
  4175. (dump_func)dump_get_object_types_request,
  4176. (dump_func)dump_allocate_locally_unique_id_request,
  4177. (dump_func)dump_create_device_manager_request,
  4178. (dump_func)dump_create_device_request,
  4179. (dump_func)dump_delete_device_request,
  4180. (dump_func)dump_get_next_device_request_request,
  4181. (dump_func)dump_get_kernel_object_ptr_request,
  4182. (dump_func)dump_set_kernel_object_ptr_request,
  4183. (dump_func)dump_grab_kernel_object_request,
  4184. (dump_func)dump_release_kernel_object_request,
  4185. (dump_func)dump_get_kernel_object_handle_request,
  4186. (dump_func)dump_make_process_system_request,
  4187. (dump_func)dump_get_token_info_request,
  4188. (dump_func)dump_create_linked_token_request,
  4189. (dump_func)dump_create_completion_request,
  4190. (dump_func)dump_open_completion_request,
  4191. (dump_func)dump_add_completion_request,
  4192. (dump_func)dump_remove_completion_request,
  4193. (dump_func)dump_query_completion_request,
  4194. (dump_func)dump_set_completion_info_request,
  4195. (dump_func)dump_add_fd_completion_request,
  4196. (dump_func)dump_set_fd_completion_mode_request,
  4197. (dump_func)dump_set_fd_disp_info_request,
  4198. (dump_func)dump_set_fd_name_info_request,
  4199. (dump_func)dump_set_fd_eof_info_request,
  4200. (dump_func)dump_get_window_layered_info_request,
  4201. (dump_func)dump_set_window_layered_info_request,
  4202. (dump_func)dump_alloc_user_handle_request,
  4203. (dump_func)dump_free_user_handle_request,
  4204. (dump_func)dump_set_cursor_request,
  4205. (dump_func)dump_get_cursor_history_request,
  4206. (dump_func)dump_get_rawinput_buffer_request,
  4207. (dump_func)dump_update_rawinput_devices_request,
  4208. (dump_func)dump_get_rawinput_devices_request,
  4209. (dump_func)dump_create_job_request,
  4210. (dump_func)dump_open_job_request,
  4211. (dump_func)dump_assign_job_request,
  4212. (dump_func)dump_process_in_job_request,
  4213. (dump_func)dump_set_job_limits_request,
  4214. (dump_func)dump_set_job_completion_port_request,
  4215. (dump_func)dump_get_job_info_request,
  4216. (dump_func)dump_terminate_job_request,
  4217. (dump_func)dump_suspend_process_request,
  4218. (dump_func)dump_resume_process_request,
  4219. (dump_func)dump_get_next_thread_request,
  4220. };
  4221. static const dump_func reply_dumpers[REQ_NB_REQUESTS] = {
  4222. (dump_func)dump_new_process_reply,
  4223. (dump_func)dump_get_new_process_info_reply,
  4224. (dump_func)dump_new_thread_reply,
  4225. (dump_func)dump_get_startup_info_reply,
  4226. (dump_func)dump_init_process_done_reply,
  4227. (dump_func)dump_init_first_thread_reply,
  4228. (dump_func)dump_init_thread_reply,
  4229. (dump_func)dump_terminate_process_reply,
  4230. (dump_func)dump_terminate_thread_reply,
  4231. (dump_func)dump_get_process_info_reply,
  4232. (dump_func)dump_get_process_debug_info_reply,
  4233. (dump_func)dump_get_process_image_name_reply,
  4234. (dump_func)dump_get_process_vm_counters_reply,
  4235. NULL,
  4236. (dump_func)dump_get_thread_info_reply,
  4237. (dump_func)dump_get_thread_times_reply,
  4238. NULL,
  4239. (dump_func)dump_suspend_thread_reply,
  4240. (dump_func)dump_resume_thread_reply,
  4241. (dump_func)dump_queue_apc_reply,
  4242. (dump_func)dump_get_apc_result_reply,
  4243. NULL,
  4244. (dump_func)dump_set_handle_info_reply,
  4245. (dump_func)dump_dup_handle_reply,
  4246. NULL,
  4247. NULL,
  4248. (dump_func)dump_open_process_reply,
  4249. (dump_func)dump_open_thread_reply,
  4250. (dump_func)dump_select_reply,
  4251. (dump_func)dump_create_event_reply,
  4252. (dump_func)dump_event_op_reply,
  4253. (dump_func)dump_query_event_reply,
  4254. (dump_func)dump_open_event_reply,
  4255. (dump_func)dump_create_keyed_event_reply,
  4256. (dump_func)dump_open_keyed_event_reply,
  4257. (dump_func)dump_create_mutex_reply,
  4258. (dump_func)dump_release_mutex_reply,
  4259. (dump_func)dump_open_mutex_reply,
  4260. (dump_func)dump_query_mutex_reply,
  4261. (dump_func)dump_create_semaphore_reply,
  4262. (dump_func)dump_release_semaphore_reply,
  4263. (dump_func)dump_query_semaphore_reply,
  4264. (dump_func)dump_open_semaphore_reply,
  4265. (dump_func)dump_create_file_reply,
  4266. (dump_func)dump_open_file_object_reply,
  4267. (dump_func)dump_alloc_file_handle_reply,
  4268. (dump_func)dump_get_handle_unix_name_reply,
  4269. (dump_func)dump_get_handle_fd_reply,
  4270. (dump_func)dump_get_directory_cache_entry_reply,
  4271. (dump_func)dump_flush_reply,
  4272. (dump_func)dump_get_file_info_reply,
  4273. (dump_func)dump_get_volume_info_reply,
  4274. (dump_func)dump_lock_file_reply,
  4275. NULL,
  4276. (dump_func)dump_recv_socket_reply,
  4277. (dump_func)dump_send_socket_reply,
  4278. (dump_func)dump_get_next_console_request_reply,
  4279. NULL,
  4280. (dump_func)dump_read_change_reply,
  4281. (dump_func)dump_create_mapping_reply,
  4282. (dump_func)dump_open_mapping_reply,
  4283. (dump_func)dump_get_mapping_info_reply,
  4284. NULL,
  4285. NULL,
  4286. (dump_func)dump_get_mapping_committed_range_reply,
  4287. NULL,
  4288. NULL,
  4289. (dump_func)dump_get_mapping_filename_reply,
  4290. (dump_func)dump_list_processes_reply,
  4291. (dump_func)dump_create_debug_obj_reply,
  4292. (dump_func)dump_wait_debug_event_reply,
  4293. (dump_func)dump_queue_exception_event_reply,
  4294. NULL,
  4295. NULL,
  4296. NULL,
  4297. NULL,
  4298. (dump_func)dump_read_process_memory_reply,
  4299. NULL,
  4300. (dump_func)dump_create_key_reply,
  4301. (dump_func)dump_open_key_reply,
  4302. NULL,
  4303. NULL,
  4304. (dump_func)dump_enum_key_reply,
  4305. NULL,
  4306. (dump_func)dump_get_key_value_reply,
  4307. (dump_func)dump_enum_key_value_reply,
  4308. NULL,
  4309. NULL,
  4310. NULL,
  4311. NULL,
  4312. NULL,
  4313. (dump_func)dump_create_timer_reply,
  4314. (dump_func)dump_open_timer_reply,
  4315. (dump_func)dump_set_timer_reply,
  4316. (dump_func)dump_cancel_timer_reply,
  4317. (dump_func)dump_get_timer_info_reply,
  4318. (dump_func)dump_get_thread_context_reply,
  4319. (dump_func)dump_set_thread_context_reply,
  4320. (dump_func)dump_get_selector_entry_reply,
  4321. (dump_func)dump_add_atom_reply,
  4322. NULL,
  4323. (dump_func)dump_find_atom_reply,
  4324. (dump_func)dump_get_atom_information_reply,
  4325. (dump_func)dump_get_msg_queue_reply,
  4326. NULL,
  4327. (dump_func)dump_set_queue_mask_reply,
  4328. (dump_func)dump_get_queue_status_reply,
  4329. (dump_func)dump_get_process_idle_event_reply,
  4330. NULL,
  4331. NULL,
  4332. (dump_func)dump_send_hardware_message_reply,
  4333. (dump_func)dump_get_message_reply,
  4334. NULL,
  4335. NULL,
  4336. (dump_func)dump_get_message_reply_reply,
  4337. (dump_func)dump_set_win_timer_reply,
  4338. NULL,
  4339. (dump_func)dump_is_window_hung_reply,
  4340. (dump_func)dump_get_serial_info_reply,
  4341. NULL,
  4342. NULL,
  4343. NULL,
  4344. (dump_func)dump_get_async_result_reply,
  4345. (dump_func)dump_set_async_direct_result_reply,
  4346. (dump_func)dump_read_reply,
  4347. (dump_func)dump_write_reply,
  4348. (dump_func)dump_ioctl_reply,
  4349. NULL,
  4350. (dump_func)dump_create_named_pipe_reply,
  4351. NULL,
  4352. (dump_func)dump_create_window_reply,
  4353. NULL,
  4354. (dump_func)dump_get_desktop_window_reply,
  4355. (dump_func)dump_set_window_owner_reply,
  4356. (dump_func)dump_get_window_info_reply,
  4357. (dump_func)dump_set_window_info_reply,
  4358. (dump_func)dump_set_parent_reply,
  4359. (dump_func)dump_get_window_parents_reply,
  4360. (dump_func)dump_get_window_children_reply,
  4361. (dump_func)dump_get_window_children_from_point_reply,
  4362. (dump_func)dump_get_window_tree_reply,
  4363. (dump_func)dump_set_window_pos_reply,
  4364. (dump_func)dump_get_window_rectangles_reply,
  4365. (dump_func)dump_get_window_text_reply,
  4366. NULL,
  4367. (dump_func)dump_get_windows_offset_reply,
  4368. (dump_func)dump_get_visible_region_reply,
  4369. (dump_func)dump_get_surface_region_reply,
  4370. (dump_func)dump_get_window_region_reply,
  4371. NULL,
  4372. (dump_func)dump_get_update_region_reply,
  4373. NULL,
  4374. NULL,
  4375. NULL,
  4376. (dump_func)dump_remove_window_property_reply,
  4377. (dump_func)dump_get_window_property_reply,
  4378. (dump_func)dump_get_window_properties_reply,
  4379. (dump_func)dump_create_winstation_reply,
  4380. (dump_func)dump_open_winstation_reply,
  4381. NULL,
  4382. (dump_func)dump_get_process_winstation_reply,
  4383. NULL,
  4384. (dump_func)dump_enum_winstation_reply,
  4385. (dump_func)dump_create_desktop_reply,
  4386. (dump_func)dump_open_desktop_reply,
  4387. (dump_func)dump_open_input_desktop_reply,
  4388. NULL,
  4389. (dump_func)dump_get_thread_desktop_reply,
  4390. NULL,
  4391. (dump_func)dump_enum_desktop_reply,
  4392. (dump_func)dump_set_user_object_info_reply,
  4393. (dump_func)dump_register_hotkey_reply,
  4394. (dump_func)dump_unregister_hotkey_reply,
  4395. NULL,
  4396. (dump_func)dump_get_thread_input_reply,
  4397. (dump_func)dump_get_last_input_time_reply,
  4398. (dump_func)dump_get_key_state_reply,
  4399. NULL,
  4400. (dump_func)dump_set_foreground_window_reply,
  4401. (dump_func)dump_set_focus_window_reply,
  4402. (dump_func)dump_set_active_window_reply,
  4403. (dump_func)dump_set_capture_window_reply,
  4404. (dump_func)dump_set_caret_window_reply,
  4405. (dump_func)dump_set_caret_info_reply,
  4406. (dump_func)dump_set_hook_reply,
  4407. (dump_func)dump_remove_hook_reply,
  4408. (dump_func)dump_start_hook_chain_reply,
  4409. NULL,
  4410. (dump_func)dump_get_hook_info_reply,
  4411. (dump_func)dump_create_class_reply,
  4412. (dump_func)dump_destroy_class_reply,
  4413. (dump_func)dump_set_class_info_reply,
  4414. (dump_func)dump_open_clipboard_reply,
  4415. (dump_func)dump_close_clipboard_reply,
  4416. NULL,
  4417. (dump_func)dump_set_clipboard_data_reply,
  4418. (dump_func)dump_get_clipboard_data_reply,
  4419. (dump_func)dump_get_clipboard_formats_reply,
  4420. (dump_func)dump_enum_clipboard_formats_reply,
  4421. (dump_func)dump_release_clipboard_reply,
  4422. (dump_func)dump_get_clipboard_info_reply,
  4423. (dump_func)dump_set_clipboard_viewer_reply,
  4424. NULL,
  4425. NULL,
  4426. (dump_func)dump_open_token_reply,
  4427. (dump_func)dump_set_global_windows_reply,
  4428. (dump_func)dump_adjust_token_privileges_reply,
  4429. (dump_func)dump_get_token_privileges_reply,
  4430. (dump_func)dump_check_token_privileges_reply,
  4431. (dump_func)dump_duplicate_token_reply,
  4432. (dump_func)dump_filter_token_reply,
  4433. (dump_func)dump_access_check_reply,
  4434. (dump_func)dump_get_token_sid_reply,
  4435. (dump_func)dump_get_token_groups_reply,
  4436. (dump_func)dump_get_token_default_dacl_reply,
  4437. NULL,
  4438. NULL,
  4439. (dump_func)dump_get_security_object_reply,
  4440. (dump_func)dump_get_system_handles_reply,
  4441. (dump_func)dump_create_mailslot_reply,
  4442. (dump_func)dump_set_mailslot_info_reply,
  4443. (dump_func)dump_create_directory_reply,
  4444. (dump_func)dump_open_directory_reply,
  4445. (dump_func)dump_get_directory_entries_reply,
  4446. (dump_func)dump_create_symlink_reply,
  4447. (dump_func)dump_open_symlink_reply,
  4448. (dump_func)dump_query_symlink_reply,
  4449. (dump_func)dump_get_object_info_reply,
  4450. (dump_func)dump_get_object_name_reply,
  4451. (dump_func)dump_get_object_type_reply,
  4452. (dump_func)dump_get_object_types_reply,
  4453. (dump_func)dump_allocate_locally_unique_id_reply,
  4454. (dump_func)dump_create_device_manager_reply,
  4455. NULL,
  4456. NULL,
  4457. (dump_func)dump_get_next_device_request_reply,
  4458. (dump_func)dump_get_kernel_object_ptr_reply,
  4459. NULL,
  4460. NULL,
  4461. NULL,
  4462. (dump_func)dump_get_kernel_object_handle_reply,
  4463. (dump_func)dump_make_process_system_reply,
  4464. (dump_func)dump_get_token_info_reply,
  4465. (dump_func)dump_create_linked_token_reply,
  4466. (dump_func)dump_create_completion_reply,
  4467. (dump_func)dump_open_completion_reply,
  4468. NULL,
  4469. (dump_func)dump_remove_completion_reply,
  4470. (dump_func)dump_query_completion_reply,
  4471. NULL,
  4472. NULL,
  4473. NULL,
  4474. NULL,
  4475. NULL,
  4476. NULL,
  4477. (dump_func)dump_get_window_layered_info_reply,
  4478. NULL,
  4479. (dump_func)dump_alloc_user_handle_reply,
  4480. NULL,
  4481. (dump_func)dump_set_cursor_reply,
  4482. (dump_func)dump_get_cursor_history_reply,
  4483. (dump_func)dump_get_rawinput_buffer_reply,
  4484. NULL,
  4485. (dump_func)dump_get_rawinput_devices_reply,
  4486. (dump_func)dump_create_job_reply,
  4487. (dump_func)dump_open_job_reply,
  4488. NULL,
  4489. NULL,
  4490. NULL,
  4491. NULL,
  4492. (dump_func)dump_get_job_info_reply,
  4493. NULL,
  4494. NULL,
  4495. NULL,
  4496. (dump_func)dump_get_next_thread_reply,
  4497. };
  4498. static const char * const req_names[REQ_NB_REQUESTS] = {
  4499. "new_process",
  4500. "get_new_process_info",
  4501. "new_thread",
  4502. "get_startup_info",
  4503. "init_process_done",
  4504. "init_first_thread",
  4505. "init_thread",
  4506. "terminate_process",
  4507. "terminate_thread",
  4508. "get_process_info",
  4509. "get_process_debug_info",
  4510. "get_process_image_name",
  4511. "get_process_vm_counters",
  4512. "set_process_info",
  4513. "get_thread_info",
  4514. "get_thread_times",
  4515. "set_thread_info",
  4516. "suspend_thread",
  4517. "resume_thread",
  4518. "queue_apc",
  4519. "get_apc_result",
  4520. "close_handle",
  4521. "set_handle_info",
  4522. "dup_handle",
  4523. "compare_objects",
  4524. "make_temporary",
  4525. "open_process",
  4526. "open_thread",
  4527. "select",
  4528. "create_event",
  4529. "event_op",
  4530. "query_event",
  4531. "open_event",
  4532. "create_keyed_event",
  4533. "open_keyed_event",
  4534. "create_mutex",
  4535. "release_mutex",
  4536. "open_mutex",
  4537. "query_mutex",
  4538. "create_semaphore",
  4539. "release_semaphore",
  4540. "query_semaphore",
  4541. "open_semaphore",
  4542. "create_file",
  4543. "open_file_object",
  4544. "alloc_file_handle",
  4545. "get_handle_unix_name",
  4546. "get_handle_fd",
  4547. "get_directory_cache_entry",
  4548. "flush",
  4549. "get_file_info",
  4550. "get_volume_info",
  4551. "lock_file",
  4552. "unlock_file",
  4553. "recv_socket",
  4554. "send_socket",
  4555. "get_next_console_request",
  4556. "read_directory_changes",
  4557. "read_change",
  4558. "create_mapping",
  4559. "open_mapping",
  4560. "get_mapping_info",
  4561. "map_view",
  4562. "unmap_view",
  4563. "get_mapping_committed_range",
  4564. "add_mapping_committed_range",
  4565. "is_same_mapping",
  4566. "get_mapping_filename",
  4567. "list_processes",
  4568. "create_debug_obj",
  4569. "wait_debug_event",
  4570. "queue_exception_event",
  4571. "get_exception_status",
  4572. "continue_debug_event",
  4573. "debug_process",
  4574. "set_debug_obj_info",
  4575. "read_process_memory",
  4576. "write_process_memory",
  4577. "create_key",
  4578. "open_key",
  4579. "delete_key",
  4580. "flush_key",
  4581. "enum_key",
  4582. "set_key_value",
  4583. "get_key_value",
  4584. "enum_key_value",
  4585. "delete_key_value",
  4586. "load_registry",
  4587. "unload_registry",
  4588. "save_registry",
  4589. "set_registry_notification",
  4590. "create_timer",
  4591. "open_timer",
  4592. "set_timer",
  4593. "cancel_timer",
  4594. "get_timer_info",
  4595. "get_thread_context",
  4596. "set_thread_context",
  4597. "get_selector_entry",
  4598. "add_atom",
  4599. "delete_atom",
  4600. "find_atom",
  4601. "get_atom_information",
  4602. "get_msg_queue",
  4603. "set_queue_fd",
  4604. "set_queue_mask",
  4605. "get_queue_status",
  4606. "get_process_idle_event",
  4607. "send_message",
  4608. "post_quit_message",
  4609. "send_hardware_message",
  4610. "get_message",
  4611. "reply_message",
  4612. "accept_hardware_message",
  4613. "get_message_reply",
  4614. "set_win_timer",
  4615. "kill_win_timer",
  4616. "is_window_hung",
  4617. "get_serial_info",
  4618. "set_serial_info",
  4619. "register_async",
  4620. "cancel_async",
  4621. "get_async_result",
  4622. "set_async_direct_result",
  4623. "read",
  4624. "write",
  4625. "ioctl",
  4626. "set_irp_result",
  4627. "create_named_pipe",
  4628. "set_named_pipe_info",
  4629. "create_window",
  4630. "destroy_window",
  4631. "get_desktop_window",
  4632. "set_window_owner",
  4633. "get_window_info",
  4634. "set_window_info",
  4635. "set_parent",
  4636. "get_window_parents",
  4637. "get_window_children",
  4638. "get_window_children_from_point",
  4639. "get_window_tree",
  4640. "set_window_pos",
  4641. "get_window_rectangles",
  4642. "get_window_text",
  4643. "set_window_text",
  4644. "get_windows_offset",
  4645. "get_visible_region",
  4646. "get_surface_region",
  4647. "get_window_region",
  4648. "set_window_region",
  4649. "get_update_region",
  4650. "update_window_zorder",
  4651. "redraw_window",
  4652. "set_window_property",
  4653. "remove_window_property",
  4654. "get_window_property",
  4655. "get_window_properties",
  4656. "create_winstation",
  4657. "open_winstation",
  4658. "close_winstation",
  4659. "get_process_winstation",
  4660. "set_process_winstation",
  4661. "enum_winstation",
  4662. "create_desktop",
  4663. "open_desktop",
  4664. "open_input_desktop",
  4665. "close_desktop",
  4666. "get_thread_desktop",
  4667. "set_thread_desktop",
  4668. "enum_desktop",
  4669. "set_user_object_info",
  4670. "register_hotkey",
  4671. "unregister_hotkey",
  4672. "attach_thread_input",
  4673. "get_thread_input",
  4674. "get_last_input_time",
  4675. "get_key_state",
  4676. "set_key_state",
  4677. "set_foreground_window",
  4678. "set_focus_window",
  4679. "set_active_window",
  4680. "set_capture_window",
  4681. "set_caret_window",
  4682. "set_caret_info",
  4683. "set_hook",
  4684. "remove_hook",
  4685. "start_hook_chain",
  4686. "finish_hook_chain",
  4687. "get_hook_info",
  4688. "create_class",
  4689. "destroy_class",
  4690. "set_class_info",
  4691. "open_clipboard",
  4692. "close_clipboard",
  4693. "empty_clipboard",
  4694. "set_clipboard_data",
  4695. "get_clipboard_data",
  4696. "get_clipboard_formats",
  4697. "enum_clipboard_formats",
  4698. "release_clipboard",
  4699. "get_clipboard_info",
  4700. "set_clipboard_viewer",
  4701. "add_clipboard_listener",
  4702. "remove_clipboard_listener",
  4703. "open_token",
  4704. "set_global_windows",
  4705. "adjust_token_privileges",
  4706. "get_token_privileges",
  4707. "check_token_privileges",
  4708. "duplicate_token",
  4709. "filter_token",
  4710. "access_check",
  4711. "get_token_sid",
  4712. "get_token_groups",
  4713. "get_token_default_dacl",
  4714. "set_token_default_dacl",
  4715. "set_security_object",
  4716. "get_security_object",
  4717. "get_system_handles",
  4718. "create_mailslot",
  4719. "set_mailslot_info",
  4720. "create_directory",
  4721. "open_directory",
  4722. "get_directory_entries",
  4723. "create_symlink",
  4724. "open_symlink",
  4725. "query_symlink",
  4726. "get_object_info",
  4727. "get_object_name",
  4728. "get_object_type",
  4729. "get_object_types",
  4730. "allocate_locally_unique_id",
  4731. "create_device_manager",
  4732. "create_device",
  4733. "delete_device",
  4734. "get_next_device_request",
  4735. "get_kernel_object_ptr",
  4736. "set_kernel_object_ptr",
  4737. "grab_kernel_object",
  4738. "release_kernel_object",
  4739. "get_kernel_object_handle",
  4740. "make_process_system",
  4741. "get_token_info",
  4742. "create_linked_token",
  4743. "create_completion",
  4744. "open_completion",
  4745. "add_completion",
  4746. "remove_completion",
  4747. "query_completion",
  4748. "set_completion_info",
  4749. "add_fd_completion",
  4750. "set_fd_completion_mode",
  4751. "set_fd_disp_info",
  4752. "set_fd_name_info",
  4753. "set_fd_eof_info",
  4754. "get_window_layered_info",
  4755. "set_window_layered_info",
  4756. "alloc_user_handle",
  4757. "free_user_handle",
  4758. "set_cursor",
  4759. "get_cursor_history",
  4760. "get_rawinput_buffer",
  4761. "update_rawinput_devices",
  4762. "get_rawinput_devices",
  4763. "create_job",
  4764. "open_job",
  4765. "assign_job",
  4766. "process_in_job",
  4767. "set_job_limits",
  4768. "set_job_completion_port",
  4769. "get_job_info",
  4770. "terminate_job",
  4771. "suspend_process",
  4772. "resume_process",
  4773. "get_next_thread",
  4774. };
  4775. static const struct
  4776. {
  4777. const char *name;
  4778. unsigned int value;
  4779. } status_names[] =
  4780. {
  4781. { "ABANDONED_WAIT_0", STATUS_ABANDONED_WAIT_0 },
  4782. { "ACCESS_DENIED", STATUS_ACCESS_DENIED },
  4783. { "ACCESS_VIOLATION", STATUS_ACCESS_VIOLATION },
  4784. { "ADDRESS_ALREADY_ASSOCIATED", STATUS_ADDRESS_ALREADY_ASSOCIATED },
  4785. { "ALERTED", STATUS_ALERTED },
  4786. { "BAD_DEVICE_TYPE", STATUS_BAD_DEVICE_TYPE },
  4787. { "BAD_IMPERSONATION_LEVEL", STATUS_BAD_IMPERSONATION_LEVEL },
  4788. { "BUFFER_OVERFLOW", STATUS_BUFFER_OVERFLOW },
  4789. { "BUFFER_TOO_SMALL", STATUS_BUFFER_TOO_SMALL },
  4790. { "CANCELLED", STATUS_CANCELLED },
  4791. { "CANNOT_DELETE", STATUS_CANNOT_DELETE },
  4792. { "CANT_OPEN_ANONYMOUS", STATUS_CANT_OPEN_ANONYMOUS },
  4793. { "CHILD_MUST_BE_VOLATILE", STATUS_CHILD_MUST_BE_VOLATILE },
  4794. { "CONNECTION_ABORTED", STATUS_CONNECTION_ABORTED },
  4795. { "CONNECTION_ACTIVE", STATUS_CONNECTION_ACTIVE },
  4796. { "CONNECTION_REFUSED", STATUS_CONNECTION_REFUSED },
  4797. { "CONNECTION_RESET", STATUS_CONNECTION_RESET },
  4798. { "DEBUGGER_INACTIVE", STATUS_DEBUGGER_INACTIVE },
  4799. { "DEVICE_BUSY", STATUS_DEVICE_BUSY },
  4800. { "DEVICE_NOT_READY", STATUS_DEVICE_NOT_READY },
  4801. { "DIRECTORY_NOT_EMPTY", STATUS_DIRECTORY_NOT_EMPTY },
  4802. { "DISK_FULL", STATUS_DISK_FULL },
  4803. { "DLL_NOT_FOUND", STATUS_DLL_NOT_FOUND },
  4804. { "ERROR_CLASS_ALREADY_EXISTS", 0xc0010000 | ERROR_CLASS_ALREADY_EXISTS },
  4805. { "ERROR_CLASS_DOES_NOT_EXIST", 0xc0010000 | ERROR_CLASS_DOES_NOT_EXIST },
  4806. { "ERROR_CLASS_HAS_WINDOWS", 0xc0010000 | ERROR_CLASS_HAS_WINDOWS },
  4807. { "ERROR_CLIPBOARD_NOT_OPEN", 0xc0010000 | ERROR_CLIPBOARD_NOT_OPEN },
  4808. { "ERROR_HOTKEY_ALREADY_REGISTERED", 0xc0010000 | ERROR_HOTKEY_ALREADY_REGISTERED },
  4809. { "ERROR_HOTKEY_NOT_REGISTERED", 0xc0010000 | ERROR_HOTKEY_NOT_REGISTERED },
  4810. { "ERROR_INVALID_CURSOR_HANDLE", 0xc0010000 | ERROR_INVALID_CURSOR_HANDLE },
  4811. { "ERROR_INVALID_INDEX", 0xc0010000 | ERROR_INVALID_INDEX },
  4812. { "ERROR_INVALID_WINDOW_HANDLE", 0xc0010000 | ERROR_INVALID_WINDOW_HANDLE },
  4813. { "ERROR_NO_MORE_USER_HANDLES", 0xc0010000 | ERROR_NO_MORE_USER_HANDLES },
  4814. { "ERROR_WINDOW_OF_OTHER_THREAD", 0xc0010000 | ERROR_WINDOW_OF_OTHER_THREAD },
  4815. { "FILE_DELETED", STATUS_FILE_DELETED },
  4816. { "FILE_INVALID", STATUS_FILE_INVALID },
  4817. { "FILE_IS_A_DIRECTORY", STATUS_FILE_IS_A_DIRECTORY },
  4818. { "FILE_LOCK_CONFLICT", STATUS_FILE_LOCK_CONFLICT },
  4819. { "GENERIC_NOT_MAPPED", STATUS_GENERIC_NOT_MAPPED },
  4820. { "HANDLES_CLOSED", STATUS_HANDLES_CLOSED },
  4821. { "HANDLE_NOT_CLOSABLE", STATUS_HANDLE_NOT_CLOSABLE },
  4822. { "HOST_UNREACHABLE", STATUS_HOST_UNREACHABLE },
  4823. { "ILLEGAL_FUNCTION", STATUS_ILLEGAL_FUNCTION },
  4824. { "IMAGE_NOT_AT_BASE", STATUS_IMAGE_NOT_AT_BASE },
  4825. { "INFO_LENGTH_MISMATCH", STATUS_INFO_LENGTH_MISMATCH },
  4826. { "INSTANCE_NOT_AVAILABLE", STATUS_INSTANCE_NOT_AVAILABLE },
  4827. { "INSUFFICIENT_RESOURCES", STATUS_INSUFFICIENT_RESOURCES },
  4828. { "INVALID_ACL", STATUS_INVALID_ACL },
  4829. { "INVALID_ADDRESS", STATUS_INVALID_ADDRESS },
  4830. { "INVALID_ADDRESS_COMPONENT", STATUS_INVALID_ADDRESS_COMPONENT },
  4831. { "INVALID_CID", STATUS_INVALID_CID },
  4832. { "INVALID_CONNECTION", STATUS_INVALID_CONNECTION },
  4833. { "INVALID_DEVICE_REQUEST", STATUS_INVALID_DEVICE_REQUEST },
  4834. { "INVALID_FILE_FOR_SECTION", STATUS_INVALID_FILE_FOR_SECTION },
  4835. { "INVALID_HANDLE", STATUS_INVALID_HANDLE },
  4836. { "INVALID_IMAGE_FORMAT", STATUS_INVALID_IMAGE_FORMAT },
  4837. { "INVALID_IMAGE_NE_FORMAT", STATUS_INVALID_IMAGE_NE_FORMAT },
  4838. { "INVALID_IMAGE_NOT_MZ", STATUS_INVALID_IMAGE_NOT_MZ },
  4839. { "INVALID_IMAGE_PROTECT", STATUS_INVALID_IMAGE_PROTECT },
  4840. { "INVALID_IMAGE_WIN_16", STATUS_INVALID_IMAGE_WIN_16 },
  4841. { "INVALID_IMAGE_WIN_64", STATUS_INVALID_IMAGE_WIN_64 },
  4842. { "INVALID_LOCK_SEQUENCE", STATUS_INVALID_LOCK_SEQUENCE },
  4843. { "INVALID_OWNER", STATUS_INVALID_OWNER },
  4844. { "INVALID_PARAMETER", STATUS_INVALID_PARAMETER },
  4845. { "INVALID_PIPE_STATE", STATUS_INVALID_PIPE_STATE },
  4846. { "INVALID_READ_MODE", STATUS_INVALID_READ_MODE },
  4847. { "INVALID_SECURITY_DESCR", STATUS_INVALID_SECURITY_DESCR },
  4848. { "IO_TIMEOUT", STATUS_IO_TIMEOUT },
  4849. { "KERNEL_APC", STATUS_KERNEL_APC },
  4850. { "KEY_DELETED", STATUS_KEY_DELETED },
  4851. { "MAPPED_FILE_SIZE_ZERO", STATUS_MAPPED_FILE_SIZE_ZERO },
  4852. { "MUTANT_NOT_OWNED", STATUS_MUTANT_NOT_OWNED },
  4853. { "NAME_TOO_LONG", STATUS_NAME_TOO_LONG },
  4854. { "NETWORK_BUSY", STATUS_NETWORK_BUSY },
  4855. { "NETWORK_UNREACHABLE", STATUS_NETWORK_UNREACHABLE },
  4856. { "NOT_ALL_ASSIGNED", STATUS_NOT_ALL_ASSIGNED },
  4857. { "NOT_A_DIRECTORY", STATUS_NOT_A_DIRECTORY },
  4858. { "NOT_FOUND", STATUS_NOT_FOUND },
  4859. { "NOT_IMPLEMENTED", STATUS_NOT_IMPLEMENTED },
  4860. { "NOT_MAPPED_VIEW", STATUS_NOT_MAPPED_VIEW },
  4861. { "NOT_REGISTRY_FILE", STATUS_NOT_REGISTRY_FILE },
  4862. { "NOT_SAME_DEVICE", STATUS_NOT_SAME_DEVICE },
  4863. { "NOT_SAME_OBJECT", STATUS_NOT_SAME_OBJECT },
  4864. { "NOT_SUPPORTED", STATUS_NOT_SUPPORTED },
  4865. { "NO_DATA_DETECTED", STATUS_NO_DATA_DETECTED },
  4866. { "NO_IMPERSONATION_TOKEN", STATUS_NO_IMPERSONATION_TOKEN },
  4867. { "NO_MEMORY", STATUS_NO_MEMORY },
  4868. { "NO_MORE_ENTRIES", STATUS_NO_MORE_ENTRIES },
  4869. { "NO_SUCH_DEVICE", STATUS_NO_SUCH_DEVICE },
  4870. { "NO_SUCH_FILE", STATUS_NO_SUCH_FILE },
  4871. { "NO_TOKEN", STATUS_NO_TOKEN },
  4872. { "OBJECT_NAME_COLLISION", STATUS_OBJECT_NAME_COLLISION },
  4873. { "OBJECT_NAME_EXISTS", STATUS_OBJECT_NAME_EXISTS },
  4874. { "OBJECT_NAME_INVALID", STATUS_OBJECT_NAME_INVALID },
  4875. { "OBJECT_NAME_NOT_FOUND", STATUS_OBJECT_NAME_NOT_FOUND },
  4876. { "OBJECT_PATH_INVALID", STATUS_OBJECT_PATH_INVALID },
  4877. { "OBJECT_PATH_NOT_FOUND", STATUS_OBJECT_PATH_NOT_FOUND },
  4878. { "OBJECT_PATH_SYNTAX_BAD", STATUS_OBJECT_PATH_SYNTAX_BAD },
  4879. { "OBJECT_TYPE_MISMATCH", STATUS_OBJECT_TYPE_MISMATCH },
  4880. { "PENDING", STATUS_PENDING },
  4881. { "PIPE_BROKEN", STATUS_PIPE_BROKEN },
  4882. { "PIPE_BUSY", STATUS_PIPE_BUSY },
  4883. { "PIPE_CLOSING", STATUS_PIPE_CLOSING },
  4884. { "PIPE_CONNECTED", STATUS_PIPE_CONNECTED },
  4885. { "PIPE_DISCONNECTED", STATUS_PIPE_DISCONNECTED },
  4886. { "PIPE_EMPTY", STATUS_PIPE_EMPTY },
  4887. { "PIPE_LISTENING", STATUS_PIPE_LISTENING },
  4888. { "PIPE_NOT_AVAILABLE", STATUS_PIPE_NOT_AVAILABLE },
  4889. { "PORT_NOT_SET", STATUS_PORT_NOT_SET },
  4890. { "PREDEFINED_HANDLE", STATUS_PREDEFINED_HANDLE },
  4891. { "PRIVILEGE_NOT_HELD", STATUS_PRIVILEGE_NOT_HELD },
  4892. { "PROCESS_IN_JOB", STATUS_PROCESS_IN_JOB },
  4893. { "PROCESS_IS_TERMINATING", STATUS_PROCESS_IS_TERMINATING },
  4894. { "PROCESS_NOT_IN_JOB", STATUS_PROCESS_NOT_IN_JOB },
  4895. { "REPARSE_POINT_NOT_RESOLVED", STATUS_REPARSE_POINT_NOT_RESOLVED },
  4896. { "SECTION_TOO_BIG", STATUS_SECTION_TOO_BIG },
  4897. { "SEMAPHORE_LIMIT_EXCEEDED", STATUS_SEMAPHORE_LIMIT_EXCEEDED },
  4898. { "SHARING_VIOLATION", STATUS_SHARING_VIOLATION },
  4899. { "SHUTDOWN_IN_PROGRESS", STATUS_SHUTDOWN_IN_PROGRESS },
  4900. { "SUSPEND_COUNT_EXCEEDED", STATUS_SUSPEND_COUNT_EXCEEDED },
  4901. { "THREAD_IS_TERMINATING", STATUS_THREAD_IS_TERMINATING },
  4902. { "TIMEOUT", STATUS_TIMEOUT },
  4903. { "TOO_MANY_OPENED_FILES", STATUS_TOO_MANY_OPENED_FILES },
  4904. { "UNSUCCESSFUL", STATUS_UNSUCCESSFUL },
  4905. { "USER_APC", STATUS_USER_APC },
  4906. { "USER_MAPPED_FILE", STATUS_USER_MAPPED_FILE },
  4907. { "VOLUME_DISMOUNTED", STATUS_VOLUME_DISMOUNTED },
  4908. { "WAS_LOCKED", STATUS_WAS_LOCKED },
  4909. { "WSAEACCES", 0xc0010000 | WSAEACCES },
  4910. { "WSAEADDRINUSE", 0xc0010000 | WSAEADDRINUSE },
  4911. { "WSAEADDRNOTAVAIL", 0xc0010000 | WSAEADDRNOTAVAIL },
  4912. { "WSAEAFNOSUPPORT", 0xc0010000 | WSAEAFNOSUPPORT },
  4913. { "WSAEALREADY", 0xc0010000 | WSAEALREADY },
  4914. { "WSAEBADF", 0xc0010000 | WSAEBADF },
  4915. { "WSAECONNABORTED", 0xc0010000 | WSAECONNABORTED },
  4916. { "WSAECONNREFUSED", 0xc0010000 | WSAECONNREFUSED },
  4917. { "WSAECONNRESET", 0xc0010000 | WSAECONNRESET },
  4918. { "WSAEDESTADDRREQ", 0xc0010000 | WSAEDESTADDRREQ },
  4919. { "WSAEDQUOT", 0xc0010000 | WSAEDQUOT },
  4920. { "WSAEFAULT", 0xc0010000 | WSAEFAULT },
  4921. { "WSAEHOSTDOWN", 0xc0010000 | WSAEHOSTDOWN },
  4922. { "WSAEHOSTUNREACH", 0xc0010000 | WSAEHOSTUNREACH },
  4923. { "WSAEINTR", 0xc0010000 | WSAEINTR },
  4924. { "WSAEINVAL", 0xc0010000 | WSAEINVAL },
  4925. { "WSAEISCONN", 0xc0010000 | WSAEISCONN },
  4926. { "WSAELOOP", 0xc0010000 | WSAELOOP },
  4927. { "WSAEMFILE", 0xc0010000 | WSAEMFILE },
  4928. { "WSAEMSGSIZE", 0xc0010000 | WSAEMSGSIZE },
  4929. { "WSAENAMETOOLONG", 0xc0010000 | WSAENAMETOOLONG },
  4930. { "WSAENETDOWN", 0xc0010000 | WSAENETDOWN },
  4931. { "WSAENETRESET", 0xc0010000 | WSAENETRESET },
  4932. { "WSAENETUNREACH", 0xc0010000 | WSAENETUNREACH },
  4933. { "WSAENOBUFS", 0xc0010000 | WSAENOBUFS },
  4934. { "WSAENOPROTOOPT", 0xc0010000 | WSAENOPROTOOPT },
  4935. { "WSAENOTCONN", 0xc0010000 | WSAENOTCONN },
  4936. { "WSAENOTEMPTY", 0xc0010000 | WSAENOTEMPTY },
  4937. { "WSAENOTSOCK", 0xc0010000 | WSAENOTSOCK },
  4938. { "WSAEOPNOTSUPP", 0xc0010000 | WSAEOPNOTSUPP },
  4939. { "WSAEPFNOSUPPORT", 0xc0010000 | WSAEPFNOSUPPORT },
  4940. { "WSAEPROCLIM", 0xc0010000 | WSAEPROCLIM },
  4941. { "WSAEPROTONOSUPPORT", 0xc0010000 | WSAEPROTONOSUPPORT },
  4942. { "WSAEPROTOTYPE", 0xc0010000 | WSAEPROTOTYPE },
  4943. { "WSAEREMOTE", 0xc0010000 | WSAEREMOTE },
  4944. { "WSAESHUTDOWN", 0xc0010000 | WSAESHUTDOWN },
  4945. { "WSAESOCKTNOSUPPORT", 0xc0010000 | WSAESOCKTNOSUPPORT },
  4946. { "WSAESTALE", 0xc0010000 | WSAESTALE },
  4947. { "WSAETIMEDOUT", 0xc0010000 | WSAETIMEDOUT },
  4948. { "WSAETOOMANYREFS", 0xc0010000 | WSAETOOMANYREFS },
  4949. { "WSAEUSERS", 0xc0010000 | WSAEUSERS },
  4950. { "WSAEWOULDBLOCK", 0xc0010000 | WSAEWOULDBLOCK },
  4951. { NULL, 0 }
  4952. };
  4953. /* ### make_requests end ### */
  4954. /* Everything above this line is generated automatically by tools/make_requests */
  4955. static const char *get_status_name( unsigned int status )
  4956. {
  4957. int i;
  4958. static char buffer[10];
  4959. if (status)
  4960. {
  4961. for (i = 0; status_names[i].name; i++)
  4962. if (status_names[i].value == status) return status_names[i].name;
  4963. }
  4964. sprintf( buffer, "%x", status );
  4965. return buffer;
  4966. }
  4967. void trace_request(void)
  4968. {
  4969. enum request req = current->req.request_header.req;
  4970. if (req < REQ_NB_REQUESTS)
  4971. {
  4972. fprintf( stderr, "%04x: %s(", current->id, req_names[req] );
  4973. if (req_dumpers[req])
  4974. {
  4975. cur_data = get_req_data();
  4976. cur_size = get_req_data_size();
  4977. req_dumpers[req]( &current->req );
  4978. }
  4979. fprintf( stderr, " )\n" );
  4980. }
  4981. else fprintf( stderr, "%04x: %d(?)\n", current->id, req );
  4982. }
  4983. void trace_reply( enum request req, const union generic_reply *reply )
  4984. {
  4985. if (req < REQ_NB_REQUESTS)
  4986. {
  4987. fprintf( stderr, "%04x: %s() = %s",
  4988. current->id, req_names[req], get_status_name(current->error) );
  4989. if (reply_dumpers[req])
  4990. {
  4991. fprintf( stderr, " {" );
  4992. cur_data = current->reply_data;
  4993. cur_size = reply->reply_header.reply_size;
  4994. reply_dumpers[req]( reply );
  4995. fprintf( stderr, " }" );
  4996. }
  4997. fputc( '\n', stderr );
  4998. }
  4999. else fprintf( stderr, "%04x: %d() = %s\n",
  5000. current->id, req, get_status_name(current->error) );
  5001. }