From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8489 invoked by alias); 25 Dec 2012 08:04:10 -0000 Received: (qmail 8480 invoked by uid 22791); 25 Dec 2012 08:04:09 -0000 X-SWARE-Spam-Status: No, hits=-6.2 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD 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; Tue, 25 Dec 2012 08:03:58 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qBP83uYE028029 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 25 Dec 2012 03:03:56 -0500 Received: from host2.jankratochvil.net (ovpn-116-23.ams2.redhat.com [10.36.116.23]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id qBP83pvQ005453 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Tue, 25 Dec 2012 03:03:54 -0500 Date: Tue, 25 Dec 2012 08:04:00 -0000 From: Jan Kratochvil To: Marc Khouzam Cc: "'Tom Tromey'" , "'gdb-patches@sourceware.org'" Subject: [commit] [rfc] Print MI fullname even for non-existing files Message-ID: <20121225080350.GB11349@host2.jankratochvil.net> References: <20121217155859.GA8029@host2.jankratochvil.net> <8738z4y1el.fsf@fleche.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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: 2012-12/txt/msg00811.txt.bz2 On Thu, 20 Dec 2012 15:32:55 +0100, Marc Khouzam wrote: > > Jan> symtab_to_fullname now always returns non-NULL. > > > > Jan> Currently this patch only changes from user point of view MI: > > Jan> (gdb) -file-list-exec-source-file > > Jan> ^done,line="1",file="deleted.c",macro-info="0" > > -> > > Jan> > > ^done,line="1",file="deleted.c",fullname="/path/to/deleted.c", > > macro-info="0" > > > > Jan> Is there a serious reason why fullname was suppressed for > > Jan> non-existing files? While it breaks MI compatibility in > > some way I > > Jan> find it an acceptable change. > > > > It seems pretty reasonable to me as well. > > For what it's worth, that is an ok change for Eclipse (we don't > use that command). This specific command was just an example. The change affects any MI output where fullname="/abs/path" was printed. Now it will be printed even if that source file is not present on the disk. While that may be rather rate case it would be bad if Eclipse breaks. I have tested now eclipse-cdt-8.1.1-1.fc18.x86_64, if I remove /usr/src/debug I get: unpatched/patched present file: Subwindow tab title shows the short filename "ioputs.c". unpatched missing file: Can't find a source file at "ioputs.c" Locate the file or edit the source lookup path to include its location. Subwindow tab title shows the short filename "ioputs.c": http://people.redhat.com/~jkratoch/eclipse-gdb-unpatched.png patched missing file: Can't find a source file at "/usr/src/debug/glibc-2.16-75f0d304/libio/ioputs.c" Locate the file or edit the source lookup path to include its location. Subwindow tab title shows the fullname "/usr/src/debug/glibc-2.16-75f0d304/libio/ioputs.c": http://people.redhat.com/~jkratoch/eclipse-gdb-fullname.png So I find the patch in fact an improvement even for Eclipse. Therefore I have checked it in: http://sourceware.org/ml/gdb-cvs/2012-12/msg00184.html Besides that the compatibility of Eclipse <-> GDB across versions is not too great, FSF GDB HEAD fails with eclipse-cdt-8.0.1-4.fc16.x86_64: Error in final launch sequence Failed to execute MI command: maintenance set python print-stack off Error message from debugger back end: Undefined maintenance set command: "python print-stack off". Try "help maintenance set". Thanks, Jan