add supplementary log of reply type
authorHeebum Kwak <heebum0.kwak@samsung.com>
Thu, 23 May 2013 08:35:48 +0000 (17:35 +0900)
committerBoram Park <boram1288.park@samsung.com>
Mon, 17 Jun 2013 08:44:34 +0000 (17:44 +0900)
Change-Id: I102d38a00730ce84519104177c661fd0c811f224

20 files changed:
bin/xevlog_analyze/xevlog_analyze.c
common/Makefile.am
common/ds/bool_exp_rule_checker.c
common/xdbg_evlog.c
common/xdbg_evlog.h
common/xdbg_evlog_composite.c
common/xdbg_evlog_core.c
common/xdbg_evlog_core.h
common/xdbg_evlog_damage.c
common/xdbg_evlog_dri2.c
common/xdbg_evlog_gesture.c
common/xdbg_evlog_randr.c
common/xdbg_evlog_reply.c [new file with mode: 0644]
common/xdbg_evlog_reply.h [new file with mode: 0644]
common/xdbg_evlog_xext.c
common/xdbg_evlog_xinput.c
common/xdbg_evlog_xv.c
common/xdbg_types.h
module/xdbg_module_command.c
module/xdbg_module_evlog.c

index 01e45cb..f52998d 100644 (file)
@@ -188,7 +188,7 @@ static void _xEvlogAnalyzePrint (EvlogOption *eo, char* reply, int* len)
 
         read_len = read (fd, &evinfo.type, sizeof (EvlogType));
         GOTO_IF_FAIL (read_len == sizeof (EvlogType), print_done);
-        GOTO_IF_FAIL (evinfo.type >= EVENT && evinfo.type <= FLUSH, print_done);
+        GOTO_IF_FAIL (evinfo.type >= EVENT && evinfo.type <= ERROR, print_done);
         total += read_len;
 
         read_len = read (fd, &evinfo.mask, sizeof (int));
@@ -232,6 +232,29 @@ static void _xEvlogAnalyzePrint (EvlogOption *eo, char* reply, int* len)
             total += read_len;
         }
 
