From bb2d17a014914b628df42b0c76c85fa8a8c57e79 Mon Sep 17 00:00:00 2001 From: Hyeoncheol Lee Date: Thu, 27 Sep 2012 11:36:39 +0900 Subject: [PATCH] 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 Acked-by: Masami Hiramatsu Cc: Masami Hiramatsu Link: http://lkml.kernel.org/r/1348713399-4541-1-git-send-email-hyc.lee@gmail.com Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/dwarf-aux.c | 2 ++ 1 file changed, 2 insertions(+) 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) 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; -- 2.20.1