From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31035 invoked by alias); 14 Sep 2010 20:57:48 -0000 Received: (qmail 31027 invoked by uid 22791); 14 Sep 2010 20:57:47 -0000 X-SWARE-Spam-Status: No, hits=-6.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,TW_BJ,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, 14 Sep 2010 20:57:40 +0000 Received: from int-mx03.intmail.prod.int.phx2.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o8EKvGOZ011457 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 14 Sep 2010 16:57:17 -0400 Received: from host1.dyn.jankratochvil.net (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx03.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o8EKvCcA010531 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 14 Sep 2010 16:57:15 -0400 Received: from host1.dyn.jankratochvil.net (localhost [127.0.0.1]) by host1.dyn.jankratochvil.net (8.14.4/8.14.4) with ESMTP id o8EKvCYR013049; Tue, 14 Sep 2010 22:57:12 +0200 Received: (from jkratoch@localhost) by host1.dyn.jankratochvil.net (8.14.4/8.14.4/Submit) id o8EKvBnG013047; Tue, 14 Sep 2010 22:57:11 +0200 Date: Tue, 14 Sep 2010 21:40:00 -0000 From: Jan Kratochvil To: Tom Tromey Cc: gdb-patches@sourceware.org, Joel Brobecker Subject: [patch] .gdb_index: Fix Ada regression Message-ID: <20100914205711.GA10361@host1.dyn.jankratochvil.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-12-10) 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: 2010-09/txt/msg00276.txt.bz2 Hi, on a system with libraries using .gdb_index all the Ada testcases FAIL: Running ./gdb.ada/print_pc.exp ... FAIL: gdb.ada/print_pc.exp: start inferior (GDB internal error) FAIL: gdb.ada/print_pc.exp: p /x $pc dwarf2read.c:2374: internal-error: map_ada_symtabs called via index method FAIl is on Fedora 14 snapshot using gcc-debuginfo-4.5.1-3.fc14.x86_64 file: /usr/lib/debug/lib64/libgcc_s-4.5.1-20100907.so.1.debug The regressions get fixed on x86_64-fedora14snapshot-linux-gnu by the attached patch. No regressions on {x86_64,x86_64-m32,i686}-fedora14snapshot-linux-gnu. During my tests with `set language ada' I could not lookup non-Ada symbols anyway so I believe the patch is OK but sure it needs an Ada-wise review. Thanks, Jan gdb/ 2010-09-14 Jan Kratochvil * dwarf2read.c (dw2_map_ada_symtabs): Remove the internal_error. Update the comment. --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -2369,10 +2369,9 @@ dw2_map_ada_symtabs (struct objfile *objfile, domain_enum namespace, int wild, void *data) { - /* For now, we don't support Ada, so this function can't be - reached. */ - internal_error (__FILE__, __LINE__, - _("map_ada_symtabs called via index method")); + /* For now, we don't support Ada. Still the function can be called if the + current language is Ada for a non-Ada objfile using GNU index. As Ada + does not look for non-Ada symbols this function should just return. */ } static void