+        if (evinfo.mask & EVLOG_MASK_REPLY)
+        {
+            read_len = read (fd, &evinfo.rep, sizeof(EvlogReply));
+            GOTO_IF_FAIL (read_len == sizeof(EvlogReply), print_done);
+            total += read_len;
+
+            evinfo.rep.ptr = malloc (evinfo.rep.size);
+            GOTO_IF_FAIL (evinfo.rep.ptr != NULL, print_done);
+
+            WARNING_IF_FAIL (evinfo.rep.size > 0);
+
+            read_len = read (fd, evinfo.rep.ptr, evinfo.rep.size);
+            GOTO_IF_FAIL (read_len == evinfo.rep.size, print_done);
+            total += read_len;
+        }
+
+        if (evinfo.mask & EVLOG_MASK_ERROR)
+        {
+            read_len = read (fd, &evinfo.err, sizeof(EvlogError));
+            GOTO_IF_FAIL (read_len == sizeof(EvlogError), print_done);
+            total += read_len;
+        }
+
         if (evinfo.mask & EVLOG_MASK_ATOM)
         {
             EvlogAtomTable *table;
@@ -438,7 +461,7 @@ _checkOption(int argc, char** argv)
                     if(opt_str_len > 0)
                     {
                         int   fd = -1;
-                        char  fs[1024];
+                        char  fs[8096];
                         char *pfs;
                         int   len;
 
index 4168875..2473a4a 100644 (file)
@@ -36,6 +36,7 @@ COMMON_SOURCE =  \
     xdbg_evlog_xinput.c \
     xdbg_evlog_xv.c \
     xdbg_evlog_event.c \
+    xdbg_evlog_reply.c \
     ds/bintree.c \
     ds/bool_exp_parser.c \
     ds/bool_exp_rule_checker.c \
index ae4de01..761a430 100644 (file)
@@ -205,6 +205,8 @@ static int validate_func (BINARY_TREE tree, BINARY_TREE_NODE node, BINARY_TREE_N
                 type_string = "REPLY";
             else if (args->type == 3)
                 type_string = "FLUSH";
+            else if (args->type == 4)
+                type_string = "ERROR";
             else
             {
                 fprintf (stderr, "Invalid type %d\n", args->type);
index 7e9f86e..e65be54 100644 (file)
@@ -52,8 +52,8 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #include "dix.h"
 #endif
 
-static char *evt_type[] = { "Event", "Request", "Reply", "Flush" };
-static char *evt_dir[]  = { "<====", "---->",   "<----", "*****" };
+static char *evt_type[] = { "Event", "Request", "Reply", "Flush", "Error" };
+static char *evt_dir[]  = { "<====", "---->",   "<----", "*****", "<----"};
 
 static RULE_CHECKER rc = NULL;
 
@@ -140,8 +140,18 @@ xDbgEvlogRuleSet (const int argc, const char **argv, char *reply, int *len)
         _mergeArgs (rule, argc - 2, &(argv[2]));
 
         for (i = 0 ; i < strlen(rule) ; i++)
+        {
+            static int apply = 0;
             if(rule[i] == '\"' || rule[i] == '\'')
                 rule[i] = ' ';
+            if(rule[i] == '+')
+            {
+                rule[i] = ' ';
+                if (apply == 0)
+                   strcat(rule, "|| type=reply || type=error");
+                apply = 1;
+            }
+        }
 
         result = rulechecker_add_rule (rc, policy_type, rule);
         if (result == RC_ERR_TOO_MANY_RULES)
@@ -229,6 +239,8 @@ xDbgEvlogRuleValidate (EvlogInfo *evinfo)
         evlog_name = evinfo->req.name;
     else if (evinfo->type == EVENT)
         evlog_name = evinfo->evt.name;
+    else if (evinfo ->type == REPLY)
+        evlog_name = evinfo->rep.name;
 
     return rulechecker_validate_rule (rc,
                                       evinfo->type,
@@ -240,17 +252,18 @@ xDbgEvlogRuleValidate (EvlogInfo *evinfo)
 
 
 ExtensionInfo Evlog_extensions[] = {
-    {xDbgEvlogCompositeGetBase, 0, 0, 0, NULL},
-    {xDbgEvlogDamageGetBase, 0, 0, 0, NULL},
-    {xDbgEvlogDri2GetBase, 0, 0, 0, NULL},
-    {xDbgEvlogGestureGetBase, 0, 0, 0, NULL},
-    {xDbgEvlogRandrGetBase, 0, 0, 0, NULL},
-    {xDbgEvlogXextDpmsGetBase, 0, 0, 0, NULL},
-    {xDbgEvlogXextShmGetBase, 0, 0, 0, NULL},
-    {xDbgEvlogXextSyncGetBase, 0, 0, 0, NULL},
-    {xDbgEvlogXextXtestGetBase, 0, 0, 0, NULL},
-    {xDbgEvlogXextXtestExt1GetBase, 0, 0, 0, NULL},
-    {xDbgEvlogXvGetBase, 0, 0, 0, NULL}
+    {xDbgEvlogCompositeGetBase, 0, 0, 0, NULL, NULL},
+    {xDbgEvlogDamageGetBase, 0, 0, 0, NULL, NULL},
+    {xDbgEvlogDri2GetBase, 0, 0, 0, NULL, NULL},
+    {xDbgEvlogGestureGetBase, 0, 0, 0, NULL, NULL},
+    {xDbgEvlogXinputGetBase, 0, 0, 0, NULL, NULL},
+    {xDbgEvlogRandrGetBase, 0, 0, 0, NULL, NULL},
+    {xDbgEvlogXextDpmsGetBase, 0, 0, 0, NULL, NULL},
+    {xDbgEvlogXextShmGetBase, 0, 0, 0, NULL, NULL},
+    {xDbgEvlogXextSyncGetBase, 0, 0, 0, NULL, NULL},
+    {xDbgEvlogXextXtestGetBase, 0, 0, 0, NULL, NULL},
+    {xDbgEvlogXextXtestExt1GetBase, 0, 0, 0, NULL, NULL},
+    {xDbgEvlogXvGetBase, 0, 0, 0, NULL, NULL}
 };
 ExtensionInfo* Sorted_Evlog_extensions;
 int Extensions_size = 0;
@@ -330,14 +343,22 @@ xDbgEvlogFillLog (EvlogInfo *evinfo, Bool on, char *reply, int *len)
     RETURN_IF_FAIL (evinfo->type >= 0 && (sizeof (evt_dir) / sizeof (char*)));
     RETURN_IF_FAIL (evinfo->type >= 0 && (sizeof (evt_type) / sizeof (char*)));
 
-    REPLY ("[%10.3f][%5ld] %22s(%2d:%5d) %s %7s ",
-                evinfo->time / 1000.0,
-                evinfo->time - prev,
-                xDbgEvlogGetCmd (evinfo->client.command),
-                evinfo->client.index,
-                evinfo->client.pid,
-                evt_dir[evinfo->type],
-                evt_type[evinfo->type]);
+    if (evinfo->type == REPLY && !evinfo->rep.isStart)
+    {
+        if (on) // detail option is on
+            REPLY ("%67s"," ");
+        else
+            return;
+    }
+    else
+        REPLY ("[%10.3f][%5ld] %22s(%2d:%5d) %s %7s ",
+                    evinfo->time / 1000.0,
+                    evinfo->time - prev,
+                    xDbgEvlogGetCmd (evinfo->client.command),
+                    evinfo->client.index,
+                    evinfo->client.pid,
+                    evt_dir[evinfo->type],
+                    evt_type[evinfo->type]);
 
     if (evinfo->type == REQUEST)
     {
@@ -352,6 +373,20 @@ xDbgEvlogFillLog (EvlogInfo *evinfo, Bool on, char *reply, int *len)
         reply = xDbgEvlogEvent (evinfo, on, reply, len);
         REPLY (")");
     }
+    else if (evinfo->type == REPLY)
+    {
+        REPLY ("(");
+        reply = xDbgEvlogReply (evinfo, on, reply, len);
+        REPLY (")");
+    }
+    else if (evinfo->type == ERROR)
+    {
+        REPLY("(ErrorCode(0x%02x) resourceID(0x%lx) majorCode(%d) minorCode(%d))",
+            evinfo->err.errorCode,
+            evinfo->err.resourceID,
+            evinfo->err.majorCode,
+            evinfo->err.minorCode);
+    }
     else
     {
         const char *evlog_name = "";
@@ -359,6 +394,8 @@ xDbgEvlogFillLog (EvlogInfo *evinfo, Bool on, char *reply, int *len)
             evlog_name = evinfo->req.name;
         else if (evinfo->type == EVENT)
             evlog_name = evinfo->evt.name;
+        else if (evinfo->type == REPLY)
+            evlog_name = evinfo->rep.name;
         REPLY ("(%s)", evlog_name);
     }
 
index 6d851a8..83cd8ad 100644 (file)
@@ -35,6 +35,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #include "xdbg_types.h"
 #include "xdbg_evlog_request.h"
 #include "xdbg_evlog_event.h"
+#include "xdbg_evlog_reply.h"
 
 #include "xdbg_evlog_core.h"
 #include "xdbg_evlog_dri2.h"
index ea5ae5d..dda4a9f 100644 (file)
@@ -137,6 +137,22 @@ _EvlogEventComposite (EvlogInfo *evinfo, int first_base, char *reply, int *len)
     return reply;
 }
 
+static char *
+_EvlogReplyComposite (EvlogInfo *evinfo, char *reply, int *len)
+{
+#if 0
+    xGenericReply *rep = evinfo->rep.ptr;
+
+    switch (evinfo->rep.reqData)
+    {
+
+    default:
+            break;
+    }
+
+#endif
+    return reply;
+}
 
 void
 xDbgEvlogCompositeGetBase (ExtensionInfo *extinfo)
@@ -146,6 +162,7 @@ xDbgEvlogCompositeGetBase (ExtensionInfo *extinfo)
 
     extinfo->req_func = _EvlogRequestComposite;
     extinfo->evt_func = _EvlogEventComposite;
+    extinfo->rep_func = _EvlogReplyComposite;
 #else
     ExtensionEntry *xext = CheckExtension (COMPOSITE_NAME);
     RETURN_IF_FAIL (xext != NULL);
@@ -156,5 +173,6 @@ xDbgEvlogCompositeGetBase (ExtensionInfo *extinfo)
     extinfo->err_base = xext->errorBase;
     extinfo->req_func = _EvlogRequestComposite;
     extinfo->evt_func = _EvlogEventComposite;
+    extinfo->rep_func = _EvlogReplyComposite;
 #endif
 }
index 1288ee7..685438a 100644 (file)
@@ -154,6 +154,21 @@ char * xDbgEvlogRequestCore (EvlogInfo *evinfo, char *reply, int *len)
             return reply;
         }
 
+    case X_GetProperty:
+        {
+            xGetPropertyReq *stuff = (xGetPropertyReq *)req;
+
+            REPLY (": XID(0x%lx)",
+                stuff->window);
+
+            REPLY (" Property");
+            reply = xDbgGetAtom(stuff->property, evinfo, reply, len);
+            REPLY (" Type");
+            reply = xDbgGetAtom(stuff->type, evinfo, reply, len);
+
+            return reply;
+        }
+
     case X_SetSelectionOwner:
         {
             xSetSelectionOwnerReq *stuff = (xSetSelectionOwnerReq *)req;
@@ -530,6 +545,7 @@ char * xDbgEvlogRequestCore (EvlogInfo *evinfo, char *reply, int *len)
             return reply;
         }
 
+    case X_ListProperties:
     case X_DestroyWindow:
     case X_DestroySubwindows:
     case X_MapWindow:
@@ -557,7 +573,6 @@ char * xDbgEvlogRequestCore (EvlogInfo *evinfo, char *reply, int *len)
     return reply;
 }
 
-
 char * xDbgEvlogEventCore (EvlogInfo *evinfo, char *reply, int *len)
 {
     xEvent *evt = evinfo->evt.ptr;
@@ -853,3 +868,176 @@ char * xDbgEvlogEventCore (EvlogInfo *evinfo, char *reply, int *len)
 
     return reply;
 }
+
+char * xDbgEvlogReplyCore (EvlogInfo *evinfo, char *reply, int *len)
+{
+    xGenericReply *rep = evinfo->rep.ptr;
+
+    switch (evinfo->rep.reqType)
+    {
+    case X_GetGeometry:
+        {
+            if (evinfo->rep.isStart)
+            {
+                xGetGeometryReply *stuff = (xGetGeometryReply *)rep;
+
+                REPLY (": XID(0x%lx) coord(%d,%d %dx%d) borderWidth(%d)",
+                    stuff->root,
+                    stuff->x,
+                    stuff->y,
+                    stuff->width,
+                    stuff->height,
+                    stuff->borderWidth);
+            }
+            else
+            {
+                return reply;
+            }
+
+            return reply;
+        }
+
+    case X_QueryTree:
+        {
+            if (evinfo->rep.isStart)
+            {
+                xQueryTreeReply *stuff = (xQueryTreeReply *)rep;
+
+                REPLY (": XID(0x%lx) Parent(0x%lx) ChildrenNum(%d)",
+                    stuff->root,
+                    stuff->parent,
+                    stuff->nChildren);
+            }
+            else
+            {
+                Window *stuff = (Window *)rep;
+                int i;
+
+                REPLY ("childIDs");
+                REPLY ("(");
+                for (i = 0 ; i < evinfo->rep.size / sizeof(Window) ; i++)
+                {
+                    REPLY("0x%lx", stuff[i]);
+                    if(i != evinfo->rep.size / sizeof(Window) - 1)
+                        REPLY (", ");
+                }
+                REPLY (")");
+            }
+
+            return reply;
+        }
+
+    case X_GetProperty:
+        {
+            if (evinfo->rep.isStart)
+            {
+                xGetPropertyReply *stuff = (xGetPropertyReply *)rep;
+
+                REPLY (": PropertyType");
+                reply = xDbgGetAtom(stuff->propertyType, evinfo, reply, len);
+
+                REPLY (" bytesAfter(0x%lx) ItemNum(%ld)",
+                    stuff->bytesAfter,
+                    stuff->nItems);
+            }
+            else
+            {
+                return reply;
+            }
+
+
+            return reply;
+        }
+
+    case X_ListProperties:
+        {
+            if (evinfo->rep.isStart)
+            {
+                xListPropertiesReply *stuff = (xListPropertiesReply *)rep;
+
+                REPLY (" PropertieNum(%d)",
+                    stuff->nProperties);
+            }
+            else
+            {
+                Atom *stuff = (Atom *)rep;
+                int i;
+
+                REPLY ("Properties");
+                REPLY ("(");
+                for (i = 0 ; i < evinfo->rep.size / sizeof(Atom) ; i ++)
+                {
+                    reply = xDbgGetAtom(stuff[i], evinfo, reply, len);
+                    if(i != evinfo->rep.size / sizeof(Atom) - 1)
+                        REPLY (", ");
+                }
+                REPLY (")");
+            }
+
+
+
+            return reply;
+        }
+
+    case X_GetImage:
+        {
+            if (evinfo->rep.isStart)
+            {
+                xGetImageReply *stuff = (xGetImageReply *)rep;
+
+                REPLY (": XID(0x%lx)",
+                    stuff->visual);
+            }
+            else
+            {
+                return reply;
+            }
+
+            return reply;
+        }
+
+    case X_GetKeyboardControl:
+        {
+            if (evinfo->rep.isStart)
+            {
+                xGetKeyboardControlReply *stuff = (xGetKeyboardControlReply *)rep;
+
+                REPLY (": keyClickPercent(%d) bellPercent(%d), bellPitch(%d) bellDuration(%d)",
+                    stuff->keyClickPercent,
+                    stuff->bellPercent,
+                    stuff->bellPitch,
+                    stuff->bellDuration);
+            }
+            else
+            {
+                return reply;
+            }
+
+            return reply;
+        }
+
+    case X_GetPointerControl:
+        {
+            if (evinfo->rep.isStart)
+            {
+                xGetPointerControlReply *stuff = (xGetPointerControlReply *)rep;
+
+                REPLY (": accelNumerator(%d) accelDenominator(%d), threshold(%d)",
+                    stuff->accelNumerator,
+                    stuff->accelDenominator,
+                    stuff->threshold);
+            }
+            else
+            {
+                return reply;
+            }
+
+            return reply;
+        }
+
+    default:
+        break;
+    }
+
+    return reply;
+}
index 6b44b91..c828235 100644 (file)
@@ -35,6 +35,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #include "xdbg_types.h"
 
 char * xDbgEvlogRequestCore (EvlogInfo *evinfo, char *reply, int *len);
+char * xDbgEvlogReplyCore      (EvlogInfo *evinfo, char *reply, int *len);
 char * xDbgEvlogEventCore     (EvlogInfo *evinfo, char *reply, int *len);
 
 #endif
index f991163..517fcf3 100644 (file)
@@ -125,6 +125,22 @@ _EvlogEventDamage (EvlogInfo *evinfo, int first_base, char *reply, int *len)
     return reply;
 }
 
