aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorHyeoncheol Lee <hyc.lee@gmail.com>2012-09-26 22:36:39 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2012-09-27 09:58:57 -0400
commitbb2d17a014914b628df42b0c76c85fa8a8c57e79 (patch)
tree19d10c4005dae58a76909bb171901a0ae6101da3 /tools
parent4d29089c2b70ffeb61656ffd1b9c9c52602ddd44 (diff)
perf probe: Print an enum type variable in "enum variable-name" format when showing accessible variables
When showing accessible variables, an enum type variable was printed in "variable-name" format. Change this format into "enum variable-name". Signed-off-by: Hyeoncheol Lee <hyc.lee@gmail.com> Acked-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> Link: http://lkml.kernel.org/r/1348713399-4541-1-git-send-email-hyc.lee@gmail.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/perf/util/dwarf-aux.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/perf/util/dwarf-aux.c b/tools/perf/util/dwarf-aux.c
index ee51e9b4dc09..3e5f5430a28a 100644
--- a/tools/perf/util/dwarf-aux.c
+++ b/tools/perf/util/dwarf-aux.c
@@ -804,6 +804,8 @@ int die_get_typename(Dwarf_Die *vr_die, char *buf, int len)
804 tmp = "union "; 804 tmp = "union ";
805 else if (tag == DW_TAG_structure_type) 805 else if (tag == DW_TAG_structure_type)
806 tmp = "struct "; 806 tmp = "struct ";
807 else if (tag == DW_TAG_enumeration_type)
808 tmp = "enum ";
807 /* Write a base name */ 809 /* Write a base name */
808 ret = snprintf(buf, len, "%s%s", tmp, dwarf_diename(&type)); 810 ret = snprintf(buf, len, "%s%s", tmp, dwarf_diename(&type));
809 return (ret >= len) ? -E2BIG : ret; 811 return (ret >= len) ? -E2BIG : ret;