From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6201 invoked by alias); 28 Dec 2012 09:09:22 -0000 Received: (qmail 6190 invoked by uid 22791); 28 Dec 2012 09:09:21 -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; Fri, 28 Dec 2012 09:09:09 +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 qBS97euU019405 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 28 Dec 2012 04:07:40 -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 qBS97ZxI000469 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Fri, 28 Dec 2012 04:07:38 -0500 Date: Fri, 28 Dec 2012 09:09:00 -0000 From: Jan Kratochvil To: Edjunior Barbosa Machado Cc: Tom Tromey , gdb-patches@sourceware.org Subject: [commit] [rfc] Print MI fullname even for non-existing files Message-ID: <20121228090735.GA15391@host2.jankratochvil.net> References: <20121217155859.GA8029@host2.jankratochvil.net> <8738z4y1el.fsf@fleche.redhat.com> <20121217183717.GC14232@host2.jankratochvil.net> <87txrkwmfx.fsf@fleche.redhat.com> <20121217185910.GE14232@host2.jankratochvil.net> <50DCE502.5050700@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <50DCE502.5050700@linux.vnet.ibm.com> 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/msg00833.txt.bz2 On Fri, 28 Dec 2012 01:17:06 +0100, Edjunior Barbosa Machado wrote: > This seem to be due to a strcmp with a null string 'symtab->fullname' in: > > if (FILENAME_CMP (symtab->fullname, symtab_to_fullname (s)) != 0) > > With the patch below, this problem is fixed and gdb.base/list.exp no longer > crashes gdb. Ok? Thanks for the bugreport. I have checked in an equivalent fix below. Jan http://sourceware.org/ml/gdb-cvs/2012-12/msg00192.html --- src/gdb/ChangeLog 2012/12/25 17:27:47 1.14982 +++ src/gdb/ChangeLog 2012/12/28 09:05:39 1.14983 @@ -1,3 +1,8 @@ +2012-12-28 Jan Kratochvil + + * symtab.c (find_line_symtab): Call symtab_to_fullname instead of + accessing FULLNAME directly. + 2012-12-25 Sergio Durigan Junior * frv-linux-tdep.c (frv_linux_pc_in_sigtramp): Fix typo. --- src/gdb/symtab.c 2012/12/25 08:03:31 1.333 +++ src/gdb/symtab.c 2012/12/28 09:05:40 1.334 @@ -2554,7 +2554,8 @@ if (FILENAME_CMP (symtab->filename, s->filename) != 0) continue; - if (FILENAME_CMP (symtab->fullname, symtab_to_fullname (s)) != 0) + if (FILENAME_CMP (symtab_to_fullname (symtab), + symtab_to_fullname (s)) != 0) continue; l = LINETABLE (s); ind = find_line_common (l, line, &exact, 0);