+static char *
+_EvlogReplyDamage (EvlogInfo *evinfo, char *reply, int *len)
+{
+#if 0
+    xGenericReply *rep = evinfo->rep.ptr;
+
+    switch (evinfo->rep.reqData)
+    {
+
+    default:
+            break;
+    }
+#endif
+    return reply;
+}
+
 void
 xDbgEvlogDamageGetBase (ExtensionInfo *extinfo)
 {
@@ -133,6 +149,7 @@ xDbgEvlogDamageGetBase (ExtensionInfo *extinfo)
 
     extinfo->req_func = _EvlogRequestDamage;
     extinfo->evt_func = _EvlogEventDamage;
+    extinfo->rep_func = _EvlogReplyDamage;
 #else
     ExtensionEntry *xext = CheckExtension (DAMAGE_NAME);
     RETURN_IF_FAIL (xext != NULL);
@@ -143,5 +160,6 @@ xDbgEvlogDamageGetBase (ExtensionInfo *extinfo)
     extinfo->err_base = xext->errorBase;
     extinfo->req_func = _EvlogRequestDamage;
     extinfo->evt_func = _EvlogEventDamage;
+    extinfo->rep_func = _EvlogReplyDamage;
 #endif
 }
index f91aca8..535e970 100644 (file)
@@ -204,7 +204,60 @@ _EvlogEventDri2 (EvlogInfo *evinfo, int first_base, char *reply, int *len)
     return reply;
 }
 
+static char *
+_EvlogReplyDri2 (EvlogInfo *evinfo, char *reply, int *len)
+{
+    xGenericReply *rep = evinfo->rep.ptr;
+
+    switch (evinfo->rep.reqData)
+    {
+    case X_DRI2GetBuffers:
+        {
+            if (evinfo->rep.isStart)
+            {
+                xDRI2GetBuffersReply *stuff = (xDRI2GetBuffersReply *)rep;
+                REPLY (": size(%ldx%ld) Count(%ld)",
+                    stuff->width,
+                    stuff->height,
+                    stuff->count);
+            }
+            else
+            {
+                xDRI2Buffer *stuff = (xDRI2Buffer *)rep;
+
+                REPLY ("attachment(0x%lx) Name(0x%lx) pitch(0x%lx) cpp(0x%lx)",
+                    stuff->attachment,
+                    stuff->name,
+                    stuff->pitch,
+                    stuff->cpp);
+            }
 
+            return reply;
+        }
+
+    case X_DRI2SwapBuffers:
+        {
+            if (evinfo->rep.isStart)
+            {
+                xDRI2SwapBuffersReply *stuff = (xDRI2SwapBuffersReply *)rep;
+                REPLY (": swap(%ld/%ld)",
+                    stuff->swap_hi,
+                    stuff->swap_lo);
+            }
+            else
+            {
+                return reply;
+            }
+
+            return reply;
+        }
+
+    default:
+            break;
+    }
+
+    return reply;
+}
 
 void
 xDbgEvlogDri2GetBase (ExtensionInfo *extinfo)
@@ -214,6 +267,7 @@ xDbgEvlogDri2GetBase (ExtensionInfo *extinfo)
 
     extinfo->req_func = _EvlogRequestDri2;
     extinfo->evt_func = _EvlogEventDri2;
+    extinfo->rep_func = _EvlogReplyDri2;
 #else
     ExtensionEntry *xext = CheckExtension (DRI2_NAME);
     RETURN_IF_FAIL (xext != NULL);
@@ -224,5 +278,6 @@ xDbgEvlogDri2GetBase (ExtensionInfo *extinfo)
     extinfo->err_base = xext->errorBase;
     extinfo->req_func = _EvlogRequestDri2;
     extinfo->evt_func = _EvlogEventDri2;
+    extinfo->rep_func = _EvlogReplyDri2;
 #endif
 }
index 6ef524e..2552f29 100644 (file)
@@ -217,6 +217,21 @@ _EvlogEventGesture (EvlogInfo *evinfo, int first_base, char *reply, int *len)
     return reply;
 }
 
+static char *
+_EvlogReplyGesture (EvlogInfo *evinfo, char *reply, int *len)
+{
+#if 0
+    xGenericReply *rep = evinfo->rep.ptr;
+
+    switch (evinfo->rep.reqData)
+    {
+
+    default:
+            break;
+    }
+#endif
+    return reply;
+}
 
 void
 xDbgEvlogGestureGetBase (ExtensionInfo *extinfo)
@@ -226,6 +241,7 @@ xDbgEvlogGestureGetBase (ExtensionInfo *extinfo)
 
     extinfo->req_func = _EvlogRequestGesture;
     extinfo->evt_func = _EvlogEventGesture;
+    extinfo->rep_func = _EvlogReplyGesture;
 #else
     ExtensionEntry *xext = CheckExtension (GESTURE_EXT_NAME);
     RETURN_IF_FAIL (xext != NULL);
@@ -236,5 +252,6 @@ xDbgEvlogGestureGetBase (ExtensionInfo *extinfo)
     extinfo->err_base = xext->errorBase;
     extinfo->req_func = _EvlogRequestGesture;
     extinfo->evt_func = _EvlogEventGesture;
+    extinfo->rep_func = _EvlogReplyGesture;
 #endif
 }
index cc24009..d62ed7c 100644 (file)
@@ -333,6 +333,364 @@ _EvlogEventRandr (EvlogInfo *evinfo, int first_base, char *reply, int *len)
     return reply;
 }
 
