T tracer: support float types in traces

This commit is contained in:
Cedric Roux
2024-11-15 16:02:52 +01:00
parent f54ca5714e
commit 0eb0325b96
5 changed files with 16 additions and 1 deletions
+4
View File
@@ -94,6 +94,10 @@ event new_event(int type, int length, char *buffer, void *database)
e.e[i].type = EVENT_ULONG;
e.e[i].ul = *(unsigned long *)(&buffer[offset]);
offset += sizeof(unsigned long);
} else if (!strcmp(f.type[i], "float")) {
e.e[i].type = EVENT_FLOAT;
e.e[i].f = *(float *)(&buffer[offset]);
offset += sizeof(float);
} else if (!strcmp(f.type[i], "string")) {
e.e[i].type = EVENT_STRING;
e.e[i].s = &buffer[offset];