* [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* Re: [RFA, doc RFA] New option set use-deprecated-index-sections 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 0 siblings, 2 replies; 17+ messages in thread From: Jan Kratochvil @ 2012-07-17 21:43 UTC (permalink / raw) To: dje; +Cc: gdb-patches On Tue, 17 Jul 2012 23:23:51 +0200, dje@google.com wrote: > 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. I would find less GDB options to be good. > +@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}. This is not completely correct: if (version < 6 && !use_deprecated_index_sections) if (version > 7) So version 6 is not "current" but it is still used even without -use-deprecated-index-sections. At least gdb doc should be exact IMO. It is also questionable if version 6 should be ignored without -use-deprecated-index-sections. I guess the possible performance regression (against non-index case) is so rare it was not worth ignoring version 6. Thanks, Jan ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [RFA, doc RFA] New option set use-deprecated-index-sections 2012-07-17 21:43 ` Jan Kratochvil @ 2012-07-17 22:10 ` Doug Evans 2012-07-18 22:34 ` dje 1 sibling, 0 replies; 17+ messages in thread From: Doug Evans @ 2012-07-17 22:10 UTC (permalink / raw) To: Jan Kratochvil; +Cc: gdb-patches On Tue, Jul 17, 2012 at 2:42 PM, Jan Kratochvil <jan.kratochvil@redhat.com> wrote: > On Tue, 17 Jul 2012 23:23:51 +0200, dje@google.com wrote: >> 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. > > I would find less GDB options to be good. > > >> +@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}. > > This is not completely correct: > if (version < 6 && !use_deprecated_index_sections) > if (version > 7) I chose the word "current" to include handling this case (i.e. "current" wasn't intended to convey "latest". Rather, it was intended to convey "not-deprecated" and avoid going into a whole lot of extra verbiage). No disagreement that it could be worded better of course. > So version 6 is not "current" but it is still used even without > -use-deprecated-index-sections. At least gdb doc should be exact IMO. > > It is also questionable if version 6 should be ignored without > -use-deprecated-index-sections. I guess the possible performance regression > (against non-index case) is so rare it was not worth ignoring version 6. > > > Thanks, > Jan ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [RFA, doc RFA] New option set use-deprecated-index-sections 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-19 16:11 ` [RFA, doc RFA] New option set use-deprecated-index-sections Eli Zaretskii 1 sibling, 2 replies; 17+ messages in thread From: dje @ 2012-07-18 22:34 UTC (permalink / raw) To: Jan Kratochvil; +Cc: gdb-patches, eliz Jan Kratochvil writes: > On Tue, 17 Jul 2012 23:23:51 +0200, dje@google.com wrote: > > 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. > > I would find less GDB options to be good. > > > > +@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}. > > This is not completely correct: > if (version < 6 && !use_deprecated_index_sections) > if (version > 7) > > So version 6 is not "current" but it is still used even without > -use-deprecated-index-sections. At least gdb doc should be exact IMO. > > It is also questionable if version 6 should be ignored without > -use-deprecated-index-sections. I guess the possible performance regression > (against non-index case) is so rare it was not worth ignoring version 6. How about this? (for cvs head and the 7.5 branch) [This patch needs a slight tweak to apply cleanly to the branch. I'll make the tweak after checking this into head.] P.S. Eli, I need a doc RFA here too. Thanks. 2012-07-18 Doug Evans <dje@google.com> * NEWS: Document new options "set/show use-deprecated-index-sections", and delete reference to --use-deprecated-index-sections. * symfile.h (use_deprecated_index_sections): Delete. * dwarf2read.c (use_deprecated_index_sections): Make static. (read_index_from_section): Update wording of how to load deprecated index sections. (_initialize_dwarf2_read): New options "set/show use-deprecated-index-sections". * main.c (captured_main): Delete --use-deprecated-index-sections. doc/ * gdb.texinfo (Mode Options): Delete --use-deprecated-index-sections. (Index Files): Document how to control the use of deprecated index sections. (Index Section Format): Replace --use-deprecated-index-sections with "set use-deprecated-index-sections on". Index: NEWS =================================================================== RCS file: /cvs/src/src/gdb/NEWS,v retrieving revision 1.534 diff -u -p -r1.534 NEWS --- NEWS 18 Jul 2012 04:02:10 -0000 1.534 +++ NEWS 18 Jul 2012 22:21:17 -0000 @@ -114,11 +114,13 @@ * The .gdb_index section has been updated to include symbols for inlined functions. GDB will ignore older .gdb_index sections by default, which could cause symbol files to be loaded more slowly - until their .gdb_index sections can be recreated. The new option - --use-deprecated-index-sections will cause GDB to use any older - .gdb_index sections it finds. This will restore performance, but - the ability to set breakpoints on inlined functions will be lost - in symbol files with older .gdb_index sections. + until their .gdb_index sections can be recreated. The new command + "set use-deprecated-index-sections on" will cause GDB to use any older + .gdb_index sections it finds. To control this from the command line + use "-iex 'set use-deprecated-index-sections on'". + This will restore performance, but the ability to set breakpoints on + inlined functions will be lost in symbol files with older .gdb_index + sections. The .gdb_index section has also been updated to record more information about each symbol. This speeds up the "info variables", "info functions" @@ -139,6 +141,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.693 diff -u -p -r1.693 dwarf2read.c --- dwarf2read.c 18 Jul 2012 20:01:27 -0000 1.693 +++ dwarf2read.c 18 Jul 2012 22:21:18 -0000 @@ -85,7 +85,7 @@ static int dwarf2_die_debug = 0; static int check_physname = 0; /* When non-zero, do not reject deprecated .gdb_index sections. */ -int use_deprecated_index_sections = 0; +static int use_deprecated_index_sections = 0; /* When set, the file that we're processing is known to have debugging info for C++ namespaces. GCC 3.3.x did not produce this information, @@ -2611,15 +2611,18 @@ read_index_from_section (struct objfile Versions earlier than 6 did not emit psymbols for inlined functions. Using these files will cause GDB not to be able to set breakpoints on inlined functions by name, so we ignore these - indices unless the --use-deprecated-index-sections command line - option was supplied. */ + indices unless the user has done + "set use-deprecated-index-sections on". */ if (version < 6 && !deprecated_ok) { static int warning_printed = 0; if (!warning_printed) { - warning (_("Skipping deprecated .gdb_index section in %s, pass " - "--use-deprecated-index-sections to use them anyway"), + warning (_("\ +Skipping deprecated .gdb_index section in %s.\n\ +Do \"set use-deprecated-index-sections on\" to use them anyway.\n\ +This can be done from the command line by passing\n\ +`-iex \"set use-deprecated-index-sections on\"' to gdb."), filename); warning_printed = 1; } @@ -19630,6 +19633,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: main.c =================================================================== RCS file: /cvs/src/src/gdb/main.c,v retrieving revision 1.110 diff -u -p -r1.110 main.c --- main.c 2 Jul 2012 12:05:00 -0000 1.110 +++ main.c 18 Jul 2012 22:21:18 -0000 @@ -471,8 +471,6 @@ captured_main (void *data) {"args", no_argument, &set_args, 1}, {"l", required_argument, 0, 'l'}, {"return-child-result", no_argument, &return_child_result, 1}, - {"use-deprecated-index-sections", no_argument, - &use_deprecated_index_sections, 1}, {0, no_argument, 0, 0} }; Index: symfile.h =================================================================== RCS file: /cvs/src/src/gdb/symfile.h,v retrieving revision 1.110 diff -u -p -r1.110 symfile.h --- symfile.h 18 Jul 2012 16:12:17 -0000 1.110 +++ symfile.h 18 Jul 2012 22:21:18 -0000 @@ -673,9 +673,6 @@ extern void dwarf2_build_frame_info (str void dwarf2_free_objfile (struct objfile *); -/* Whether to use deprecated .gdb_index sections. */ -extern int use_deprecated_index_sections; - /* From mdebugread.c */ /* Hack to force structures to exist before use in parameter list. */ 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 18 Jul 2012 22:21:19 -0000 @@ -1247,13 +1247,6 @@ memory usage after it completes each com This option causes @value{GDBN} to print its version number and no-warranty blurb, and exit. -@item -use-deprecated-index-sections -@cindex @code{--use-deprecated-index-sections} -This option causes @value{GDBN} to read and use deprecated -@samp{.gdb_index} sections from symbol files. This can speed up -startup, but may result in some functionality being lost. -@xref{Index Section Format}. - @end table @node Startup @@ -16753,6 +16746,15 @@ $ 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. +To tell @value{GDBN} to use a deprecated index section anyway +specify @code{set use-deprecated-index-sections on}. +The default is @code{off}. +This can speed up startup, but may result in some functionality being lost. +@xref{Index Section Format}. + 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. @@ -40408,7 +40410,7 @@ Version 4 uses a different hashing funct Version 6 includes symbols for inlined functions, whereas versions 4 and 5 do not. Version 7 adds attributes to the CU indices in the symbol table. @value{GDBN} will only read version 4, 5, or 6 indices -if the @code{--use-deprecated-index-sections} option is used. +by specifying @code{set use-deprecated-index-sections on}. @item The offset, from the start of the file, of the CU list. ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [RFA, doc RFA] New option set use-deprecated-index-sections 2012-07-18 22:34 ` dje @ 2012-07-18 23:33 ` Jan Kratochvil 2012-07-18 23:53 ` dje 2012-07-19 16:09 ` Eli Zaretskii 2012-07-19 16:11 ` [RFA, doc RFA] New option set use-deprecated-index-sections Eli Zaretskii 1 sibling, 2 replies; 17+ messages in thread From: Jan Kratochvil @ 2012-07-18 23:33 UTC (permalink / raw) To: dje; +Cc: gdb-patches, eliz On Thu, 19 Jul 2012 00:33:42 +0200, dje@google.com wrote: > + use "-iex 'set use-deprecated-index-sections on'". [...] > +`-iex \"set use-deprecated-index-sections on\"' to gdb."), It is more Eli's decision but I would find it overquoted. (1) ` is deprecated by GNU Coding Standard in favor of '. (2) If user really passes "-iex 'set use-deprecated-index-sections on'" to GDB it will not work: $ gdb "-iex 'set use-deprecated-index-sections on'" gdb: unrecognized option '-iex 'set use-deprecated-index-sections on'' So IMO: > + use: -iex 'set use-deprecated-index-sections on' [...] > +-iex \"set use-deprecated-index-sections on\" to gdb."), Thanks, Jan ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [RFA, doc RFA] New option set use-deprecated-index-sections 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 1 sibling, 1 reply; 17+ messages in thread From: dje @ 2012-07-18 23:53 UTC (permalink / raw) To: Jan Kratochvil; +Cc: gdb-patches, eliz Jan Kratochvil writes: > On Thu, 19 Jul 2012 00:33:42 +0200, dje@google.com wrote: > > + use "-iex 'set use-deprecated-index-sections on'". > [...] > > +`-iex \"set use-deprecated-index-sections on\"' to gdb."), > > It is more Eli's decision but I would find it overquoted. > (1) ` is deprecated by GNU Coding Standard in favor of '. > (2) If user really passes "-iex 'set use-deprecated-index-sections on'" > to GDB it will not work: > $ gdb "-iex 'set use-deprecated-index-sections on'" > gdb: unrecognized option '-iex 'set use-deprecated-index-sections on'' > > So IMO: > > + use: -iex 'set use-deprecated-index-sections on' > [...] > > +-iex \"set use-deprecated-index-sections on\" to gdb."), One could apply the same reasoning to a lot of other places. I'm happy to follow whatever rules there are, I just require them to be applied consistently. Maybe it should be phrased as <-iex \"set use-deprecated-index-sections on\"> since when we say "Type <return> to continue" we assume they know we're not asking them to type < r e t u r n >. :-( ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [RFA, doc RFA] New option set use-deprecated-index-sections 2012-07-18 23:53 ` dje @ 2012-07-19 7:03 ` Jan Kratochvil 0 siblings, 0 replies; 17+ messages in thread From: Jan Kratochvil @ 2012-07-19 7:03 UTC (permalink / raw) To: dje; +Cc: gdb-patches, eliz On Thu, 19 Jul 2012 01:52:48 +0200, dje@google.com wrote: > Maybe it should be phrased as > <-iex \"set use-deprecated-index-sections on\"> Yes, I find it more clear to the user FYI although I respect Eli's opinion on the subject. Thanks, Jan ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [RFA, doc RFA] New option set use-deprecated-index-sections 2012-07-18 23:33 ` Jan Kratochvil 2012-07-18 23:53 ` dje @ 2012-07-19 16:09 ` Eli Zaretskii 2012-07-19 16:28 ` Doug Evans 1 sibling, 1 reply; 17+ messages in thread From: Eli Zaretskii @ 2012-07-19 16:09 UTC (permalink / raw) To: Jan Kratochvil; +Cc: dje, gdb-patches > Date: Thu, 19 Jul 2012 01:33:03 +0200 > From: Jan Kratochvil <jan.kratochvil@redhat.com> > Cc: gdb-patches@sourceware.org, eliz@gnu.org > > On Thu, 19 Jul 2012 00:33:42 +0200, dje@google.com wrote: > > + use "-iex 'set use-deprecated-index-sections on'". > [...] > > +`-iex \"set use-deprecated-index-sections on\"' to gdb."), > > It is more Eli's decision but I would find it overquoted. How about removing that sentence altogether? We have no reason to advertise -iex in that particular warning message. ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [RFA, doc RFA] New option set use-deprecated-index-sections 2012-07-19 16:09 ` Eli Zaretskii @ 2012-07-19 16:28 ` Doug Evans 2012-07-19 16:45 ` Eli Zaretskii 0 siblings, 1 reply; 17+ messages in thread From: Doug Evans @ 2012-07-19 16:28 UTC (permalink / raw) To: Eli Zaretskii; +Cc: Jan Kratochvil, gdb-patches On Thu, Jul 19, 2012 at 9:08 AM, Eli Zaretskii <eliz@gnu.org> wrote: >> Date: Thu, 19 Jul 2012 01:33:03 +0200 >> From: Jan Kratochvil <jan.kratochvil@redhat.com> >> Cc: gdb-patches@sourceware.org, eliz@gnu.org >> >> On Thu, 19 Jul 2012 00:33:42 +0200, dje@google.com wrote: >> > + use "-iex 'set use-deprecated-index-sections on'". >> [...] >> > +`-iex \"set use-deprecated-index-sections on\"' to gdb."), >> >> It is more Eli's decision but I would find it overquoted. > > How about removing that sentence altogether? We have no reason to > advertise -iex in that particular warning message. I'd like to keep the content of the warning. I realize it's just a performance issue if users don't get .gdb_index, but in this case I think the current content of the warning is justified. It can't be that hard to come up with a simple way to be clear here. :-) How about "gdb -iex 'set use-deprecated-index-sections on' <program>" or something along those lines? ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [RFA, doc RFA] New option set use-deprecated-index-sections 2012-07-19 16:28 ` Doug Evans @ 2012-07-19 16:45 ` Eli Zaretskii 2012-07-19 18:26 ` dje 0 siblings, 1 reply; 17+ messages in thread From: Eli Zaretskii @ 2012-07-19 16:45 UTC (permalink / raw) To: Doug Evans; +Cc: jan.kratochvil, gdb-patches > Date: Thu, 19 Jul 2012 09:27:46 -0700 > From: Doug Evans <dje@google.com> > Cc: Jan Kratochvil <jan.kratochvil@redhat.com>, gdb-patches@sourceware.org > > On Thu, Jul 19, 2012 at 9:08 AM, Eli Zaretskii <eliz@gnu.org> wrote: > >> Date: Thu, 19 Jul 2012 01:33:03 +0200 > >> From: Jan Kratochvil <jan.kratochvil@redhat.com> > >> Cc: gdb-patches@sourceware.org, eliz@gnu.org > >> > >> On Thu, 19 Jul 2012 00:33:42 +0200, dje@google.com wrote: > >> > + use "-iex 'set use-deprecated-index-sections on'". > >> [...] > >> > +`-iex \"set use-deprecated-index-sections on\"' to gdb."), > >> > >> It is more Eli's decision but I would find it overquoted. > > > > How about removing that sentence altogether? We have no reason to > > advertise -iex in that particular warning message. > > I'd like to keep the content of the warning. The text you suggested is: warning (_("\ Skipping deprecated .gdb_index section in %s.\n\ Do \"set use-deprecated-index-sections on\" to use them anyway.\n\ This can be done from the command line by passing\n\ `-iex \"set use-deprecated-index-sections on\"' to gdb."), filename); I'm saying that mentioning the "set" command is enough, no need to also say that the command can be invoked through -iex, because _any_ GDB command can be invoked like that. That said, I won't argue. ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [RFA, doc RFA] New option set use-deprecated-index-sections 2012-07-19 16:45 ` Eli Zaretskii @ 2012-07-19 18:26 ` dje 2012-07-19 19:02 ` Eli Zaretskii 0 siblings, 1 reply; 17+ messages in thread From: dje @ 2012-07-19 18:26 UTC (permalink / raw) To: Eli Zaretskii, jan.kratochvil; +Cc: gdb-patches Eli Zaretskii writes: > > Date: Thu, 19 Jul 2012 09:27:46 -0700 > > From: Doug Evans <dje@google.com> > > Cc: Jan Kratochvil <jan.kratochvil@redhat.com>, gdb-patches@sourceware.org > > > > On Thu, Jul 19, 2012 at 9:08 AM, Eli Zaretskii <eliz@gnu.org> wrote: > > >> Date: Thu, 19 Jul 2012 01:33:03 +0200 > > >> From: Jan Kratochvil <jan.kratochvil@redhat.com> > > >> Cc: gdb-patches@sourceware.org, eliz@gnu.org > > >> > > >> On Thu, 19 Jul 2012 00:33:42 +0200, dje@google.com wrote: > > >> > + use "-iex 'set use-deprecated-index-sections on'". > > >> [...] > > >> > +`-iex \"set use-deprecated-index-sections on\"' to gdb."), > > >> > > >> It is more Eli's decision but I would find it overquoted. > > > > > > How about removing that sentence altogether? We have no reason to > > > advertise -iex in that particular warning message. > > > > I'd like to keep the content of the warning. > > The text you suggested is: > > warning (_("\ > Skipping deprecated .gdb_index section in %s.\n\ > Do \"set use-deprecated-index-sections on\" to use them anyway.\n\ > This can be done from the command line by passing\n\ > `-iex \"set use-deprecated-index-sections on\"' to gdb."), > filename); > > I'm saying that mentioning the "set" command is enough, no need to > also say that the command can be invoked through -iex, because _any_ > GDB command can be invoked like that. > > That said, I won't argue. How about this? 2012-07-19 Doug Evans <dje@google.com> * NEWS: Document new options "set/show use-deprecated-index-sections", and delete reference to --use-deprecated-index-sections. * symfile.h (use_deprecated_index_sections): Delete. * dwarf2read.c (use_deprecated_index_sections): Make static. (read_index_from_section): Update wording of how to load deprecated index sections. (_initialize_dwarf2_read): New options "set/show use-deprecated-index-sections". * main.c (captured_main): Delete --use-deprecated-index-sections. doc/ * gdb.texinfo (Mode Options): Delete --use-deprecated-index-sections. (Index Files): Document how to control the use of deprecated index sections. (Index Section Format): Replace --use-deprecated-index-sections with "set use-deprecated-index-sections on". Index: NEWS =================================================================== RCS file: /cvs/src/src/gdb/NEWS,v retrieving revision 1.534 diff -u -p -r1.534 NEWS --- NEWS 18 Jul 2012 04:02:10 -0000 1.534 +++ NEWS 19 Jul 2012 18:15:39 -0000 @@ -114,11 +114,11 @@ * The .gdb_index section has been updated to include symbols for inlined functions. GDB will ignore older .gdb_index sections by default, which could cause symbol files to be loaded more slowly - until their .gdb_index sections can be recreated. The new option - --use-deprecated-index-sections will cause GDB to use any older - .gdb_index sections it finds. This will restore performance, but - the ability to set breakpoints on inlined functions will be lost - in symbol files with older .gdb_index sections. + until their .gdb_index sections can be recreated. The new command + "set use-deprecated-index-sections on" will cause GDB to use any older + .gdb_index sections it finds. This will restore performance, but the + ability to set breakpoints on inlined functions will be lost in symbol + files with older .gdb_index sections. The .gdb_index section has also been updated to record more information about each symbol. This speeds up the "info variables", "info functions" @@ -139,6 +139,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.694 diff -u -p -r1.694 dwarf2read.c --- dwarf2read.c 19 Jul 2012 16:35:48 -0000 1.694 +++ dwarf2read.c 19 Jul 2012 18:15:40 -0000 @@ -85,7 +85,7 @@ static int dwarf2_die_debug = 0; static int check_physname = 0; /* When non-zero, do not reject deprecated .gdb_index sections. */ -int use_deprecated_index_sections = 0; +static int use_deprecated_index_sections = 0; /* When set, the file that we're processing is known to have debugging info for C++ namespaces. GCC 3.3.x did not produce this information, @@ -2611,15 +2611,17 @@ read_index_from_section (struct objfile Versions earlier than 6 did not emit psymbols for inlined functions. Using these files will cause GDB not to be able to set breakpoints on inlined functions by name, so we ignore these - indices unless the --use-deprecated-index-sections command line - option was supplied. */ + indices unless the user has done + "set use-deprecated-index-sections on". */ if (version < 6 && !deprecated_ok) { static int warning_printed = 0; if (!warning_printed) { - warning (_("Skipping deprecated .gdb_index section in %s, pass " - "--use-deprecated-index-sections to use them anyway"), + warning (_("\ +Skipping deprecated .gdb_index section in %s.\n\ +Do \"set use-deprecated-index-sections on\" before the file is read\n\ +to use the section anyway."), filename); warning_printed = 1; } @@ -19652,6 +19654,18 @@ 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, deprecated .gdb_index sections are used anyway.\n\ +Normally they are ignored either because of a missing feature or\n\ +performance issue.\n\ +Warning: This option must be enabled before gdb reads the file."), + NULL, + NULL, + &setlist, &showlist); + c = add_cmd ("gdb-index", class_files, save_gdb_index_command, _("\ Save a gdb-index file.\n\ Index: main.c =================================================================== RCS file: /cvs/src/src/gdb/main.c,v retrieving revision 1.110 diff -u -p -r1.110 main.c --- main.c 2 Jul 2012 12:05:00 -0000 1.110 +++ main.c 19 Jul 2012 18:15:40 -0000 @@ -471,8 +471,6 @@ captured_main (void *data) {"args", no_argument, &set_args, 1}, {"l", required_argument, 0, 'l'}, {"return-child-result", no_argument, &return_child_result, 1}, - {"use-deprecated-index-sections", no_argument, - &use_deprecated_index_sections, 1}, {0, no_argument, 0, 0} }; Index: symfile.h =================================================================== RCS file: /cvs/src/src/gdb/symfile.h,v retrieving revision 1.111 diff -u -p -r1.111 symfile.h --- symfile.h 18 Jul 2012 23:37:58 -0000 1.111 +++ symfile.h 19 Jul 2012 18:15:40 -0000 @@ -673,9 +673,6 @@ extern void dwarf2_build_frame_info (str void dwarf2_free_objfile (struct objfile *); -/* Whether to use deprecated .gdb_index sections. */ -extern int use_deprecated_index_sections; - /* From mdebugread.c */ /* Hack to force structures to exist before use in parameter list. */ 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 19 Jul 2012 18:15:41 -0000 @@ -1247,13 +1247,6 @@ memory usage after it completes each com This option causes @value{GDBN} to print its version number and no-warranty blurb, and exit. -@item -use-deprecated-index-sections -@cindex @code{--use-deprecated-index-sections} -This option causes @value{GDBN} to read and use deprecated -@samp{.gdb_index} sections from symbol files. This can speed up -startup, but may result in some functionality being lost. -@xref{Index Section Format}. - @end table @node Startup @@ -16753,6 +16746,28 @@ $ 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. +To tell @value{GDBN} to use a deprecated index section anyway +specify @code{set use-deprecated-index-sections on}. +The default is @code{off}. +This can speed up startup, but may result in some functionality being lost. +@xref{Index Section Format}. + +@emph{Warning:} Setting @code{use-deprecated-index-sections} to @code{on} +must be done before gdb reads the file. The following will not work: + +@smallexample +$ gdb -ex "set use-deprecated-index-sections on" <program> +@end smallexample + +Instead you must do, for example, + +@smallexample +$ gdb -iex "set use-deprecated-index-sections on" <program> +@end smallexample + 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. @@ -40408,7 +40423,7 @@ Version 4 uses a different hashing funct Version 6 includes symbols for inlined functions, whereas versions 4 and 5 do not. Version 7 adds attributes to the CU indices in the symbol table. @value{GDBN} will only read version 4, 5, or 6 indices -if the @code{--use-deprecated-index-sections} option is used. +by specifying @code{set use-deprecated-index-sections on}. @item The offset, from the start of the file, of the CU list. ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [RFA, doc RFA] New option set use-deprecated-index-sections 2012-07-19 18:26 ` dje @ 2012-07-19 19:02 ` Eli Zaretskii 2012-07-20 18:01 ` dje 0 siblings, 1 reply; 17+ messages in thread From: Eli Zaretskii @ 2012-07-19 19:02 UTC (permalink / raw) To: dje; +Cc: jan.kratochvil, gdb-patches > Date: Thu, 19 Jul 2012 11:25:41 -0700 > cc: gdb-patches@sourceware.org > From: dje@google.com > > How about this? Fine with me, thanks. ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [RFA, doc RFA] New option set use-deprecated-index-sections 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 0 siblings, 1 reply; 17+ messages in thread From: dje @ 2012-07-20 18:01 UTC (permalink / raw) To: Eli Zaretskii; +Cc: jan.kratochvil, gdb-patches Eli Zaretskii writes: > > Date: Thu, 19 Jul 2012 11:25:41 -0700 > > cc: gdb-patches@sourceware.org > > From: dje@google.com > > > > How about this? > > Fine with me, thanks. Thanks. And I committed this to the 7.5 branch. 2012-07-20 Doug Evans <dje@google.com> * NEWS: Document new options "set/show use-deprecated-index-sections", and delete reference to --use-deprecated-index-sections. * symfile.h (use_deprecated_index_sections): Delete. * dwarf2read.c (use_deprecated_index_sections): Make static. (read_index_from_section): Update wording of how to load deprecated index sections. (_initialize_dwarf2_read): New options "set/show use-deprecated-index-sections". * main.c (captured_main): Delete --use-deprecated-index-sections. doc/ * gdb.texinfo (Mode Options): Delete --use-deprecated-index-sections. (Index Files): Document how to control the use of deprecated index sections. (Index Section Format): Replace --use-deprecated-index-sections with "set use-deprecated-index-sections on". Index: NEWS =================================================================== RCS file: /cvs/src/src/gdb/NEWS,v retrieving revision 1.533.2.1 diff -u -p -r1.533.2.1 NEWS --- NEWS 18 Jul 2012 15:56:55 -0000 1.533.2.1 +++ NEWS 20 Jul 2012 17:57:19 -0000 @@ -112,11 +112,11 @@ * The .gdb_index section has been updated to include symbols for inlined functions. GDB will ignore older .gdb_index sections by default, which could cause symbol files to be loaded more slowly - until their .gdb_index sections can be recreated. The new option - --use-deprecated-index-sections will cause GDB to use any older - .gdb_index sections it finds. This will restore performance, but - the ability to set breakpoints on inlined functions will be lost - in symbol files with older .gdb_index sections. + until their .gdb_index sections can be recreated. The new command + "set use-deprecated-index-sections on" will cause GDB to use any older + .gdb_index sections it finds. This will restore performance, but the + ability to set breakpoints on inlined functions will be lost in symbol + files with older .gdb_index sections. The .gdb_index section has also been updated to record more information about each symbol. This speeds up the "info variables", "info functions" @@ -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 20 Jul 2012 17:57:19 -0000 @@ -93,7 +93,7 @@ static int dwarf2_die_debug = 0; static int check_physname = 0; /* When non-zero, do not reject deprecated .gdb_index sections. */ -int use_deprecated_index_sections = 0; +static int use_deprecated_index_sections = 0; static int pagesize; @@ -2558,15 +2558,17 @@ dwarf2_read_index (struct objfile *objfi Versions earlier than 6 did not emit psymbols for inlined functions. Using these files will cause GDB not to be able to set breakpoints on inlined functions by name, so we ignore these - indices unless the --use-deprecated-index-sections command line - option was supplied. */ + indices unless the user has done + "set use-deprecated-index-sections on". */ if (version < 6 && !use_deprecated_index_sections) { static int warning_printed = 0; if (!warning_printed) { - warning (_("Skipping deprecated .gdb_index section in %s, pass " - "--use-deprecated-index-sections to use them anyway"), + warning (_("\ +Skipping deprecated .gdb_index section in %s.\n\ +Do \"set use-deprecated-index-sections on\" before the file is read\n\ +to use the section anyway."), objfile->name); warning_printed = 1; } @@ -19387,6 +19389,18 @@ 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, deprecated .gdb_index sections are used anyway.\n\ +Normally they are ignored either because of a missing feature or\n\ +performance issue.\n\ +Warning: This option must be enabled before gdb reads the file."), + NULL, + NULL, + &setlist, &showlist); + c = add_cmd ("gdb-index", class_files, save_gdb_index_command, _("\ Save a gdb-index file.\n\ Index: main.c =================================================================== RCS file: /cvs/src/src/gdb/main.c,v retrieving revision 1.110 diff -u -p -r1.110 main.c --- main.c 2 Jul 2012 12:05:00 -0000 1.110 +++ main.c 20 Jul 2012 17:57:19 -0000 @@ -471,8 +471,6 @@ captured_main (void *data) {"args", no_argument, &set_args, 1}, {"l", required_argument, 0, 'l'}, {"return-child-result", no_argument, &return_child_result, 1}, - {"use-deprecated-index-sections", no_argument, - &use_deprecated_index_sections, 1}, {0, no_argument, 0, 0} }; Index: symfile.h =================================================================== RCS file: /cvs/src/src/gdb/symfile.h,v retrieving revision 1.109 diff -u -p -r1.109 symfile.h --- symfile.h 24 May 2012 22:14:35 -0000 1.109 +++ symfile.h 20 Jul 2012 17:57:19 -0000 @@ -676,9 +676,6 @@ extern void dwarf2_build_frame_info (str void dwarf2_free_objfile (struct objfile *); -/* Whether to use deprecated .gdb_index sections. */ -extern int use_deprecated_index_sections; - /* From mdebugread.c */ /* Hack to force structures to exist before use in parameter list. */ 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 20 Jul 2012 17:57:20 -0000 @@ -1247,13 +1247,6 @@ memory usage after it completes each com This option causes @value{GDBN} to print its version number and no-warranty blurb, and exit. -@item -use-deprecated-index-sections -@cindex @code{--use-deprecated-index-sections} -This option causes @value{GDBN} to read and use deprecated -@samp{.gdb_index} sections from symbol files. This can speed up -startup, but may result in some functionality being lost. -@xref{Index Section Format}. - @end table @node Startup @@ -16753,6 +16746,28 @@ $ 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. +To tell @value{GDBN} to use a deprecated index section anyway +specify @code{set use-deprecated-index-sections on}. +The default is @code{off}. +This can speed up startup, but may result in some functionality being lost. +@xref{Index Section Format}. + +@emph{Warning:} Setting @code{use-deprecated-index-sections} to @code{on} +must be done before gdb reads the file. The following will not work: + +@smallexample +$ gdb -ex "set use-deprecated-index-sections on" <program> +@end smallexample + +Instead you must do, for example, + +@smallexample +$ gdb -iex "set use-deprecated-index-sections on" <program> +@end smallexample + 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. @@ -40408,7 +40423,7 @@ Version 4 uses a different hashing funct Version 6 includes symbols for inlined functions, whereas versions 4 and 5 do not. Version 7 adds attributes to the CU indices in the symbol table. @value{GDBN} will only read version 4, 5, or 6 indices -if the @code{--use-deprecated-index-sections} option is used. +by specifying @code{set use-deprecated-index-sections on}. @item The offset, from the start of the file, of the CU list. ^ permalink raw reply [flat|nested] 17+ messages in thread
* [patch] testsuite: Fix gdb.mi/* regression on RHEL-6 [Re: [RFA, doc RFA] New option set use-deprecated-index-sections] 2012-07-20 18:01 ` dje @ 2012-07-25 14:33 ` Jan Kratochvil 2012-07-25 20:36 ` [commit+7.5] " Jan Kratochvil 0 siblings, 1 reply; 17+ messages in thread From: Jan Kratochvil @ 2012-07-25 14:33 UTC (permalink / raw) To: dje; +Cc: Eli Zaretskii, gdb-patches On Fri, 20 Jul 2012 20:01:18 +0200, dje@google.com wrote: > And I committed this to the 7.5 branch. c3a09919048a2dcd937655d12acdb000d905841b is the first bad commit commit c3a09919048a2dcd937655d12acdb000d905841b Author: Doug Evans <dje@google.com> Date: Fri Jul 20 17:38:00 2012 +0000 * NEWS: Document new options "set/show use-deprecated-index-sections", [...] -&"warning: Skipping deprecated .gdb_index section in /usr/lib/debug/lib64/ld-2.12.so.debug, pass --use-deprecated-index-sections to use them anyway\n"^M +&"warning: Skipping deprecated .gdb_index section in /usr/lib/debug/lib64/ld-2.12.so.debug.\nDo \"set use-deprecated-index-sections on\" before the file is read\nto use the section anyway."^M +&"\n"^M (gdb) ^M [...] +ERROR: Unable to start target This affects mostly any gdb.mi/*.exp testcase on RHEL-6. I will check it in today; in two parts (the "\.gdb_index" regex fix is unrelated). Regards, Jan gdb/testsuite/ 2012-07-25 Jan Kratochvil <jan.kratochvil@redhat.com> Fix testsuite regression after --use-deprecated-index-sections removal. * lib/mi-support.exp (gdbindex_warning_re): Update the expect string. diff --git a/gdb/testsuite/lib/mi-support.exp b/gdb/testsuite/lib/mi-support.exp index 401565d..5235944 100644 --- a/gdb/testsuite/lib/mi-support.exp +++ b/gdb/testsuite/lib/mi-support.exp @@ -31,7 +31,7 @@ global mi_inferior_tty_name set MIFLAGS "-i=mi" set thread_selected_re "=thread-selected,id=\"\[0-9\]+\"\r\n" -set gdbindex_warning_re "&\"warning: Skipping \[^\r\n\]+ \.gdb_index section in \[^\"\]+\"\r\n" +set gdbindex_warning_re "&\"warning: Skipping \[^\r\n\]+ \\.gdb_index section in \[^\r\n\]+\"\r\n(?:&\"\\\\n\"\r\n)?" set library_loaded_re "=library-loaded\[^\n\]+\"\r\n(?:$gdbindex_warning_re)?" set breakpoint_re "=(?:breakpoint-created|breakpoint-deleted)\[^\n\]+\"\r\n" ^ permalink raw reply [flat|nested] 17+ messages in thread
* [commit+7.5] [patch] testsuite: Fix gdb.mi/* regression on RHEL-6 [Re: [RFA, doc RFA] New option set use-deprecated-index-sections] 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 ` Jan Kratochvil 2012-07-27 21:39 ` [commit#2+7.5] " Jan Kratochvil 0 siblings, 1 reply; 17+ messages in thread From: Jan Kratochvil @ 2012-07-25 20:36 UTC (permalink / raw) To: dje; +Cc: Eli Zaretskii, gdb-patches On Wed, 25 Jul 2012 16:33:07 +0200, Jan Kratochvil wrote: > gdb/testsuite/ > 2012-07-25 Jan Kratochvil <jan.kratochvil@redhat.com> > > Fix testsuite regression after --use-deprecated-index-sections removal. > * lib/mi-support.exp (gdbindex_warning_re): Update the expect string. Checked in the fix part: http://sourceware.org/ml/gdb-cvs/2012-07/msg00209.html and for 7.5: http://sourceware.org/ml/gdb-cvs/2012-07/msg00210.html Thanks, Jan ^ permalink raw reply [flat|nested] 17+ messages in thread
* [commit#2+7.5] [patch] testsuite: Fix gdb.mi/* regression on RHEL-6 [Re: [RFA, doc RFA] New option set use-deprecated-index-sections] 2012-07-25 20:36 ` [commit+7.5] " Jan Kratochvil @ 2012-07-27 21:39 ` Jan Kratochvil 0 siblings, 0 replies; 17+ messages in thread From: Jan Kratochvil @ 2012-07-27 21:39 UTC (permalink / raw) To: dje; +Cc: gdb-patches On Wed, 25 Jul 2012 22:36:04 +0200, Jan Kratochvil wrote: > On Wed, 25 Jul 2012 16:33:07 +0200, Jan Kratochvil wrote: > > gdb/testsuite/ > > 2012-07-25 Jan Kratochvil <jan.kratochvil@redhat.com> > > > > Fix testsuite regression after --use-deprecated-index-sections removal. > > * lib/mi-support.exp (gdbindex_warning_re): Update the expect string. > > Checked in the fix part: > http://sourceware.org/ml/gdb-cvs/2012-07/msg00209.html > and for 7.5: > http://sourceware.org/ml/gdb-cvs/2012-07/msg00210.html Forgot to review the original Gary' patch commit c55ff693014c302c8b91b99cee0484751f105e15 Date: Fri Mar 16 16:47:29 2012 +0000 PR breakpoints/10738 that the regex string is on two more places. Fixed those now and checked in: http://sourceware.org/ml/gdb-cvs/2012-07/msg00235.html and for 7.5: http://sourceware.org/ml/gdb-cvs/2012-07/msg00236.html Jan http://sourceware.org/ml/gdb-cvs/2012-07/msg00235.html --- src/gdb/testsuite/ChangeLog 2012/07/27 08:09:13 1.3308 +++ src/gdb/testsuite/ChangeLog 2012/07/27 21:34:29 1.3309 @@ -1,3 +1,10 @@ +2012-07-27 Jan Kratochvil <jan.kratochvil@redhat.com> + + Fix testsuite regression after --use-deprecated-index-sections removal. + * gdb.base/annota1.exp (run until main breakpoint): Update the expect + string. + * gdb.base/async-shell.exp (gdbindex_warning_re): Likewise. + 2012-07-27 Yao Qi <yao@codesourcery.com> KFAIL for PR remote/14161. --- src/gdb/testsuite/gdb.base/annota1.exp 2012/06/21 20:46:21 1.48 +++ src/gdb/testsuite/gdb.base/annota1.exp 2012/07/27 21:34:30 1.49 @@ -133,7 +133,7 @@ #exp_internal 1 set binexp [string_to_regexp $binfile] gdb_test_multiple "run" "run until main breakpoint" { - -re "\r\n\032\032post-prompt\r\nStarting program: $binexp \(\r\nwarning: Skipping \[^\r\n\]+ .gdb_index section in \[^\r\n\]+\)?\(\(\r\n\r\n\032\032frames-invalid\)|\(\r\n\r\n\032\032breakpoints-invalid\)\)+\r\n\r\n\032\032starting\(\(\r\n\r\n\032\032frames-invalid\)|\(\r\n\r\n\032\032breakpoints-invalid\)\)*\r\n\r\n\032\032breakpoint 1\r\n\r\nBreakpoint 1, \r\n\032\032frame-begin 0 $hex\r\n\r\n\032\032frame-function-name\r\nmain\r\n\032\032frame-args\r\n \\(\\)\r\n\032\032frame-source-begin\r\n at \r\n\032\032frame-source-file\r\n.*annota1.c\r\n\032\032frame-source-file-end\r\n:\r\n\032\032frame-source-line\r\n$main_line\r\n\032\032frame-source-end\r\n\r\n\r\n\032\032source.*$srcfile:$main_line:.*:beg:$hex\r\n\r\n\032\032frame-end\r\n\r\n\032\032stopped.*$gdb_prompt$" { + -re "\r\n\032\032post-prompt\r\nStarting program: $binexp \(\r\nwarning: Skipping \[^\r\n\]+ .gdb_index section in \[^\r\n\]+\r\nDo \"set use-deprecated-index-sections on\" before the file is read\r\nto use the section anyway\\.\)?\(\(\r\n\r\n\032\032frames-invalid\)|\(\r\n\r\n\032\032breakpoints-invalid\)\)+\r\n\r\n\032\032starting\(\(\r\n\r\n\032\032frames-invalid\)|\(\r\n\r\n\032\032breakpoints-invalid\)\)*\r\n\r\n\032\032breakpoint 1\r\n\r\nBreakpoint 1, \r\n\032\032frame-begin 0 $hex\r\n\r\n\032\032frame-function-name\r\nmain\r\n\032\032frame-args\r\n \\(\\)\r\n\032\032frame-source-begin\r\n at \r\n\032\032frame-source-file\r\n.*annota1.c\r\n\032\032frame-source-file-end\r\n:\r\n\032\032frame-source-line\r\n$main_line\r\n\032\032frame-source-end\r\n\r\n\r\n\032\032source.*$srcfile:$main_line:.*:beg:$hex\r\n\r\n\032\032frame-end\r\n\r\n\032\032stopped.*$gdb_prompt$" { pass "run until main breakpoint" } } --- src/gdb/testsuite/gdb.base/async-shell.exp 2012/03/16 16:47:33 1.5 +++ src/gdb/testsuite/gdb.base/async-shell.exp 2012/07/27 21:34:30 1.6 @@ -29,7 +29,7 @@ return -1 } -set gdbindex_warning_re "warning: Skipping \[^\r\n\]+ \\.gdb_index section \[^\r\n\]*" +set gdbindex_warning_re "warning: Skipping \[^\r\n\]+ \\.gdb_index section \[^\r\n\]*\r\nDo \"set use-deprecated-index-sections on\" before the file is read\r\nto use the section anyway\\." gdb_test_no_output "set target-async on " gdb_test_no_output "set non-stop on" ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [RFA, doc RFA] New option set use-deprecated-index-sections 2012-07-18 22:34 ` dje 2012-07-18 23:33 ` Jan Kratochvil @ 2012-07-19 16:11 ` Eli Zaretskii 1 sibling, 0 replies; 17+ messages in thread From: Eli Zaretskii @ 2012-07-19 16:11 UTC (permalink / raw) To: dje; +Cc: jan.kratochvil, gdb-patches > Date: Wed, 18 Jul 2012 15:33:42 -0700 > Cc: gdb-patches@sourceware.org, eliz@gnu.org > From: dje@google.com > > P.S. Eli, I need a doc RFA here too. Thanks. Coming up: > +When enabled .gdb_index sections that have been deprecated are used anyway.\n ^ Please add a comma here, otherwise the sentence is ambiguous and unclear. Also, I think When enabled, deprecated .gdb_index sections are used anyway. is both shorter and clearer. Everything else is fine with me, thanks. ^ 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