This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[patchv3 13/11] Make relative-with-system-absolute the default
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Wed, 30 Jan 2013 08:48:59 +0100
- Subject: [patchv3 13/11] Make relative-with-system-absolute the default
- References: <20130129221118.GB27463@host2.jankratochvil.net>
Just forgot about gdb/NEWS.
On Tue, 29 Jan 2013 23:11:18 +0100, Jan Kratochvil wrote:
Hi,
previous patches discussed it, so make the change with hopefully only pros and
no cons.
No regressions on {x86_64,x86_64-m32,i686}-fedora19pre-linux-gnu and with
gdbindex.
Thanks,
Jan
gdb/
2013-01-29 Jan Kratochvil <jan.kratochvil@redhat.com>
* NEWS (set filename-display): Describe the new "set filename-display"
default.
* source.c (filename_display_string): Change it to
filename_display_relative_with_system_absolute.
(_initialize_source): Describe the new "set filename-display" default.
gdb/doc/
2013-01-29 Jan Kratochvil <jan.kratochvil@redhat.com>
* gdb.texinfo (Backtrace): Change set filename-display default to
relative-with-system-absolute.
gdb/testsuite/
2013-01-29 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
@@ -119,7 +119,9 @@ set filename-display basename|relative|absolute|relative-with-system-absolute
|basename-with-system-absolute
show filename-display
Control the way in which filenames is displayed.
- The default is "relative", which preserves previous behavior.
+ Previous behavior was "relative".
+ New default is "relative-with-system-absolute", which prints source filenames
+ from files with present separate debug info in absolute form.
* MI changes
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -6541,7 +6541,7 @@ You can control how file names are displayed.
@item set filename-display
@itemx 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.
@@ -6557,6 +6557,8 @@ Otherwise display it relative to the compilation directory.
Files having separate debug information file are expected to come from system
shared libraries.
+This is the default.
+
@item set filename-display basename-with-system-absolute
Determine whether a source filename comes from file having separate debug
information file. In such case display the source filename as absolute one.
--- a/gdb/source.c
+++ b/gdb/source.c
@@ -127,7 +127,8 @@ static const char *const filename_display_kind_names[] = {
NULL
};
-static const char *filename_display_string = filename_display_relative;
+static const char *filename_display_string =
+ filename_display_relative_with_system_absolute;
static void
show_filename_display_string (struct ui_file *file, int from_tty,
@@ -2086,7 +2087,7 @@ filename-display can be:\n\
basename-with-system-absolute - display filenames from files with separate\n\
debug info files as absolute, other files\n\
display only with basename of the filename\n\
-By default, relative filenames are displayed."),
+By default, relative-with-system-absolute is set."),
NULL,
show_filename_display_string,
&setlist, &showlist);
--- 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