+static char *
+_EvlogReplyRandr (EvlogInfo *evinfo, char *reply, int *len)
+{
+    xGenericReply *rep = evinfo->rep.ptr;
+
+    switch (evinfo->rep.reqData)
+    {
+        case X_RRGetScreenSizeRange:
+        {
+            if (evinfo->rep.isStart)
+            {
+                xRRGetScreenSizeRangeReply *stuff = (xRRGetScreenSizeRangeReply *)rep;
+                REPLY (": minSize(%dx%d) maxSize(%dx%d)",
+                    stuff->minWidth,
+                    stuff->minHeight,
+                    stuff->maxWidth,
+                    stuff->maxHeight);
+            }
+            else
+            {
+                return reply;
+            }
+
+            return reply;
+        }
+
+        case X_RRGetScreenResources:
+        {
+            static int nCrtcs, nOutputs, nModes, nbytesNames;
+
+            if (evinfo->rep.isStart)
+            {
+                xRRGetScreenResourcesReply *stuff = (xRRGetScreenResourcesReply *)rep;
+                REPLY (": Timestamp(%ldms) ConfigTimestamp(%ldms) nCrtcs(%d) nOutputs(%d) nModes(%d) nbytesNames(%d)",
+                    stuff->timestamp,
+                    stuff->configTimestamp,
+                    stuff->nCrtcs,
+                    stuff->nOutputs,
+                    stuff->nModes,
+                    stuff->nbytesNames);
+
+                nCrtcs = stuff->nCrtcs;
+                nOutputs = stuff->nOutputs;
+                nModes = stuff->nModes;
+                nbytesNames = stuff->nbytesNames;
+            }
+            else
+            {
+                RRCrtc *crtcs = (RRCrtc *)rep;
+                RROutput *outputs = (RROutput *)(crtcs + nCrtcs);
+                xRRModeInfo *modeinfos = (xRRModeInfo *)(outputs + nOutputs);
+                CARD8 *names = (CARD8 *)(modeinfos + nModes);
+                char temp[64] = {0, };
+                int i;
+
+                REPLY ("Crtcs");
+                REPLY ("(");
+                for (i = 0 ; i < nCrtcs ; i++)
+                {
+                    REPLY ("0x%lx", crtcs[i]);
+                    if(i != nCrtcs - 1)
+                        REPLY (", ");
+                }
+                REPLY (")");
+
+                REPLY (" Outputs");
+                REPLY ("(");
+                for (i = 0 ; i < nOutputs ; i++)
+                {
+                    REPLY ("0x%lx", outputs[i]);
+                    if(i != nOutputs - 1)
+                        REPLY (", ");
+                }
+                REPLY (")");
+
+                REPLY (" Modes");
+                REPLY ("(");
+                for (i = 0 ; i < nModes ; i++)
+                {
+                    REPLY ("0x%lx %dx%d", modeinfos[i].id, modeinfos[i].width, modeinfos[i].height);
+                    if(i != nModes - 1)
+                        REPLY (", ");
+                }
+                REPLY (")");
+
+                REPLY (" Names");
+
+                strncpy (temp, (char *)names, nbytesNames);
+
+                REPLY ("(");
+                REPLY ("%s", temp);
+                REPLY (")");
+
+            }
+
+            return reply;
+        }
+
+        case X_RRGetOutputInfo:
+        {
+            static int nCrtcs, nModes, nPreferred, nClones;
+            if (evinfo->rep.isStart)
+            {
+                xRRGetOutputInfoReply *stuff = (xRRGetOutputInfoReply *)rep;
+                REPLY (": Timestamp(%ldms) Crtc(0x%lx) mmSize(%ldx%ld) nCrtcs(%d) nModes(%d) nPreferred(%d) nClones(%d)",
+                    stuff->timestamp,
+                    stuff->crtc,
+                    stuff->mmWidth,
+                    stuff->mmHeight,
+                    stuff->nCrtcs,
+                    stuff->nModes,
+                    stuff->nPreferred,
+                    stuff->nClones);
+
+                nCrtcs = stuff->nCrtcs;
+                nModes = stuff->nModes;
+                nPreferred = stuff->nPreferred;
+                nClones = stuff->nClones;
+            }
+            else
+            {
+                RRCrtc *crtcs = (RRCrtc *) rep;
+                RRMode *modes = (RRMode *) (crtcs + nCrtcs);
+                RROutput *clones = (RROutput *) (modes + nModes);
+                char *name = (char *) (clones + nClones);
+                int i;
+
+                REPLY ("Crtcs");
+                REPLY ("(");
+                for (i = 0 ; i < nCrtcs ; i++)
+                {
+                    REPLY ("0x%lx", crtcs[i]);
+                    if(i != nCrtcs - 1)
+                        REPLY (", ");
+                }
+                REPLY (")");
+
+                REPLY (" Modes");
+                REPLY ("(");
+                for (i = 0 ; i < nModes ; i++)
+                {
+                    REPLY ("0x%lx", modes[i]);
+                    if(i != nModes - 1)
+                        REPLY (", ");
+                }
+                REPLY (")");
+
+                REPLY (" Clone");
+                REPLY ("(");
+                for (i = 0 ; i < nClones ; i++)
+                {
+                    REPLY ("0x%lx", clones[i]);
+                    if(i != nClones - 1)
+                        REPLY (", ");
+                }
+                REPLY (")");
+
+                REPLY (" Name");
+                REPLY ("(");
+                REPLY ("%s", name);
+                REPLY (")");
+            }
+
+            return reply;
+        }
+
+        case X_RRListOutputProperties:
+        {
+            if (evinfo->rep.isStart)
+            {
+                xRRListOutputPropertiesReply *stuff = (xRRListOutputPropertiesReply *)rep;
+                REPLY (": nAtoms(%d)",
+                    stuff->nAtoms);
+            }
+            else
+            {
+                Atom *stuff = (Atom *)rep;
+                int i;
+
+                REPLY ("Properties:");
+                for (i = 0 ; i < evinfo->rep.size / sizeof(Atom) ; i++)
+                {
+                    reply = xDbgGetAtom(stuff[i], evinfo, reply, len);
+                    if(i != evinfo->rep.size / sizeof(Atom) - 1)
+                        REPLY (", ");
+                }
+            }
+
+            return reply;
+        }
+
+        case X_RRGetOutputProperty:
+        {
+            if (evinfo->rep.isStart)
+            {
+                xRRGetOutputPropertyReply *stuff = (xRRGetOutputPropertyReply *)rep;
+                REPLY (": Atoms");
+                reply = xDbgGetAtom(stuff->propertyType, evinfo, reply, len);
+
+                REPLY (" bytesAfter(%ld) nItems(%ld)",
+                    stuff->bytesAfter,
+                    stuff->nItems);
+            }
+            else
+            {
+                return reply;
+            }
+
+            return reply;
+        }
+
+        case X_RRGetCrtcInfo:
+        {
+            static int nOutput, nPossibleOutput;
+
+            if (evinfo->rep.isStart)
+            {
+                xRRGetCrtcInfoReply *stuff = (xRRGetCrtcInfoReply *)rep;
+                REPLY (" Timestamp(%ldms) coord(%d,%d %dx%d) RRmode(0x%lx) rot(%d) rots(%d) nOutput(%d) nPossibleOutput(%d)",
+                    stuff->timestamp,
+                    stuff->x,
+                    stuff->y,
+                    stuff->width,
+                    stuff->height,
+                    stuff->mode,
+                    stuff->rotation,
+                    stuff->rotations,
+                    stuff->nOutput,
+                    stuff->nPossibleOutput);
+
+                nOutput = stuff->nOutput;
+                nPossibleOutput = stuff->nPossibleOutput;
+            }
+            else
+            {
+                RROutput *outputs = (RROutput *) rep;
+                RROutput *possible = (RROutput *) (outputs + nOutput);
+                int i;
+
+                REPLY ("Outputs");
+                REPLY ("(");
+                for (i = 0 ; i < nOutput ; i++)
+                {
+                    REPLY ("0x%lx", outputs[i]);
+                    if(i != nOutput - 1)
+                        REPLY (", ");
+                }
+                REPLY (")");
+
+                REPLY (" Possible");
+                REPLY ("(");
+                for (i = 0 ; i < nPossibleOutput ; i++)
+                {
+                    REPLY ("0x%lx", possible[i]);
+                    if(i != nPossibleOutput - 1)
+                        REPLY (", ");
+                }
+                REPLY (")");
+            }
+
+            return reply;
+        }
+
+        case X_RRSetCrtcConfig:
+        {
+            if (evinfo->rep.isStart)
+            {
+                xRRSetCrtcConfigReply *stuff = (xRRSetCrtcConfigReply *)rep;
+
+                REPLY (" newTimestamp(%ldms)",
+                    stuff->newTimestamp);
+            }
+            else
+            {
+                return reply;
+            }
+
+            return reply;
+        }
+
+        case X_RRGetScreenResourcesCurrent:
+        {
+            static int nCrtcs, nOutputs, nModes, nbytesNames;
+
+            if (evinfo->rep.isStart)
+            {
+                xRRGetScreenResourcesReply *stuff = (xRRGetScreenResourcesReply *)rep;
+
+                REPLY (" Timestamp(%ldms) ConfigTimestamp(%ldms) nCrtcs(%d) nOutputs(%d) nModes(%d) nbytesNames(%d)",
+                    stuff->timestamp,
+                    stuff->configTimestamp,
+                    stuff->nCrtcs,
+                    stuff->nOutputs,
+                    stuff->nModes,
+                    stuff->nbytesNames);
+
+                nCrtcs = stuff->nCrtcs;
+                nOutputs = stuff->nOutputs;
+                nModes = stuff->nModes;
+                nbytesNames = stuff->nbytesNames;
+            }
+            else
+            {
+                RRCrtc *crtcs = (RRCrtc *)rep;
+                RROutput *outputs = (RROutput *)(crtcs + nCrtcs);
+                xRRModeInfo *modeinfos = (xRRModeInfo *)(outputs + nOutputs);
+                CARD8 *names = (CARD8 *)(modeinfos + nModes);
+                char temp[64] = {0, };
+                int i;
+
+                REPLY ("Crtcs");
+                REPLY ("(");
+                for (i = 0 ; i < nCrtcs ; i++)
+                {
+                    REPLY ("0x%lx", crtcs[i]);
+                    if(i != nCrtcs - 1)
+                        REPLY (", ");
+                }
+                REPLY (")");
+
+                REPLY (" Outputs");
+                REPLY ("(");
+                for (i = 0 ; i < nOutputs ; i++)
+                {
+                    REPLY ("0x%lx", outputs[i]);
+                    if(i != nOutputs - 1)
+                        REPLY (", ");
+                }
+                REPLY (")");
+
+                REPLY (" Modes");
+                REPLY ("(");
+                for (i = 0 ; i < nModes ; i++)
+                {
+                    REPLY ("0x%lx %dx%d", modeinfos[i].id, modeinfos[i].width, modeinfos[i].height);
+                    if(i != nModes - 1)
+                        REPLY (", ");
+                }
+                REPLY (")");
+
+                REPLY (" Names");
+
+                strncpy (temp, (char *)names, nbytesNames);
+
+                REPLY ("(");
+                REPLY ("%s", temp);
+                REPLY (")");
+            }
+
+            return reply;
+        }
+
+    default:
+            break;
+    }
+
+    return reply;
+}
 
 void
 xDbgEvlogRandrGetBase (ExtensionInfo *extinfo)
@@ -342,6 +700,7 @@ xDbgEvlogRandrGetBase (ExtensionInfo *extinfo)
 
     extinfo->req_func = _EvlogRequestRandr;
     extinfo->evt_func = _EvlogEventRandr;
+    extinfo->rep_func = _EvlogReplyRandr;
 #else
     ExtensionEntry *xext = CheckExtension (RANDR_NAME);
     RETURN_IF_FAIL (xext != NULL);
