* 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".
This commit is contained in:
parent
64776a0b2d
commit
e615022aba
|
@ -1,3 +1,15 @@
|
||||||
|
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.
|
||||||
|
|
||||||
2012-07-20 Pedro Alves <palves@redhat.com>
|
2012-07-20 Pedro Alves <palves@redhat.com>
|
||||||
|
|
||||||
PR threads/11692
|
PR threads/11692
|
||||||
|
|
14
gdb/NEWS
14
gdb/NEWS
|
@ -114,11 +114,11 @@
|
||||||
* The .gdb_index section has been updated to include symbols for
|
* The .gdb_index section has been updated to include symbols for
|
||||||
inlined functions. GDB will ignore older .gdb_index sections by
|
inlined functions. GDB will ignore older .gdb_index sections by
|
||||||
default, which could cause symbol files to be loaded more slowly
|
default, which could cause symbol files to be loaded more slowly
|
||||||
until their .gdb_index sections can be recreated. The new option
|
until their .gdb_index sections can be recreated. The new command
|
||||||
--use-deprecated-index-sections will cause GDB to use any older
|
"set use-deprecated-index-sections on" will cause GDB to use any older
|
||||||
.gdb_index sections it finds. This will restore performance, but
|
.gdb_index sections it finds. This will restore performance, but the
|
||||||
the ability to set breakpoints on inlined functions will be lost
|
ability to set breakpoints on inlined functions will be lost in symbol
|
||||||
in symbol files with older .gdb_index sections.
|
files with older .gdb_index sections.
|
||||||
|
|
||||||
The .gdb_index section has also been updated to record more information
|
The .gdb_index section has also been updated to record more information
|
||||||
about each symbol. This speeds up the "info variables", "info functions"
|
about each symbol. This speeds up the "info variables", "info functions"
|
||||||
|
@ -139,6 +139,10 @@
|
||||||
|
|
||||||
* New commands
|
* 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
|
** "catch load" and "catch unload" can be used to stop when a shared
|
||||||
library is loaded or unloaded, respectively.
|
library is loaded or unloaded, respectively.
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,11 @@
|
||||||
|
2012-07-20 Doug Evans <dje@google.com>
|
||||||
|
|
||||||
|
* 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".
|
||||||
|
|
||||||
2012-07-12 Eli Zaretskii <eliz@gnu.org>
|
2012-07-12 Eli Zaretskii <eliz@gnu.org>
|
||||||
|
|
||||||
* gdbint.texinfo: Remove @syncodeindex directives that put all the
|
* gdbint.texinfo: Remove @syncodeindex directives that put all the
|
||||||
|
|
|
@ -1247,13 +1247,6 @@ memory usage after it completes each command and returns to the prompt.
|
||||||
This option causes @value{GDBN} to print its version number and
|
This option causes @value{GDBN} to print its version number and
|
||||||
no-warranty blurb, and exit.
|
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
|
@end table
|
||||||
|
|
||||||
@node Startup
|
@node Startup
|
||||||
|
@ -16753,6 +16746,28 @@ $ objcopy --add-section .gdb_index=symfile.gdb-index \
|
||||||
--set-section-flags .gdb_index=readonly symfile symfile
|
--set-section-flags .gdb_index=readonly symfile symfile
|
||||||
@end smallexample
|
@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
|
There are currently some limitation on indices. They only work when
|
||||||
for DWARF debugging information, not stabs. And, they do not
|
for DWARF debugging information, not stabs. And, they do not
|
||||||
currently work for programs using Ada.
|
currently work for programs using Ada.
|
||||||
|
@ -40408,7 +40423,7 @@ Version 4 uses a different hashing function from versions 5 and 6.
|
||||||
Version 6 includes symbols for inlined functions, whereas versions 4
|
Version 6 includes symbols for inlined functions, whereas versions 4
|
||||||
and 5 do not. Version 7 adds attributes to the CU indices in the
|
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
|
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
|
@item
|
||||||
The offset, from the start of the file, of the CU list.
|
The offset, from the start of the file, of the CU list.
|
||||||
|
|
|
@ -85,7 +85,7 @@ static int dwarf2_die_debug = 0;
|
||||||
static int check_physname = 0;
|
static int check_physname = 0;
|
||||||
|
|
||||||
/* When non-zero, do not reject deprecated .gdb_index sections. */
|
/* 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
|
/* 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,
|
info for C++ namespaces. GCC 3.3.x did not produce this information,
|
||||||
|
@ -2611,15 +2611,17 @@ read_index_from_section (struct objfile *objfile,
|
||||||
Versions earlier than 6 did not emit psymbols for inlined
|
Versions earlier than 6 did not emit psymbols for inlined
|
||||||
functions. Using these files will cause GDB not to be able to
|
functions. Using these files will cause GDB not to be able to
|
||||||
set breakpoints on inlined functions by name, so we ignore these
|
set breakpoints on inlined functions by name, so we ignore these
|
||||||
indices unless the --use-deprecated-index-sections command line
|
indices unless the user has done
|
||||||
option was supplied. */
|
"set use-deprecated-index-sections on". */
|
||||||
if (version < 6 && !deprecated_ok)
|
if (version < 6 && !deprecated_ok)
|
||||||
{
|
{
|
||||||
static int warning_printed = 0;
|
static int warning_printed = 0;
|
||||||
if (!warning_printed)
|
if (!warning_printed)
|
||||||
{
|
{
|
||||||
warning (_("Skipping deprecated .gdb_index section in %s, pass "
|
warning (_("\
|
||||||
"--use-deprecated-index-sections to use them anyway"),
|
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);
|
filename);
|
||||||
warning_printed = 1;
|
warning_printed = 1;
|
||||||
}
|
}
|
||||||
|
@ -19655,6 +19657,18 @@ the demangler."),
|
||||||
NULL, show_check_physname,
|
NULL, show_check_physname,
|
||||||
&setdebuglist, &showdebuglist);
|
&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,
|
c = add_cmd ("gdb-index", class_files, save_gdb_index_command,
|
||||||
_("\
|
_("\
|
||||||
Save a gdb-index file.\n\
|
Save a gdb-index file.\n\
|
||||||
|
|
|
@ -471,8 +471,6 @@ captured_main (void *data)
|
||||||
{"args", no_argument, &set_args, 1},
|
{"args", no_argument, &set_args, 1},
|
||||||
{"l", required_argument, 0, 'l'},
|
{"l", required_argument, 0, 'l'},
|
||||||
{"return-child-result", no_argument, &return_child_result, 1},
|
{"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}
|
{0, no_argument, 0, 0}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -673,9 +673,6 @@ extern void dwarf2_build_frame_info (struct objfile *);
|
||||||
|
|
||||||
void dwarf2_free_objfile (struct objfile *);
|
void dwarf2_free_objfile (struct objfile *);
|
||||||
|
|
||||||
/* Whether to use deprecated .gdb_index sections. */
|
|
||||||
extern int use_deprecated_index_sections;
|
|
||||||
|
|
||||||
/* From mdebugread.c */
|
/* From mdebugread.c */
|
||||||
|
|
||||||
/* Hack to force structures to exist before use in parameter list. */
|
/* Hack to force structures to exist before use in parameter list. */
|
||||||
|
|
Loading…
Reference in New Issue