Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [RFA, doc RFA] New option set use-deprecated-index-sections
@ 2012-07-17 21:24 dje
  2012-07-17 21:43 ` Jan Kratochvil
  0 siblings, 1 reply; 17+ messages in thread
From: dje @ 2012-07-17 21:24 UTC (permalink / raw)
  To: gdb-patches

Hi.

I have a need to be able to control the use of deprecated index sections
with an option, instead of the command line.

I was going to wait to apply this until after 7.5,
but with the new "-iex" option I realize that the new
"--use-deprecated-index-sections" option could be considered redundant.
So I'm thinking about deleting that as well, in favor of having just this.

What do y'all think?

2012-07-17  Doug Evans  <dje@google.com>

	* NEWS: Document new options "set/show use-deprecated-index-sections".
	* dwarf2read.c (_initialize_dwarf2_read): New options
	"set/show use-deprecated-index-sections".

	doc/
	* gdb.texinfo (Index Files): Document how to control the use of
	deprecated index sections.

Index: NEWS
===================================================================
RCS file: /cvs/src/src/gdb/NEWS,v
retrieving revision 1.533
diff -u -p -r1.533 NEWS
--- NEWS	4 Jul 2012 20:49:56 -0000	1.533
+++ NEWS	17 Jul 2012 21:17:47 -0000
@@ -137,6 +137,10 @@
 
 * New commands
 
+  ** "set use-deprecated-index-sections on|off"
+     "show use-deprecated-index-sections on|off"
+     Controls the use of deprecated .gdb_index sections.
+
   ** "catch load" and "catch unload" can be used to stop when a shared
      library is loaded or unloaded, respectively.
 
Index: dwarf2read.c
===================================================================
RCS file: /cvs/src/src/gdb/dwarf2read.c,v
retrieving revision 1.687
diff -u -p -r1.687 dwarf2read.c
--- dwarf2read.c	16 Jul 2012 03:22:40 -0000	1.687
+++ dwarf2read.c	17 Jul 2012 21:13:14 -0000
@@ -19387,6 +19387,17 @@ the demangler."),
 			   NULL, show_check_physname,
 			   &setdebuglist, &showdebuglist);
 
+  add_setshow_boolean_cmd ("use-deprecated-index-sections",
+			   no_class, &use_deprecated_index_sections, _("\
+Set whether to use deprecated gdb_index sections."), _("\
+Show whether to use deprecated gdb_index sections."), _("\
+When enabled .gdb_index sections that have been deprecated are used anyway.\n\
+Normally they are ignored either because of a missing feature or\n\
+performance issue."),
+			    NULL,
+			    NULL,
+			    &setlist, &showlist);
+
   c = add_cmd ("gdb-index", class_files, save_gdb_index_command,
 	       _("\
 Save a gdb-index file.\n\
Index: doc/gdb.texinfo
===================================================================
RCS file: /cvs/src/src/gdb/doc/gdb.texinfo,v
retrieving revision 1.990
diff -u -p -r1.990 gdb.texinfo
--- doc/gdb.texinfo	5 Jul 2012 01:08:24 -0000	1.990
+++ doc/gdb.texinfo	17 Jul 2012 21:13:15 -0000
@@ -16753,6 +16753,26 @@ $ objcopy --add-section .gdb_index=symfi
     --set-section-flags .gdb_index=readonly symfile symfile
 @end smallexample
 
+@value{GDBN} will normally ignore older versions of @file{.gdb_index}
+sections that have been deprecated.  Usually they are deprecated because
+they are missing a new feature or have performance issues.
+
+There are two ways to control the use deprecated index sections:
+
+@table @code
+
+@item -use-deprecated-index-sections
+Pass this command line option when starting @value{GDBN}.
+
+@item set use-deprecated-index-sections
+@kindex set use-deprecated-index-sections
+Set this option to control the treatment of deprecated index sections.
+When @code{on}, index sections are used even if they are deprecated.
+When @code{off}, only current versions of index sections are used.
+The default is @code{off}.
+
+@end table
+
 There are currently some limitation on indices.  They only work when
 for DWARF debugging information, not stabs.  And, they do not
 currently work for programs using Ada.


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2012-07-27 21:39 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-17 21:24 [RFA, doc RFA] New option set use-deprecated-index-sections dje
2012-07-17 21:43 ` Jan Kratochvil
2012-07-17 22:10   ` Doug Evans
2012-07-18 22:34   ` dje
2012-07-18 23:33     ` Jan Kratochvil
2012-07-18 23:53       ` dje
2012-07-19  7:03         ` Jan Kratochvil
2012-07-19 16:09       ` Eli Zaretskii
2012-07-19 16:28         ` Doug Evans
2012-07-19 16:45           ` Eli Zaretskii
2012-07-19 18:26             ` dje
2012-07-19 19:02               ` Eli Zaretskii
2012-07-20 18:01                 ` dje
2012-07-25 14:33                   ` [patch] testsuite: Fix gdb.mi/* regression on RHEL-6 [Re: [RFA, doc RFA] New option set use-deprecated-index-sections] Jan Kratochvil
2012-07-25 20:36                     ` [commit+7.5] " Jan Kratochvil
2012-07-27 21:39                       ` [commit#2+7.5] " Jan Kratochvil
2012-07-19 16:11     ` [RFA, doc RFA] New option set use-deprecated-index-sections Eli Zaretskii

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox