add compatibility list
[lttv.git] / genevent-new / genevent.c
index 9c496debf8936d01e0737b443c07ae28b0f797de..9113a11ceec1d968ed2941ad667be46d86a60e8b 100644 (file)
@@ -411,7 +411,8 @@ int print_type_declaration(type_descriptor_t * td, FILE *fd, unsigned int tabs,
                        fprintf(fd, " {\n");
                        for(unsigned int i=0;i<td->labels.position;i++){
                                print_tabs(1, fd);
-                               fprintf(fd, "LTTNG_%s", ((char*)(td->labels.array[i])));
+                               fprintf(fd, "LTTNG_%s = %d", ((char*)td->labels.array[i]),
+            (*(int*)td->labels_values.array[i]));
                                fprintf(fd, ",\n");
                        }
                        fprintf(fd, "};\n");
@@ -1198,7 +1199,7 @@ int print_type_write_fct(type_descriptor_t * td, FILE *fd, unsigned int tabs,
                                print_tabs(1, fd);
                                fprintf(fd, "/* Realign the *to_base on arch size, set *to to 0 */\n");
                                print_tabs(1, fd);
-                               fprintf(fd, "*to = ltt_align(*to, sizeof(void *));\n");
+                               fprintf(fd, "*to += ltt_align(*to, sizeof(void *));\n");
                                print_tabs(1, fd);
                                fprintf(fd, "*to_base = *to_base+*to;\n");
                                print_tabs(1, fd);
@@ -1222,7 +1223,7 @@ int print_type_write_fct(type_descriptor_t * td, FILE *fd, unsigned int tabs,
                                print_tabs(1, fd);
                                fprintf(fd, "/* Realign the *to_base on arch size, set *to to 0 */\n");
                                print_tabs(1, fd);
-                               fprintf(fd, "*to = ltt_align(*to, sizeof(void *));\n");
+                               fprintf(fd, "*to += ltt_align(*to, sizeof(void *));\n");
                                print_tabs(1, fd);
                                fprintf(fd, "*to_base = *to_base+*to;\n");
                                print_tabs(1, fd);
@@ -1497,6 +1498,7 @@ int print_event_logging_function(char *basename, facility_t *fac,
        fprintf(fd, "reserve_size, before_hdr_pad, tsc);\n");
        print_tabs(2, fd);
        fprintf(fd, "*to_base += before_hdr_pad + after_hdr_pad + header_size;\n");
+       fprintf(fd, "\n");
        
        /* write data. */
 
This page took 0.031537 seconds and 4 git commands to generate.