aboutsummaryrefslogtreecommitdiffstats
path: root/elff/dwarf_utils.h
diff options
context:
space:
mode:
authorVladimir Chtchetkine <vchtchetkine@google.com>2010-02-16 10:38:35 -0800
committerVladimir Chtchetkine <vchtchetkine@google.com>2010-02-18 15:22:07 -0800
commit5389aa19033153c09556d1362a8b8a56abccb8f5 (patch)
tree5d731effe5bd5d2f162f06aadec7212045eaef3d /elff/dwarf_utils.h
parent76dbca0489ab98a46f2954bc7b77c3df6f9d8264 (diff)
downloadexternal_qemu-5389aa19033153c09556d1362a8b8a56abccb8f5.zip
external_qemu-5389aa19033153c09556d1362a8b8a56abccb8f5.tar.gz
external_qemu-5389aa19033153c09556d1362a8b8a56abccb8f5.tar.bz2
Merge memory checking from sandbox
Change-id: Ibce845d0
Diffstat (limited to 'elff/dwarf_utils.h')
-rw-r--r--elff/dwarf_utils.h63
1 files changed, 63 insertions, 0 deletions
diff --git a/elff/dwarf_utils.h b/elff/dwarf_utils.h
new file mode 100644
index 0000000..fc007d1
--- /dev/null
+++ b/elff/dwarf_utils.h
@@ -0,0 +1,63 @@
+/* Copyright (C) 2007-2010 The Android Open Source Project
+**
+** This software is licensed under the terms of the GNU General Public
+** License version 2, as published by the Free Software Foundation, and
+** may be copied, distributed, and modified under those terms.
+**
+** This program is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+** GNU General Public License for more details.
+*/
+
+/*
+ * Contains declarations of misc. DWARF utility routines.
+ */
+
+#ifndef ELFF_DWARF_UTILS_
+#define ELFF_DWARF_UTILS_
+
+#include "dwarf_defs.h"
+
+/* Gets DWARF attribute name string (DW_AT_Xxx) for a given attribute ID.
+ * Param:
+ * at - DWARF attribute ID to get name string for.
+ * Return:
+ * Attribute name string. Note that this routine returns "DW_AT_Unknown",
+ * if DWARF attribute value passed to this routine has not been recognized.
+ */
+const char* dwarf_at_name(Dwarf_At at);
+
+/* Gets DWARF form name string (DW_FORM_Xxx) for a given form.
+ * Param:
+ * form - DWARF form to get name string for.
+ * Return:
+ * Form name string. Note that this routine returns "DW_FORM_Unknown", if
+ * DWARF form value passed to this routine has not been recognized.
+ */
+const char* dwarf_form_name(Dwarf_Form form);
+
+/* Gets DWARF tag name string (DW_TAG_Xxx) for a given tag.
+ * Param:
+ * tag - DWARF tag to get name string for.
+ * Return:
+ * Tag name string. Note that this routine returns "DW_TAG_Unknown", if DWARF
+ * tag value passed to this routine has not been recognized.
+ */
+const char* dwarf_tag_name(Dwarf_Tag tag);
+
+/* Dumps DWARF attribute to stdout.
+ * Param:
+ * at - Attribute ID (DW_AT_Xxx)
+ * form - Attribute form (DW_FORM_Xxx)
+ * val - Attribute value.
+ */
+void dump_attrib(Dwarf_At at, Dwarf_Form form, const Dwarf_Value* val);
+
+/* Dumps DWARF attribute value to stdout.
+ * Param:
+ * val - Attribute value.
+ */
+void dump_value(const Dwarf_Value* val);
+
+#endif // ELFF_DWARF_UTILS_