From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29421 invoked by alias); 30 Jan 2013 07:49:13 -0000 Received: (qmail 29320 invoked by uid 22791); 30 Jan 2013 07:49:12 -0000 X-SWARE-Spam-Status: No, hits=-6.5 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_SPAMHAUS_DROP,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 30 Jan 2013 07:49:04 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r0U7n43m021442 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 30 Jan 2013 02:49:04 -0500 Received: from host2.jankratochvil.net (ovpn-116-88.ams2.redhat.com [10.36.116.88]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r0U7n0YP023215 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO) for ; Wed, 30 Jan 2013 02:49:02 -0500 Date: Wed, 30 Jan 2013 07:49:00 -0000 From: Jan Kratochvil To: gdb-patches@sourceware.org Subject: [patchv3 13/11] Make relative-with-system-absolute the default Message-ID: <20130130074859.GB15998@host2.jankratochvil.net> References: <20130129221118.GB27463@host2.jankratochvil.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130129221118.GB27463@host2.jankratochvil.net> User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2013-01/txt/msg00712.txt.bz2 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 * 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 * gdb.texinfo (Backtrace): Change set filename-display default to relative-with-system-absolute. gdb/testsuite/ 2013-01-29 Jan Kratochvil * 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