]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
patch ../102425604.patch
authorDoug Evans <dje@google.com>
Thu, 10 Dec 2015 20:00:29 +0000 (12:00 -0800)
committerDoug Evans <dje@google.com>
Thu, 10 Dec 2015 20:00:29 +0000 (12:00 -0800)
README.google
gdb/dwarf2read.c

index 5a29e0d13854aeb40d2da2f11fbade50a3d7473f..a592883b5cee6202f3842335e03d51de8a5795ae 100644 (file)
@@ -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  <dje@google.com>
++
++      * dwarf2read.c (use_index_sections): New static global.
++      (read_index_from_section): Check it.
++      (_initialize_dwarf2_read): New option "use-index-sections".
index 496b74f4eb6ec88c7965b3cb33941c8c4c23897f..5cb988b983f6b73e5f5dcacc00419630e901e0a4 100644 (file)
@@ -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\