aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2read.c
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2010-11-22 20:35:02 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2010-11-22 20:35:02 +0000
commit594e8718e7feaa5081a59a09d7d3cdc3562ba7c2 (patch)
tree42256460182663b95bfc1699dd3b1752402c94e0 /gdb/dwarf2read.c
parent7ba86c9e6635c76e9c66f15b0b945425c790c5c7 (diff)
downloadgdb-594e8718e7feaa5081a59a09d7d3cdc3562ba7c2.zip
gdb-594e8718e7feaa5081a59a09d7d3cdc3562ba7c2.tar.gz
gdb-594e8718e7feaa5081a59a09d7d3cdc3562ba7c2.tar.bz2
gdb/
* dwarf2read.c (dwarf2_read_index): Ignore higher .gdb_index versions.
Diffstat (limited to 'gdb/dwarf2read.c')
-rw-r--r--gdb/dwarf2read.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 7ad8037..f6ee438 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -1941,6 +1941,10 @@ dwarf2_read_index (struct objfile *objfile)
it seems better to just ignore such indices. */
if (version < 3)
return 0;
+ /* Indexes with higher version than the one supported by GDB may be no
+ longer backward compatible. */
+ if (version > 3)
+ return 0;
map = OBSTACK_ZALLOC (&objfile->objfile_obstack, struct mapped_index);
map->total_size = dwarf2_per_objfile->gdb_index.size;