perf probe: Print an enum type variable in "enum variable-name" format when showing...
authorHyeoncheol Lee <hyc.lee@gmail.com>
Thu, 27 Sep 2012 02:36:39 +0000 (11:36 +0900)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 27 Sep 2012 13:58:57 +0000 (10:58 -0300)
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>
tools/perf/util/dwarf-aux.c

index ee51e9b..3e5f543 100644 (file)
@@ -804,6 +804,8 @@ int die_get_typename(Dwarf_Die *vr_die, char *buf, int len)
                        tmp = "union ";
                else if (tag == DW_TAG_structure_type)
                        tmp = "struct ";
+               else if (tag == DW_TAG_enumeration_type)
+                       tmp = "enum ";
                /* Write a base name */
                ret = snprintf(buf, len, "%s%s", tmp, dwarf_diename(&type));
                return (ret >= len) ? -E2BIG : ret;