@@ -352,5 +711,6 @@ xDbgEvlogRandrGetBase (ExtensionInfo *extinfo)
     extinfo->err_base = xext->errorBase;
     extinfo->req_func = _EvlogRequestRandr;
     extinfo->evt_func = _EvlogEventRandr;
+    extinfo->rep_func = _EvlogReplyRandr;
 #endif
 }
diff --git a/common/xdbg_evlog_reply.c b/common/xdbg_evlog_reply.c
new file mode 100644 (file)
index 0000000..2934b77
--- /dev/null
@@ -0,0 +1,99 @@
+/**************************************************************************
+
+xdbg
+
+Copyright (c) 2013 Samsung Electronics Co., Ltd All Rights Reserved
+
+Contact: Boram Park <boram1288.park@samsung.com>
+         Sangjin LEE <lsj119@samsung.com>
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sub license, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice (including the
+next paragraph) shall be included in all copies or substantial portions
+of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
+ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+**************************************************************************/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdio.h>
+#include <string.h>
+#include <strings.h>
+#include <sys/types.h>
+#include <sys/fcntl.h>
+#include <unistd.h>
+#include <stdarg.h>
+#include <fcntl.h>
+#include <unistd.h>
+
+#include <dix.h>
+#define XREGISTRY
+#include <registry.h>
+#include <xace.h>
+#include <xacestr.h>
+#include <X11/Xatom.h>
+#include <X11/Xlib.h>
+#include <windowstr.h>
+#include <sys/shm.h>
+
+#include "xdbg_types.h"
+#include "xdbg_evlog.h"
+#include "xdbg_evlog_reply.h"
+
+#define UNKNOWN_EVENT "<unknown>"
+
+char *
+xDbgEvlogReply (EvlogInfo *evinfo, Bool on, char *reply, int *len)
+{
+    extern ExtensionInfo Evlog_extensions[];
+    extern int Extensions_size;
+    EvlogReply rep;
+    xGenericReply *xRep = NULL;
+    int i;
+
+    RETURN_VAL_IF_FAIL (evinfo != NULL, reply);
+    RETURN_VAL_IF_FAIL (evinfo->type == REPLY, reply);
+
+    rep = evinfo->rep;
+    xRep = rep.ptr;
+
+    if (rep.isStart)
+        REPLY ("%s", evinfo->rep.name);
+
+    if(!on)
+        return reply;
+
+    if (rep.reqType < EXTENSION_BASE)
+    {
+        return xDbgEvlogReplyCore (evinfo, reply, len);
+    }
+    else
+    {
+        for (i = 0 ; i < Extensions_size ; i++)
+        {
+            if (rep.reqType == Evlog_extensions[i].opcode)
+            {
+                return Evlog_extensions[i].rep_func (evinfo, reply, len);
+            }
+        }
+    }
+
+    return reply;
+}
diff --git a/common/xdbg_evlog_reply.h b/common/xdbg_evlog_reply.h
new file mode 100644 (file)
index 0000000..7a5e718
--- /dev/null
@@ -0,0 +1,39 @@
+/**************************************************************************
+
+xdbg
+
+Copyright (c) 2013 Samsung Electronics Co., Ltd All Rights Reserved
+
+Contact: Boram Park <boram1288.park@samsung.com>
+         Sangjin LEE <lsj119@samsung.com>
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sub license, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice (including the
+next paragraph) shall be included in all copies or substantial portions
+of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
+ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+**************************************************************************/
+
+#ifndef __XDBG_EVLOG_REPLY_H__
+#define __XDBG_EVLOG_REPLY_H__
+
+#include "xdbg_types.h"
+
+char *  xDbgEvlogReply (EvlogInfo *evinfo, Bool on, char *reply, int *len);
+
+#endif
index 6d7b426..da3b38a 100644 (file)
@@ -424,6 +424,161 @@ _EvlogEventXextXtest (EvlogInfo *evinfo, int first_base, char *reply, int *len)
     return reply;
 }
 
+
+static char *
+_EvlogReplyXextDpms (EvlogInfo *evinfo, char *reply, int *len)
+{
+    xGenericReply *rep = evinfo->rep.ptr;
+
+    switch (evinfo->rep.reqData)
+    {
+    case X_DPMSSetTimeouts:
+        {
+            if (evinfo->rep.isStart)
+            {
+                xDPMSGetTimeoutsReply *stuff = (xDPMSGetTimeoutsReply *)rep;
+                REPLY (": Standby(%d) Suspend(%d) off(%d)",
+                    stuff->standby,
+                    stuff->suspend,
+                    stuff->off);
+            }
+            else
+            {
+                return reply;
+            }
+
+            return reply;
+        }
+
+    default:
+            break;
+    }
+
+    return reply;
+}
+
+static char *
+_EvlogReplyXextShm (EvlogInfo *evinfo, char *reply, int *len)
+{
+    xGenericReply *rep = evinfo->rep.ptr;
+
+    switch (evinfo->rep.reqData)
+    {
+    case X_ShmGetImage:
+        {
+            if (evinfo->rep.isStart)
+            {
+                xShmGetImageReply *stuff = (xShmGetImageReply *)rep;
+                REPLY (": Visual(0x%lx) size(%ld)",
+                    stuff->visual,
+                    stuff->size);
+            }
+            else
+            {
+                return reply;
+            }
+
+            return reply;
+        }
+
+    default:
+            break;
+    }
+
+    return reply;
+}
+
+static char *
+_EvlogReplyXextSync (EvlogInfo *evinfo, char *reply, int *len)
+{
+    xGenericReply *rep = evinfo->rep.ptr;
+
+    switch (evinfo->rep.reqData)
+    {
+        case X_SyncQueryCounter:
+        {
+            if (evinfo->rep.isStart)
+            {
+                xSyncQueryCounterReply *stuff = (xSyncQueryCounterReply *)rep;
+                REPLY (": Value(0x%lx/0x%lx)",
+                    stuff->value_hi,
+                    stuff->value_lo);
+            }
+            else
+            {
+                return reply;
+            }
+
+            return reply;
+        }
+
+    default:
+            break;
+    }
+
+    return reply;
+}
+
+static char *
+_EvlogReplyXextXtestExt1 (EvlogInfo *evinfo, char *reply, int *len)
+{
+    xGenericReply *rep = evinfo->rep.ptr;
+
+    switch (evinfo->rep.reqData)
+    {
+        case X_TestQueryInputSize:
+        {
+            if (evinfo->rep.isStart)
+            {
+                xTestQueryInputSizeReply *stuff = (xTestQueryInputSizeReply *)rep;
+                REPLY (": sizeReturn(0x%lx)",
+                    stuff->size_return);
+            }
+            else
+            {
+                return reply;
+            }
+
+            return reply;
+        }
+
+    default:
+            break;
+    }
+
+    return reply;
+}
+
+static char *
+_EvlogReplyXextXtest (EvlogInfo *evinfo, char *reply, int *len)
+{
+    xGenericReply *rep = evinfo->rep.ptr;
+
+    switch (evinfo->rep.reqData)
+    {
+    case X_XTestGetVersion:
+        {
+            if (evinfo->rep.isStart)
+            {
+                xXTestGetVersionReply *stuff = (xXTestGetVersionReply *)rep;
+                REPLY (": MinorVersion(%d)",
+                    stuff->minorVersion);
+            }
+            else
+            {
+                return reply;
+            }
+
+            return reply;
+        }
+
+    default:
+            break;
+    }
+
+    return reply;
+}
+
 void
 xDbgEvlogXextDpmsGetBase (ExtensionInfo *extinfo)
 {
@@ -432,6 +587,7 @@ xDbgEvlogXextDpmsGetBase (ExtensionInfo *extinfo)
 
     extinfo->req_func = _EvlogRequestXextDpms;
     extinfo->evt_func = _EvlogEventXextDpms;
+    extinfo->rep_func = _EvlogReplyXextDpms;
 #else
     ExtensionEntry *xext = CheckExtension (DPMSExtensionName);
     RETURN_IF_FAIL (xext != NULL);
@@ -442,6 +598,7 @@ xDbgEvlogXextDpmsGetBase (ExtensionInfo *extinfo)
     extinfo->err_base = xext->errorBase;
     extinfo->req_func = _EvlogRequestXextDpms;
     extinfo->evt_func = _EvlogEventXextDpms;
+    extinfo->rep_func = _EvlogReplyXextDpms;
 #endif
 }
 
@@ -454,6 +611,7 @@ xDbgEvlogXextShmGetBase (ExtensionInfo *extinfo)
 
     extinfo->req_func = _EvlogRequestXextShm;
     extinfo->evt_func = _EvlogEventXextShm;
+    extinfo->rep_func = _EvlogReplyXextShm;
 #else
     ExtensionEntry *xext = CheckExtension (SHMNAME);
     RETURN_IF_FAIL (xext != NULL);
@@ -464,6 +622,7 @@ xDbgEvlogXextShmGetBase (ExtensionInfo *extinfo)
     extinfo->err_base = xext->errorBase;
     extinfo->req_func = _EvlogRequestXextShm;
     extinfo->evt_func = _EvlogEventXextShm;
