From 594e8718e7feaa5081a59a09d7d3cdc3562ba7c2 Mon Sep 17 00:00:00 2001 From: Jan Kratochvil Date: Mon, 22 Nov 2010 20:35:02 +0000 Subject: [PATCH] gdb/ * dwarf2read.c (dwarf2_read_index): Ignore higher .gdb_index versions. --- gdb/ChangeLog | 4 ++++ gdb/dwarf2read.c | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 4d5011f8c4e..314753b1be3 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2010-11-22 Jan Kratochvil + + * dwarf2read.c (dwarf2_read_index): Ignore higher .gdb_index versions. + 2010-11-22 Tom Tromey * Makefile.in (.PRECIOUS): Reference ada-lex.c. diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index 7ad8037d4ea..f6ee4384f86 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; -- 2.30.2