This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch+doc 2/2] filename-display: default *-sepdebug to absolute
On Sat, 16 Feb 2013 09:38:18 +0100, Eli Zaretskii wrote:
> > +The default for inferior executable with embedded debug info is relative.
>
> @samp{relative} or @code{relative}, I think.
Used @code.
Thanks,
Jan
gdb/
2013-02-18 Jan Kratochvil <jan.kratochvil@redhat.com>
* NEWS (set filename-display): Describe the new default.
* source.c (filename_display_executable_sepdebug_string)
(filename_display_libraries_sepdebug_string): Change the initializer.
(_initialize_source): Remove the last line from filename_display_doc.
Add doc initialization around executable, libraries,
executable-with-separate-debug-info and
libraries-with-separate-debug-info with a default statement.
gdb/doc/
2013-02-18 Jan Kratochvil <jan.kratochvil@redhat.com>
* gdb.texinfo (Backtrace): Remove the default statement from set
filename-display relative. Add four default statements at each of the
set filename-display specific setters.
gdb/testsuite/
2013-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
* gdb.threads/linux-dp.exp (first thread-specific breakpoint hit):
Allow displayed path for pthread_create.c.
--- a/gdb/NEWS
+++ b/gdb/NEWS
@@ -135,8 +135,11 @@ show filename-display libraries
show filename-display executable-with-separate-debug-info
show filename-display libraries-with-separate-debug-info
Control the way in which filenames is displayed.
- The default is "relative" for all the options, which preserves previous
- behavior.
+ Previous behavior was "relative" for all the options.
+ The new behavior is to print in absolute form file names recorded in
+ separate debug info. This corresponds to setting the options
+ "executable-with-separate-debug-info" and
+ "libraries-with-separate-debug-info" to the value "absolute".
* MI changes
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -6545,7 +6545,7 @@ same value for all the four kinds of inferior files as described below.
@item set filename-display relative
@cindex filename-display
-Display file names relative to the compilation directory. This is the default.
+Display file names relative to the compilation directory.
@item set filename-display basename
Display only basename of a filename.
@@ -6571,6 +6571,9 @@ Set how to display filenames coming from the inferior executable, as set by the
@ref{file command}, when the inferior executable uses embedded debug info as
found in binaries compiled normally.
+The default for inferior executable with embedded debug info is
+@code{relative}.
+
@item show filename-display executable
Show the current way to display filenames coming from the inferior executable
with embedded debug info.
@@ -6580,6 +6583,9 @@ Set how to display filenames coming from inferior shared libraries, when the
shared libraries use embedded debug info as found in binaries compiled
normally.
+The default for inferior shared libraries with embedded debug info is
+@code{relative}.
+
@item show filename-display libraries
Show the current way to display filenames coming from the inferior shared
libraries with embedded debug info.
@@ -6589,6 +6595,9 @@ Set how to display filenames coming from the inferior executable, as set by the
@ref{file command}, when the inferior executable uses separate debug info file
which is usually optionally provided by operating system debug info packages.
+The default for inferior executable with separate debug info file is
+@code{absolute}.
+
@item show filename-display executable-with-separate-debug-info
Show the current way to display filenames coming from the inferior executable
with separate debug info file.
@@ -6598,6 +6607,9 @@ Set how to display filenames coming from inferior shared libraries, when the
shared libraries use separate debug info files which are usually optionally
provided by operating system debug info packages.
+The default for inferior shared libraries with separate debug info file is
+@code{absolute}.
+
@item show filename-display libraries-with-separate-debug-info
Show the current way to display filenames coming from the inferior shared
libraries with separate debug info file.
--- a/gdb/source.c
+++ b/gdb/source.c
@@ -133,11 +133,11 @@ static const char *filename_display_libraries_string =
/* Setting for "set filename-display executable-with-separate-debug-info". */
static const char *filename_display_executable_sepdebug_string =
- filename_display_relative;
+ filename_display_absolute;
/* Setting for "set filename-display libraries-with-separate-debug-info". */
static const char *filename_display_libraries_sepdebug_string =
- filename_display_relative;
+ filename_display_absolute;
/* Implement command "show filename-display executable". */
@@ -2221,8 +2221,7 @@ is not specified, print all substitution rules."),
filename-display can be:\n\
basename - display only basename of a filename\n\
relative - display a filename relative to the compilation directory\n\
- absolute - display an absolute filename\n\
-By default, relative filenames are displayed."),
+ absolute - display an absolute filename");
doc = xstrprintf (_("\
Set how to display filenames for all categories of files.\n\
@@ -2242,45 +2241,53 @@ Show how to display filenames for all categories of files.\n\
0/*allow-unknown*/, &showlist);
xfree (doc);
+ doc = xstrprintf (_("\
+%s\n\
+By default, relative filenames are displayed."),
+ filename_display_doc);
add_setshow_enum_cmd ("executable", class_files,
filename_display_kind_names,
&filename_display_executable_string, _("\
Set how to display filenames in executable with embedded debug info."), _("\
Show how to display filenames in executable with embedded debug info."),
- filename_display_doc, NULL,
+ doc, NULL,
show_filename_display_executable_string,
&filename_display_set_cmdlist,
&filename_display_show_cmdlist);
-
add_setshow_enum_cmd ("libraries", class_files,
filename_display_kind_names,
&filename_display_libraries_string, _("\
Set how to display filenames in libraries with embedded debug info."), _("\
Show how to display filenames in libraries with embedded debug info."),
- filename_display_doc, NULL,
+ doc, NULL,
show_filename_display_libraries_string,
&filename_display_set_cmdlist,
&filename_display_show_cmdlist);
+ xfree (doc);
+ doc = xstrprintf (_("\
+%s\n\
+By default, absolute filenames are displayed."),
+ filename_display_doc);
add_setshow_enum_cmd ("executable-with-separate-debug-info", class_files,
filename_display_kind_names,
&filename_display_executable_sepdebug_string, _("\
Set how to display filenames in executable with separate debug info."), _("\
Show how to display filenames in executable with separate debug info."),
- filename_display_doc, NULL,
+ doc, NULL,
show_filename_display_executable_sepdebug_string,
&filename_display_set_cmdlist,
&filename_display_show_cmdlist);
-
add_setshow_enum_cmd ("libraries-with-separate-debug-info", class_files,
filename_display_kind_names,
&filename_display_libraries_sepdebug_string, _("\
Set how to display filenames in libraries with separate debug info."), _("\
Show how to display filenames in libraries with separate debug info."),
- filename_display_doc, NULL,
+ doc, NULL,
show_filename_display_libraries_sepdebug_string,
&filename_display_set_cmdlist,
&filename_display_show_cmdlist);
+ xfree (doc);
add_cmd ("basename", class_files, set_filename_display_basename_string,
_("\
--- a/gdb/testsuite/gdb.threads/linux-dp.exp
+++ b/gdb/testsuite/gdb.threads/linux-dp.exp
@@ -233,7 +233,9 @@ gdb_continue_to_breakpoint "thread 5's print"
# If you do have debug info, the output obviously depends more on the
# exact library in use; under NPTL, you get:
# #2 0x0012b7fc in start_thread (arg=0x21) at pthread_create.c:264
-gdb_test "where" "print_philosopher.*philosopher.* \(from .*libpthread\|at pthread_create\|in pthread_create\).*" \
+# and with "set filename-display absolute" one gets:
+# #2 0x0012b7fc in start_thread (arg=0x21) at /path/to/pthread_create.c:264
+gdb_test "where" "print_philosopher.*philosopher.* \(from .*libpthread\|at pthread_create\|in \[^\r\n\]*pthread_create\).*" \
"first thread-specific breakpoint hit"
# Make sure it's catching the right thread. Try hitting the