+    extinfo->rep_func = _EvlogReplyXextShm;
 #endif
 }
 
@@ -476,6 +635,7 @@ xDbgEvlogXextSyncGetBase (ExtensionInfo *extinfo)
 
     extinfo->req_func = _EvlogRequestXextSync;
     extinfo->evt_func = _EvlogEventXextSync;
+    extinfo->rep_func = _EvlogReplyXextSync;
 #else
     ExtensionEntry *xext = CheckExtension (SYNC_NAME);
     RETURN_IF_FAIL (xext != NULL);
@@ -486,6 +646,7 @@ xDbgEvlogXextSyncGetBase (ExtensionInfo *extinfo)
     extinfo->err_base = xext->errorBase;
     extinfo->req_func = _EvlogRequestXextSync;
     extinfo->evt_func = _EvlogEventXextSync;
+    extinfo->rep_func = _EvlogReplyXextSync;
 #endif
 
 }
@@ -499,6 +660,7 @@ xDbgEvlogXextXtestExt1GetBase (ExtensionInfo *extinfo)
 
     extinfo->req_func = _EvlogRequestXextXtestExt1;
     extinfo->evt_func = _EvlogEventXextXtestExt1;
+    extinfo->rep_func = _EvlogReplyXextXtestExt1;
 #else
     ExtensionEntry *xext = CheckExtension (XTestEXTENSION_NAME);
     RETURN_IF_FAIL (xext != NULL);
@@ -509,6 +671,7 @@ xDbgEvlogXextXtestExt1GetBase (ExtensionInfo *extinfo)
     extinfo->err_base = xext->errorBase;
     extinfo->req_func = _EvlogRequestXextXtestExt1;
     extinfo->evt_func = _EvlogEventXextXtestExt1;
+    extinfo->rep_func = _EvlogReplyXextXtestExt1;
 #endif
 
 }
@@ -522,6 +685,7 @@ xDbgEvlogXextXtestGetBase (ExtensionInfo *extinfo)
 
     extinfo->req_func = _EvlogRequestXextXtest;
     extinfo->evt_func = _EvlogEventXextXtest;
+    extinfo->rep_func = _EvlogReplyXextXtest;
 #else
     ExtensionEntry *xext = CheckExtension (XTestExtensionName);
     RETURN_IF_FAIL (xext != NULL);
@@ -532,6 +696,7 @@ xDbgEvlogXextXtestGetBase (ExtensionInfo *extinfo)
     extinfo->err_base = xext->errorBase;
     extinfo->req_func = _EvlogRequestXextXtest;
     extinfo->evt_func = _EvlogEventXextXtest;
+    extinfo->rep_func = _EvlogReplyXextXtest;
 #endif
 
 }
