Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: dje@google.com
To: gdb-patches@sourceware.org
Subject: [RFA, doc RFA] New option set use-deprecated-index-sections
Date: Tue, 17 Jul 2012 21:24:00 -0000	[thread overview]
Message-ID: <yjt28vei2iag.fsf@ruffy2.mtv.corp.google.com> (raw)

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.


             reply	other threads:[~2012-07-17 21:24 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-17 21:24 dje [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=yjt28vei2iag.fsf@ruffy2.mtv.corp.google.com \
    --to=dje@google.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox