summaryrefslogtreecommitdiff
path: root/src/bin
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2015-05-11 12:28:18 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2015-05-11 12:28:18 +0900
commitca0a253167626499217e0f7fcb2a6a72b321b160 (patch)
tree05d441ab2f87fada1c9276c1745170913b4dfacf /src/bin
parent419e8f2ffe80209af33b7970562b1f4d76e846aa (diff)
efl debug - make event log header .. nicer with a block header and size
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/efl/efl_debugd.c21
1 files changed, 9 insertions, 12 deletions
diff --git a/src/bin/efl/efl_debugd.c b/src/bin/efl/efl_debugd.c
index d7e7620137..c1c00b163a 100644
--- a/src/bin/efl/efl_debugd.c
+++ b/src/bin/efl/efl_debugd.c
@@ -143,21 +143,18 @@ _do(Client *c, char *op, unsigned char *d, int size)
143 else if (!strcmp(op, "EVLG")) 143 else if (!strcmp(op, "EVLG"))
144 { 144 {
145 unsigned int *overflow = (unsigned int *)(d + 0); 145 unsigned int *overflow = (unsigned int *)(d + 0);
146 unsigned char *end = d + size;
147 unsigned char *p = d + 4; 146 unsigned char *p = d + 4;
148 Eina_Evlog_Item hitem; 147 unsigned int blocksize = size - 4;
149 148
150 if ((c->evlog_file) && (end > p)) 149 if ((c->evlog_file) && (blocksize > 0))
151 { 150 {
152 hitem.tim = 0.0; 151 unsigned int header[3];
153 hitem.srctim = 0.0; 152
154 hitem.thread = 0; 153 header[0] = 0xffee211;
155 hitem.obj = *overflow; 154 header[1] = blocksize;
156 hitem.event_offset = 0; 155 header[2] = *overflow;
157 hitem.detail_offset = 0; 156 fwrite(header, 12, 1, c->evlog_file);
158 hitem.event_next = sizeof(Eina_Evlog_Item); 157 fwrite(p, blocksize, 1, c->evlog_file);
159 fwrite(&hitem, sizeof(Eina_Evlog_Item), 1, c->evlog_file);
160 fwrite(p, end - p, 1, c->evlog_file);
161 } 158 }
162 } 159 }
163} 160}