index 33467a3..4f59a89 100644 (file)
@@ -443,14 +443,10 @@ _EvlogEventXinput (EvlogInfo *evinfo, int first_base, char *reply, int *len)
     case XI_DeviceKeyPress:
         {
             XDeviceKeyPressedEvent *stuff = (XDeviceKeyPressedEvent *) evt;
-            REPLY (": XID(0x%lx) Window(0x%lx %d,%d) Root(0x%lx %d,%d) subWindow(0x%lx)",
+            REPLY (": XID(0x%lx) Window(0x%lx) Root(0x%lx) subWindow(0x%lx)",
                 stuff->deviceid,
                 stuff->window,
-                stuff->x,
-                stuff->y,
                 stuff->root,
-                stuff->x_root,
-                stuff->y_root,
                 stuff->subwindow);
 
             return reply;
@@ -459,14 +455,10 @@ _EvlogEventXinput (EvlogInfo *evinfo, int first_base, char *reply, int *len)
     case XI_DeviceKeyRelease:
         {
             XDeviceKeyReleasedEvent *stuff = (XDeviceKeyReleasedEvent *) evt;
-            REPLY (": XID(0x%lx) Window(0x%lx %d,%d) Root(0x%lx %d,%d) subWindow(0x%lx)",
+            REPLY (": XID(0x%lx) Window(0x%lx) Root(0x%lx) subWindow(0x%lx)",
                 stuff->deviceid,
                 stuff->window,
-                stuff->x,
-                stuff->y,
                 stuff->root,
-                stuff->x_root,
-                stuff->y_root,
                 stuff->subwindow);
 
             return reply;
@@ -475,14 +467,10 @@ _EvlogEventXinput (EvlogInfo *evinfo, int first_base, char *reply, int *len)
     case XI_DeviceButtonPress:
         {
             XDeviceButtonPressedEvent *stuff = (XDeviceButtonPressedEvent *) evt;
-            REPLY (": XID(0x%lx) Window(0x%lx %d,%d) Root(0x%lx %d,%d) subWindow(0x%lx)",
+            REPLY (": XID(0x%lx) Window(0x%lx) Root(0x%lx) subWindow(0x%lx)",
                 stuff->deviceid,
                 stuff->window,
-                stuff->x,
-                stuff->y,
                 stuff->root,
-                stuff->x_root,
-                stuff->y_root,
                 stuff->subwindow);
 
             return reply;
@@ -491,14 +479,10 @@ _EvlogEventXinput (EvlogInfo *evinfo, int first_base, char *reply, int *len)
     case XI_DeviceButtonRelease:
         {
             XDeviceButtonReleasedEvent *stuff = (XDeviceButtonReleasedEvent *) evt;
-            REPLY (": XID(0x%lx) Window(0x%lx %d,%d) Root(0x%lx %d,%d) subWindow(0x%lx)",
+            REPLY (": XID(0x%lx) Window(0x%lx) Root(0x%lx) subWindow(0x%lx)",
                 stuff->deviceid,
                 stuff->window,
-                stuff->x,
-                stuff->y,
                 stuff->root,
-                stuff->x_root,
-                stuff->y_root,
                 stuff->subwindow);
 
             return reply;
@@ -507,14 +491,10 @@ _EvlogEventXinput (EvlogInfo *evinfo, int first_base, char *reply, int *len)
     case XI_DeviceMotionNotify:
         {
             XDeviceMotionEvent *stuff = (XDeviceMotionEvent *) evt;
-            REPLY (": XID(0x%lx) Window(0x%lx %d,%d) Root(0x%lx %d,%d) subWindow(0x%lx)",
+            REPLY (": XID(0x%lx) Window(0x%lx) Root(0x%lx) subWindow(0x%lx)",
                 stuff->deviceid,
                 stuff->window,
-                stuff->x,
-                stuff->y,
                 stuff->root,
-                stuff->x_root,
-                stuff->y_root,
                 stuff->subwindow);
 
             return reply;
@@ -543,14 +523,10 @@ _EvlogEventXinput (EvlogInfo *evinfo, int first_base, char *reply, int *len)
     case XI_ProximityIn:
         {
             XProximityInEvent *stuff = (XProximityInEvent *) evt;
-            REPLY (": XID(0x%lx) Window(0x%lx %d,%d) Root(0x%lx %d,%d) subWindow(0x%lx)",
+            REPLY (": XID(0x%lx) Window(0x%lx) Root(0x%lx) subWindow(0x%lx)",
                 stuff->deviceid,
                 stuff->window,
-                stuff->x,
-                stuff->y,
                 stuff->root,
-                stuff->x_root,
-                stuff->y_root,
                 stuff->subwindow);
 
             return reply;
@@ -559,14 +535,10 @@ _EvlogEventXinput (EvlogInfo *evinfo, int first_base, char *reply, int *len)
     case XI_ProximityOut:
         {
             XProximityOutEvent *stuff = (XProximityOutEvent *) evt;
-            REPLY (": XID(0x%lx) Window(0x%lx %d,%d) Root(0x%lx %d,%d) subWindow(0x%lx)",
+            REPLY (": XID(0x%lx) Window(0x%lx) Root(0x%lx) subWindow(0x%lx)",
                 stuff->deviceid,
                 stuff->window,
-                stuff->x,
-                stuff->y,
                 stuff->root,
-                stuff->x_root,
-                stuff->y_root,
                 stuff->subwindow);
 
             return reply;
@@ -648,6 +620,251 @@ _EvlogEventXinput (EvlogInfo *evinfo, int first_base, char *reply, int *len)
     return reply;
 }
 
+static char *
+_EvlogReplyXinput (EvlogInfo *evinfo, char *reply, int *len)
+{
+    xGenericReply *rep = evinfo->rep.ptr;
+
+    switch (evinfo->rep.reqData)
+    {
+    case X_ListInputDevices:
+        {
+            if (evinfo->rep.isStart)
+            {
+                xListInputDevicesReply *stuff = (xListInputDevicesReply *) rep;
+                REPLY (": nDevices(%d)",
+                    stuff->ndevices);
+            }
+            else
+            {
+                return reply;
+            }
+
+            return reply;
+        }
+
+    case X_GrabDevice:
+        {
+            if (evinfo->rep.isStart)
+            {
+                xGrabDeviceReply *stuff = (xGrabDeviceReply *) rep;
+                REPLY (": status(%d)",
+                    stuff->status);
+            }
+            else
+            {
+                return reply;
+            }
+
+            return reply;
+        }
+
+    case X_GetDeviceFocus:
+        {
+            if (evinfo->rep.isStart)
+            {
+                xGetDeviceFocusReply *stuff = (xGetDeviceFocusReply *) rep;
+                REPLY (": XID(0x%lx) Time(0x%lx)",
+                    stuff->focus,
+                    stuff->time);
+            }
+            else
+            {
+                return reply;
+            }
+
+            return reply;
+        }
+
+    case X_XIQueryVersion:
+        {
+            if (evinfo->rep.isStart)
+            {
+                xXIQueryVersionReply *stuff = (xXIQueryVersionReply *) rep;
+                REPLY (": majorVersion(%d) minorVersion(%d)",
+                    stuff->major_version,
+                    stuff->minor_version);
+            }
+            else
+            {
+                return reply;
+            }
+
+            return reply;
+        }
+
+    case X_XIQueryDevice:
+        {
+            if (evinfo->rep.isStart)
+            {
+                xXIQueryDeviceReply *stuff = (xXIQueryDeviceReply *) rep;
+                REPLY (": numDevices(%d)",
+                    stuff->num_devices);
+            }
+            else
+            {
+                return reply;
+            }
+
+            return reply;
+        }
+
+    case X_XIGetSelectedEvents:
+        {
+            if (evinfo->rep.isStart)
+            {
+                xXIGetSelectedEventsReply *stuff = (xXIGetSelectedEventsReply *) rep;
+                REPLY (": numMasks(%d)",
+                    stuff->num_masks);
+            }
+            else
+            {
+                return reply;
+            }
+
+            return reply;
+        }
+
+    case X_XIQueryPointer:
+        {
+            if (evinfo->rep.isStart)
+            {
+                xXIQueryPointerReply *stuff = (xXIQueryPointerReply *) rep;
+                REPLY (": XID(0x%x) Child(0x%x) root(%d,%d) win(%d,%d)",
+                    stuff->root,
+                    stuff->child,
+                    stuff->root_x,
+                    stuff->root_y,
+                    stuff->win_x,
+                    stuff->win_y);
+            }
+            else
+            {
+                return reply;
+            }
+
+            return reply;
+        }
+
+    case X_XIGetClientPointer:
+        {
+            if (evinfo->rep.isStart)
+            {
+                xXIGetClientPointerReply *stuff = (xXIGetClientPointerReply *) rep;
+                REPLY (": Set(%s) deviceid(%d)",
+                    (stuff->set) ? "true":"false",
+                    stuff->deviceid);
+            }
+            else
+            {
+                return reply;
+            }
+
+            return reply;
+        }
+
+    case X_XIGetFocus:
+        {
+            if (evinfo->rep.isStart)
+            {
+                xXIGetFocusReply *stuff = (xXIGetFocusReply *) rep;
+                REPLY (": XID(0x%x)",
+                    stuff->focus);
+            }
+            else
+            {
+                return reply;
+            }
+
+            return reply;
+        }
+
+    case X_XIGrabDevice:
+        {
+            if (evinfo->rep.isStart)
+            {
+                xXIGrabDeviceReply *stuff = (xXIGrabDeviceReply *) rep;
+                REPLY (": status(%d)",
+                    stuff->status);
+            }
+            else
+            {
+                return reply;
+            }
+
+            return reply;
+        }
+
+    case X_XIPassiveGrabDevice:
+        {
+            if (evinfo->rep.isStart)
+            {
+                xXIPassiveGrabDeviceReply *stuff = (xXIPassiveGrabDeviceReply *) rep;
+                REPLY (": numModifiers(%d)",
+                    stuff->num_modifiers);
+            }
+            else
+            {
+                return reply;
+            }
+
+            return reply;
+        }
+
+    case X_XIListProperties:
+        {
+            if (evinfo->rep.isStart)
+            {
+                xXIListPropertiesReply *stuff = (xXIListPropertiesReply *) rep;
+                REPLY (": numProperties(%d)",
+                    stuff->num_properties);
+            }
+            else
+            {
+                Atom *stuff = (Atom *)rep;
+                int i;
+
+                REPLY ("Properties(");
+                for (i = 0 ; i < evinfo->rep.size / sizeof(Atom) ; i ++)
+                {
+                    reply = xDbgGetAtom(stuff[i], evinfo, reply, len);
+                    if(i != evinfo->rep.size / sizeof(Atom) - 1)
+                        REPLY (", ");
+                }
+                REPLY (")");
+            }
+
+            return reply;
+        }
+
+    case X_XIGetProperty:
+        {
+            if (evinfo->rep.isStart)
+            {
+                xXIGetPropertyReply *stuff = (xXIGetPropertyReply *) rep;
+
+                REPLY (": Type");
+                xDbgGetAtom(stuff->type, evinfo, reply, len);
+
+                REPLY (" numItems(%d) format(%d)",
+                    stuff->num_items,
+                    stuff->format);
+            }
+            else
+            {
+                return reply;
+            }
+
+            return reply;
+        }
+
+    default:
+            break;
+    }
+
+    return reply;
+}
+
 void
 xDbgEvlogXinputGetBase (ExtensionInfo *extinfo)
 {
@@ -656,6 +873,7 @@ xDbgEvlogXinputGetBase (ExtensionInfo *extinfo)
 
     extinfo->req_func = _EvlogRequestXinput;
     extinfo->evt_func = _EvlogEventXinput;
+    extinfo->rep_func = _EvlogReplyXinput;
 #else
     ExtensionEntry *xext = CheckExtension (INAME);
     RETURN_IF_FAIL (xext != NULL);
@@ -666,5 +884,6 @@ xDbgEvlogXinputGetBase (ExtensionInfo *extinfo)
     extinfo->err_base = xext->errorBase;
     extinfo->req_func = _EvlogRequestXinput;
     extinfo->evt_func = _EvlogEventXinput;
+    extinfo->rep_func = _EvlogReplyXinput;
 #endif
 }
index 52d2842..44332a6 100644 (file)
@@ -319,6 +319,37 @@ _EvlogEventXv (EvlogInfo *evinfo, int first_base, char *reply, int *len)
     return reply;
 }
 
+static char *
+_EvlogReplyXv (EvlogInfo *evinfo, char *reply, int *len)
+{
+    xGenericReply *rep = evinfo->rep.ptr;
+
+    switch (evinfo->rep.reqData)
+    {
+        case xv_QueryBestSize:
+        {
+            if (evinfo->rep.isStart)
+            {
+                xvQueryBestSizeReply *stuff = (xvQueryBestSizeReply *)rep;
+                REPLY (": actualSize(%dx%d)",
+                    stuff->actual_width,
+                    stuff->actual_height);
+            }
+            else
+            {
+                return reply;
+            }
+
+            return reply;
+        }
+
+    default:
+            break;
+    }
+
+    return reply;
+}
+
 void
 xDbgEvlogXvGetBase (ExtensionInfo *extinfo)
 {
@@ -327,6 +358,7 @@ xDbgEvlogXvGetBase (ExtensionInfo *extinfo)
 
     extinfo->req_func = _EvlogRequestXv;
     extinfo->evt_func = _EvlogEventXv;
+    extinfo->rep_func = _EvlogReplyXv;
 #else
     ExtensionEntry *xext = CheckExtension (XvName);
     RETURN_IF_FAIL (xext != NULL);
@@ -337,6 +369,7 @@ xDbgEvlogXvGetBase (ExtensionInfo *extinfo)
     extinfo->err_base = xext->errorBase;
     extinfo->req_func = _EvlogRequestXv;
     extinfo->evt_func = _EvlogEventXv;
+    extinfo->rep_func = _EvlogReplyXv;
 
 #endif
 }
index 6ed2cfe..3caa4da 100644 (file)
@@ -78,14 +78,17 @@ typedef enum
     EVENT,
     REQUEST,
     REPLY,
-    FLUSH
+    FLUSH,
+    ERROR
 } EvlogType;
 
 #define EVLOG_MASK_CLIENT    (1<<0)
 #define EVLOG_MASK_REQUEST   (1<<1)
 #define EVLOG_MASK_EVENT     (1<<2)
-#define EVLOG_MASK_ATOM      (1<<3)
-#define EVLOG_MASK_REGION    (1<<4)
+#define EVLOG_MASK_REPLY     (1<<3)
+#define EVLOG_MASK_ERROR     (1<<4)
+#define EVLOG_MASK_ATOM      (1<<5)
+#define EVLOG_MASK_REGION    (1<<6)
 
 
 typedef struct _EvlogTable
@@ -127,6 +130,24 @@ typedef struct _EvlogEvent
     char    name[PATH_MAX+1];
 } EvlogEvent;
 
+typedef struct _EvlogReply
+{
+    xGenericReply  *ptr;
+    int             size;
+    char            name[PATH_MAX+1];
+    int             reqType;
+    int             reqData;
+    Bool            isStart;
+} EvlogReply;
+
+typedef struct _EvlogError
+{
+    BYTE    errorCode;
+    CARD32  resourceID;
+    CARD16  minorCode;
+    CARD8   majorCode;
+} EvlogError;
+
 typedef struct _EvlogInfo
 {
     EvlogType     type;
@@ -135,6 +156,8 @@ typedef struct _EvlogInfo
     EvlogClient   client;
     EvlogRequest  req;
     EvlogEvent    evt;
+    EvlogReply    rep;
+    EvlogError    err;
     EvlogAtom     evatom;
     EvlogRegion   evregion;
 
@@ -152,6 +175,7 @@ struct _ExtensionInfo
     int     err_base;
     char* (*req_func) (EvlogInfo *evinfo, char *reply, int *len);
     char* (*evt_func) (EvlogInfo *evinfo, int first_base, char *reply, int *len);
+    char* (*rep_func) (EvlogInfo *evinfo, char *reply, int *len);
 };
 
 #endif
index bb14b23..7126d80 100644 (file)
@@ -233,7 +233,9 @@ _CommandSetEvlogPath (int pid, int argc, char **argv, char *reply, int *len, XDb
 
     pMod->evlog_path = strdup (argv[2]);
 
-    if (pMod->evlog_path[0] == '/')
+    if (!strcmp (pMod->evlog_path, "console"))
+        XDBG_REPLY ("/proc/%d/fd/1", pid);
+    else if (pMod->evlog_path[0] == '/')
         XDBG_REPLY ("evlog path: %s\n", pMod->evlog_path);
     else
         XDBG_REPLY ("evlog path: %s/%s\n", pMod->cwd, pMod->evlog_path);
index 5e3ac20..0618076 100644 (file)
@@ -101,6 +101,12 @@ static void evtRecord (int fd, EvlogInfo *evinfo)
     if (evinfo->mask & EVLOG_MASK_EVENT)
         write_len += (sizeof (EvlogEvent) + evinfo->evt.size);
 
+    if (evinfo->mask & EVLOG_MASK_REPLY)
+        write_len += (sizeof (EvlogReply) + evinfo->rep.size);
+
+    if (evinfo->mask & EVLOG_MASK_ERROR)
+        write_len += (sizeof (EvlogError));
+
     if (evinfo->mask & EVLOG_MASK_ATOM)
         write_len += (sizeof (int) +
                      (sizeof (EvlogAtomTable) * evinfo->evatom.size));
@@ -200,6 +206,29 @@ static void evtRecord (int fd, EvlogInfo *evinfo)
             return;
         }
     }
+    if (evinfo->mask & EVLOG_MASK_REPLY)
+    {
+        if (write (fd, &evinfo->rep, sizeof (EvlogReply)) == -1)
+        {
+            XDBG_ERROR (MXDBG, "failed: write reply\n");
+            return;
+        }
+
+        XDBG_WARNING_IF_FAIL (evinfo->rep.size > 0);
+        if (write (fd, evinfo->rep.ptr, evinfo->rep.size) == -1)
+        {
+            XDBG_ERROR (MXDBG, "failed: write reply\n");
+            return;
+        }
+    }
+    if (evinfo->mask & EVLOG_MASK_ERROR)
+    {
+        if (write (fd, &evinfo->err, sizeof (EvlogError)) == -1)
+        {
+            XDBG_ERROR (MXDBG, "failed: write reply\n");
+            return;
+        }
+    }
 
     if (evinfo->mask & EVLOG_MASK_ATOM)
     {
@@ -244,7 +273,7 @@ static void evtPrintF (int fd, EvlogInfo *evinfo, char *log)
         dprintf (fd, "%s", log);
 }
 
-static void evtPrint (EvlogType type, ClientPtr client, xEvent *ev)
+static void evtPrint (EvlogType type, ClientPtr client, xEvent *ev, ReplyInfoRec *rep)
 {
     EvlogInfo evinfo = {0,};
     static int EntryInit = 0;
@@ -292,17 +321,54 @@ static void evtPrint (EvlogType type, ClientPtr client, xEvent *ev)
                               LookupRequestName (stuff->reqType, stuff->data));
             }
         }
+
+        /* evinfo.rep */
+        if (type == REPLY)
+        {
+            REQUEST (xReq);
+
+            evinfo.mask |= EVLOG_MASK_REPLY;
+            evinfo.rep.reqType = stuff->reqType;
+            evinfo.rep.reqData = stuff->data;
+            evinfo.rep.ptr = (xGenericReply*)rep->replyData;
+            evinfo.rep.size = rep->dataLenBytes - rep->padBytes;
+            evinfo.rep.isStart = rep->startOfReply;
+
+            if (stuff->reqType < EXTENSION_BASE)
+                snprintf (evinfo.rep.name, sizeof (evinfo.rep.name), "%s",
+                          LookupRequestName (stuff->reqType, 0));
+            else
+                snprintf (evinfo.rep.name, sizeof (evinfo.rep.name), "%s",
+                          LookupRequestName (stuff->reqType, stuff->data));
+        }
+
+        if (type == ERROR)
+        {
+            xError* err = NULL;
+
+            if (ev)
+                err = (xError *) ev;
+            else if (rep)
+                err = (xError *) rep->replyData;
+
+            evinfo.mask |= EVLOG_MASK_ERROR;
+            evinfo.err.errorCode = err->errorCode;
+            evinfo.err.resourceID = err->resourceID;
+            evinfo.err.minorCode = err->minorCode;
+            evinfo.err.majorCode = err->majorCode;
+        }
     }
 
     /* evinfo.evt */
     if (ev)
     {
-        XDBG_RETURN_IF_FAIL (type == EVENT);
-
-        evinfo.mask |= EVLOG_MASK_EVENT;
-        evinfo.evt.ptr = ev;
-        snprintf (evinfo.evt.name, sizeof (evinfo.evt.name), "%s",
-                  LookupEventName ((int)(ev->u.u.type)));
+        if (type == EVENT)
+        {
+            evinfo.mask |= EVLOG_MASK_EVENT;
+            evinfo.evt.ptr = ev;
+            snprintf (evinfo.evt.name, sizeof (evinfo.evt.name), "%s",
+                      LookupEventName ((int)(ev->u.u.type)));
+        }
     }
 
     /* evinfo.time */
@@ -376,7 +442,7 @@ _traceFlush (CallbackListPtr *pcbl, pointer nulldata, pointer calldata)
     if (xev_trace_on == FALSE)
         return;
 
-    evtPrint (FLUSH, NULL, NULL);
+    evtPrint (FLUSH, NULL, NULL, NULL);
 }
 
 static void
@@ -387,7 +453,7 @@ _traceAReply (CallbackListPtr *pcbl, pointer nulldata, pointer calldata)
 
     ReplyInfoRec *pri = (ReplyInfoRec*)calldata;
 
-    evtPrint (REPLY, pri->client, NULL);
+    evtPrint (REPLY, pri->client, NULL, pri);
 }
 
 static void
@@ -470,8 +536,10 @@ _traceEvent (CallbackListPtr *pcbl, pointer nulldata, pointer calldata)
             }
         }
 
-        if (xev_trace_on)
-            evtPrint (EVENT, pClient, pev);
+        if (type != X_Error && xev_trace_on)
+            evtPrint (EVENT, pClient, pev, NULL);
+        else if (type == X_Error && xev_trace_on)
+            evtPrint (ERROR, pClient, pev, NULL);
     }
 }
 
