add pointer type
authorcompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Thu, 11 Oct 2007 20:13:53 +0000 (20:13 +0000)
committercompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Thu, 11 Oct 2007 20:13:53 +0000 (20:13 +0000)
git-svn-id: http://ltt.polymtl.ca/svn@2658 04897980-b3bd-0310-b5e0-8ef037075253

ltt/branches/poly/ltt/marker-field.h
ltt/branches/poly/ltt/marker.c
ltt/branches/poly/lttv/lttv/print.c

index 5cc877940d484eac90daaed2be4619fae9f52f85..8eadea9e3736962c724e56e2ef4b475f3e7ccf70 100644 (file)
@@ -13,6 +13,7 @@
 enum ltt_type {
        LTT_TYPE_SIGNED_INT,
        LTT_TYPE_UNSIGNED_INT,
+       LTT_TYPE_POINTER,
        LTT_TYPE_STRING,
        LTT_TYPE_COMPACT,
        LTT_TYPE_NONE,
index f344be05340ded706200692dd26cac1d0cf1806e..87c053df467af8d23c18ababfd68812a1b166d23 100644 (file)
@@ -80,7 +80,7 @@ static inline const char *parse_trace_type(struct marker_info *info,
       *trace_type = LTT_TYPE_STRING;
       goto parse_end;
     case 'p':
-      *trace_type = LTT_TYPE_UNSIGNED_INT;
+      *trace_type = LTT_TYPE_POINTER;
       *trace_size = info->pointer_size;
       goto parse_end;
     case 'd':
@@ -184,7 +184,7 @@ static inline const char *parse_c_type(struct marker_info *info,
       *c_type = LTT_TYPE_STRING;
       goto parse_end;
     case 'p':
-      *c_type = LTT_TYPE_UNSIGNED_INT;
+      *c_type = LTT_TYPE_POINTER;
       *c_size = info->pointer_size;
       goto parse_end;
     case 'd':
index 602c2c140b848cae06555ad8e65d8068683b3db2..c98c2425cc1a9810a8b903e2440b8dd70e1773dd 100644 (file)
@@ -105,17 +105,17 @@ void lttv_print_field(LttEvent *e, struct marker_field *f, GString *s,
      //g_string_append_printf(s, "%g", ltt_event_get_double(e,f));
       g_string_append_printf(s, type->fmt, ltt_event_get_double(e,f));
       break;
+#endif
 
-    case LTT_POINTER:
+    case LTT_TYPE_POINTER:
       if(field_names) {
-        name = ltt_field_name(f);
+        name = f->name;
         if(name)
           g_string_append_printf(s, "%s = ", g_quark_to_string(name));
       }
-      // g_string_append_printf(s, "0x%llx", ltt_event_get_long_unsigned(e,f));
-      g_string_append_printf(s, type->fmt, ltt_event_get_long_unsigned(e,f));
+      g_string_append_printf(s, "0x%llx", ltt_event_get_long_unsigned(e,f));
+      //g_string_append_printf(s, type->fmt, ltt_event_get_long_unsigned(e,f));
       break;
-#endif
 
     case LTT_TYPE_STRING:
       if(field_names) {
This page took 0.027234 seconds and 4 git commands to generate.