From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4960 invoked by alias); 26 May 2008 16:18:54 -0000 Received: (qmail 4893 invoked by uid 22791); 26 May 2008 16:18:32 -0000 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 26 May 2008 16:18:14 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 36BE92A9779 for ; Mon, 26 May 2008 12:18:12 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id a79tyW08zn3L for ; Mon, 26 May 2008 12:18:12 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id EDE912A9774 for ; Mon, 26 May 2008 12:18:11 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id B30C7E7ACD; Mon, 26 May 2008 09:18:09 -0700 (PDT) Date: Tue, 27 May 2008 18:58:00 -0000 From: Joel Brobecker To: gdb-patches@sourceware.org Subject: [patch/mdebug] symbol symtab not set on Tru64 Message-ID: <20080526161809.GD15798@adacore.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.2i 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: 2008-05/txt/msg00707.txt.bz2 Hello, Something I just noticed while working on alpha-tru64. When reading symbols from ECOFF, the produced symbols do not have their symtab field set. I did a little of archeology, and basically the reason for it is because the symbol reader does its own symbol and symtab building, rather than using buildsym. So when the symtab field was added to struct symbol, we forgot to update part of mdebugread.c. It's kind of confusing, because mdebugread also handles stabs-in-coff, in which case buildsym.c is being used. This may be why we missed the parts in mdebugread.c that needed an update. As a result, we end up with SEGVs or failed assertions when trying to access this field because it was NULL. Fixed thusly. 2008-05-26 Joel Brobecker Set the symtab field of symbols read from ECOFF debugging entries. * mdebugread.c (add_symbol): Add new parameter symtab. (parse_symbol): Update calls to add_symbol throughout. Tested on alpha-tru64 with the AdaCore testsuite (I can't seem to get expect to work on Tru64 anymore - it looks like I have an echo issue). I will commit in a week unless there are comments about the patch. -- Joel