From 5280a7a34ac72b2aeb5004fc8508b92c54c6e765 Mon Sep 17 00:00:00 2001 From: Doug Evans Date: Thu, 10 Dec 2015 12:00:29 -0800 Subject: [PATCH] patch ../102425604.patch --- README.google | 8 ++++++++ gdb/dwarf2read.c | 21 +++++++++++++++++++++ 2 files changed, 29 insertions(+) diff --git a/README.google b/README.google index 5a29e0d1385..a592883b5ce 100644 --- a/README.google +++ b/README.google @@ -60,3 +60,11 @@ they are an ongoing maintenance burden. + that var-cmd.dwo isn't clobbered. + + * testsuite/boards/fission.exp: Add blaze support. +--- README.google 2015-09-05 15:16:13.000000000 -0700 ++++ README.google 2015-09-05 15:19:05.000000000 -0700 ++ ++2015-09-05 Doug Evans ++ ++ * dwarf2read.c (use_index_sections): New static global. ++ (read_index_from_section): Check it. ++ (_initialize_dwarf2_read): New option "use-index-sections". diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index 496b74f4eb6..5cb988b983f 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -93,6 +93,11 @@ static int check_physname = 0; /* When non-zero, do not reject deprecated .gdb_index sections. */ static int use_deprecated_index_sections = 0; +/* GOOGLE LOCAL + When non-zero, use the .gdb_index section if present. + This is an escape-hatch in case problems are found with the index. */ +static int use_index_sections = 1; + static const struct objfile_data *dwarf2_objfile_data_key; /* The "aclass" indices for various kinds of computed DWARF symbols. */ @@ -3054,6 +3059,9 @@ read_index_from_section (struct objfile *objfile, offset_type *metadata; int i; + if (!use_index_sections) /* GOOGLE LOCAL */ + return 0; + if (dwarf2_section_empty_p (section)) return 0; @@ -23484,6 +23492,19 @@ Warning: This option must be enabled before gdb reads the file."), NULL, &setlist, &showlist); + /* GOOGLE LOCAL: escape hatch in case an index is bad. */ + add_setshow_boolean_cmd ("use-index-sections", + no_class, &use_index_sections, _("\ +Set whether to use gdb_index sections."), _("\ +Show whether to use gdb_index sections."), _("\ +When disabled .gdb_index sections are not used.\n\ +This option exists as an escape hatch in case of a bad index.\n\ +Warning: This option must be disabled before gdb reads the file."), + NULL, + NULL, + &setlist, &showlist); + /* END GOOGLE LOCAL */ + c = add_cmd ("gdb-index", class_files, save_gdb_index_command, _("\ Save a gdb-index file.\n\ -- 2.47.2