From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15140 invoked by alias); 22 Jul 2010 15:54:09 -0000 Received: (qmail 15131 invoked by uid 22791); 22 Jul 2010 15:54:09 -0000 X-SWARE-Spam-Status: No, hits=-6.0 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; Thu, 22 Jul 2010 15:53:32 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o6MFrSXA024942 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 22 Jul 2010 11:53:29 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o6MFrSkJ032162; Thu, 22 Jul 2010 11:53:28 -0400 Received: from opsy.redhat.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id o6MFrROu011693; Thu, 22 Jul 2010 11:53:27 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id DD5223797F3; Thu, 22 Jul 2010 09:53:26 -0600 (MDT) From: Tom Tromey To: Paul Pluzhnikov Cc: gdb-patches@sourceware.org Subject: Re: [0/4] RFC: add DWARF index support References: Date: Thu, 22 Jul 2010 15:54:00 -0000 In-Reply-To: (Tom Tromey's message of "Thu, 22 Jul 2010 08:13:34 -0600") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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-07/txt/msg00350.txt.bz2 >>>>> "Tom" == Tom Tromey writes: Tom> The immediate problem is that a dwarf2_per_cu_data is embedded in struct Tom> signatured_type, and initialized in create_debug_types_hash_table. This Tom> embedded struct doesn't get its objfile member initialized. Here is the fix for the immediate problem. It prevents gdb from dying. I am checking this in. Bootstrapped & regtested on x86-64 (compile farm), and also tested locally against an executable with .debug_types. Tom> The bigger problem is that I completely forgot about .debug_types. Tom> I am not certain that a simple fix will work if we have both Tom> .debug_types and .gdb_index. I will try that out. I think this is going to need an index version bump. I am still looking into it. Tom 2010-07-22 Tom Tromey * dwarf2read.c (create_debug_types_hash_table): Set objfile on type signature's per-CU data. Index: dwarf2read.c =================================================================== RCS file: /cvs/src/src/gdb/dwarf2read.c,v retrieving revision 1.421 diff -u -r1.421 dwarf2read.c --- dwarf2read.c 21 Jul 2010 18:08:26 -0000 1.421 +++ dwarf2read.c 22 Jul 2010 15:42:38 -0000 @@ -2678,6 +2678,7 @@ type_sig->signature = signature; type_sig->offset = offset; type_sig->type_offset = type_offset; + type_sig->per_cu.objfile = objfile; slot = htab_find_slot (types_htab, type_sig, INSERT); gdb_assert (slot != NULL);