@@ -485,7 +553,7 @@ _traceACoreEvents (CallbackListPtr *pcbl, pointer unused, pointer calldata)
 
     XDBG_RETURN_IF_FAIL (rec != NULL);
 
-    evtPrint (REQUEST, rec->client, NULL);
+    evtPrint (REQUEST, rec->client, NULL, NULL);
 }
 
 static void
@@ -544,7 +612,13 @@ _traceAExtEvents (CallbackListPtr *pcbl, pointer unused, pointer calldata)
     if (xev_trace_on == FALSE)
         return;
 
-    evtPrint (REQUEST, rec->client, NULL);
+    evtPrint (REQUEST, rec->client, NULL, NULL);
+}
+
+static void
+_traceAuditEndEvents (CallbackListPtr *pcbl, pointer unused, pointer calldata)
+{
+    return;
 }
 
 static void
@@ -688,6 +762,8 @@ xDbgModuleEvlogPrintEvents (XDbgModule *pMod, Bool on, const char * client_name,
         ret &= AddCallback (&FlushCallback, _traceFlush, NULL);
         ret &= AddCallback (&ReplyCallback, _traceAReply, NULL);
         ret &= XaceRegisterCallback (XACE_CORE_DISPATCH, _traceACoreEvents, NULL);
+        ret &= XaceRegisterCallback (XACE_EXT_DISPATCH, _traceAExtEvents, NULL);
+        ret &= XaceRegisterCallback (XACE_AUDIT_END, _traceAuditEndEvents, NULL);
 
         if (!ret)
         {
@@ -700,6 +776,8 @@ xDbgModuleEvlogPrintEvents (XDbgModule *pMod, Bool on, const char * client_name,
         DeleteCallback (&FlushCallback, _traceFlush, NULL);
         DeleteCallback (&ReplyCallback, _traceAReply, NULL);
         XaceDeleteCallback (XACE_CORE_DISPATCH, _traceACoreEvents, NULL);
+        XaceDeleteCallback (XACE_EXT_DISPATCH, _traceAExtEvents, NULL);
+        XaceDeleteCallback (XACE_AUDIT_END, _traceAuditEndEvents, NULL);
     }
 
     return;