summaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
authorDoug Evans <dje@sebabeach.org>2012-10-11 14:24:54 +0000
committerDoug Evans <dje@sebabeach.org>2012-10-11 14:24:54 +0000
commit3fc8104c77403494f1378514588fe86cad04a7ae (patch)
treeb93b8d1a2cd6016ef02cffe75a2086ecd33db219 /binutils
parentf58c26c62c2e9ca5b37937fb934e95854e912d3c (diff)
downloadbinutils-redhat-3fc8104c77403494f1378514588fe86cad04a7ae.tar.gz
* dwarf.c (display_gdb_index): Include static/global information
of each symbol.
Diffstat (limited to 'binutils')
-rw-r--r--binutils/ChangeLog5
-rw-r--r--binutils/dwarf.c23
2 files changed, 23 insertions, 5 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 1ae2fc045b..660d037422 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,8 @@
+2012-10-11 Doug Evans <dje@google.com>
+
+ * dwarf.c (display_gdb_index): Include static/global information
+ of each symbol.
+
2012-09-14 David Edelsohn <dje.gcc@gmail.com>
* configure: Regenerate.
diff --git a/binutils/dwarf.c b/binutils/dwarf.c
index 86d42a380e..fa6860c021 100644
--- a/binutils/dwarf.c
+++ b/binutils/dwarf.c
@@ -5793,9 +5793,11 @@ display_gdb_index (struct dwarf_section *section,
printf ("\n");
for (j = 0; j < num_cus; ++j)
{
+ int is_static;
gdb_index_symbol_kind kind;
cu = byte_get_little_endian (constant_pool + cu_vector_offset + 4 + j * 4, 4);
+ is_static = GDB_INDEX_SYMBOL_STATIC_VALUE (cu);
kind = GDB_INDEX_SYMBOL_KIND_VALUE (cu);
cu = GDB_INDEX_CU_VALUE (cu);
/* Convert to TU number if it's for a type unit. */
@@ -5811,19 +5813,30 @@ display_gdb_index (struct dwarf_section *section,
printf (_(" [no symbol information]"));
break;
case GDB_INDEX_SYMBOL_KIND_TYPE:
- printf (_(" [type]"));
+ printf (is_static
+ ? _(" [static type]")
+ : _(" [global type]"));
break;
case GDB_INDEX_SYMBOL_KIND_VARIABLE:
- printf (_(" [variable]"));
+ printf (is_static
+ ? _(" [static variable]")
+ : _(" [global variable]"));
break;
case GDB_INDEX_SYMBOL_KIND_FUNCTION:
- printf (_(" [function]"));
+ printf (is_static
+ ? _(" [static function]")
+ : _(" [global function]"));
break;
case GDB_INDEX_SYMBOL_KIND_OTHER:
- printf (_(" [other]"));
+ printf (is_static
+ ? _(" [static other]")
+ : _(" [global other]"));
break;
default:
- printf (_(" [unknown: %d]"), kind);
+ printf (is_static
+ ? _(" [static unknown: %d]")
+ : _(" [global unknown: %d]"),
+ kind);
break;
}
if (num_cus > 1)