From 91346f59cc3db03777b8d6f6c8a803a5bd37785f Mon Sep 17 00:00:00 2001 From: compudj Date: Thu, 11 Oct 2007 20:13:53 +0000 Subject: [PATCH] add pointer type git-svn-id: http://ltt.polymtl.ca/svn@2658 04897980-b3bd-0310-b5e0-8ef037075253 --- ltt/branches/poly/ltt/marker-field.h | 1 + ltt/branches/poly/ltt/marker.c | 4 ++-- ltt/branches/poly/lttv/lttv/print.c | 10 +++++----- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/ltt/branches/poly/ltt/marker-field.h b/ltt/branches/poly/ltt/marker-field.h index 5cc87794..8eadea9e 100644 --- a/ltt/branches/poly/ltt/marker-field.h +++ b/ltt/branches/poly/ltt/marker-field.h @@ -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, diff --git a/ltt/branches/poly/ltt/marker.c b/ltt/branches/poly/ltt/marker.c index f344be05..87c053df 100644 --- a/ltt/branches/poly/ltt/marker.c +++ b/ltt/branches/poly/ltt/marker.c @@ -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': diff --git a/ltt/branches/poly/lttv/lttv/print.c b/ltt/branches/poly/lttv/lttv/print.c index 602c2c14..c98c2425 100644 --- a/ltt/branches/poly/lttv/lttv/print.c +++ b/ltt/branches/poly/lttv/lttv/print.c @@ -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) { -- 2.34.1