From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13361 invoked by alias); 19 Nov 2008 20:44:26 -0000 Received: (qmail 13297 invoked by uid 22791); 19 Nov 2008 20:44:25 -0000 X-Spam-Check-By: sourceware.org Received: from mta3.glam.ac.uk (HELO mta3.glam.ac.uk) (193.63.147.53) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 19 Nov 2008 20:43:45 +0000 Received: from j228-gm.comp.glam.ac.uk ([193.63.148.84]) by mta3.glam.ac.uk with esmtp (Exim 4.63) (envelope-from ) id 1L2ttl-0001HF-6G; Wed, 19 Nov 2008 20:43:41 +0000 Received: from gaius by j228-gm.comp.glam.ac.uk with local (Exim 4.63) (envelope-from ) id 1L2ttZ-0004Vo-C5; Wed, 19 Nov 2008 20:43:29 +0000 To: Daniel Jacobowitz Cc: gdb-patches@sources.redhat.com Subject: Re: patch for dwarf2read.c References: <877i724s7s.fsf@j228-gm.comp.glam.ac.uk> <20081117133610.GA30098@caradoc.them.org> From: Gaius Mulley Date: Thu, 20 Nov 2008 01:56:00 -0000 In-Reply-To: <20081117133610.GA30098@caradoc.them.org> Message-ID: <87abbvmopa.fsf@j228-gm.comp.glam.ac.uk> User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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: 2008-11/txt/msg00511.txt.bz2 Daniel Jacobowitz writes: > Patches should include a changelog entry, please. What's > add_partial_subroutine_type about? It has a few bugs in it, but it's > also not called. Hi Daniel, thanks for the feedback.. yes you are right the add_partial_subroutine_type was not needed. Here is the tidied up patch together with a ChangeLog entry. I've run the regression tests on LP64 GNU/Linux Debian Stable and also i686 GNU/Linux Debian Stable. On the i686 platform there are no more regression test failures if this patch is applied. On the LP64 platform the failures sometimes increase and sometimes decrease.. I'm not sure whether this is expected? The instability appears to be in the region of the: < PASS: gdb.mi/mi-nonstop.exp: update varobj, 2 < PASS: gdb.mi/mi-nonstop.exp: stacktrace of stopped thread < PASS: gdb.mi/mi-nonstop.exp: select first worker thread < PASS: gdb.mi/mi-nonstop.exp: ask the second thread to exit < PASS: gdb.mi/mi-nonstop.exp: wait for thread exit < PASS: gdb.mi/mi-nonstop.exp: stacktrace of stopped thread tests - which, time this passed on the patched version and failed on the unpatched version - very odd. Anyhow it would be great if a dwarf-2 guru could eyeball the patch below as this is my first foray into dwarf2read.c regards, Gaius --- orig/src/gdb/dwarf2read.c 2008-11-15 18:49:50.000000000 +0000 +++ modified/src/gdb/dwarf2read.c 2008-11-19 19:03:27.000000000 +0000 @@ -4953,7 +4953,12 @@ the default value DW_CC_normal. */ attr = dwarf2_attr (die, DW_AT_calling_convention, cu); TYPE_CALLING_CONVENTION (ftype) = attr ? DW_UNSND (attr) : DW_CC_normal; - + + /* We need to add the subroutine type to the die immediately so + we don't infinitely recurse when dealing with parameters + declared as the same subroutine type. */ + set_die_type (die, ftype, cu); + if (die->child != NULL) { struct die_info *child_die; @@ -5000,7 +5005,7 @@ } } - return set_die_type (die, ftype, cu); + return ftype; } static struct type * 2008-11-19 Gaius Mulley * dwarf2read.c (read_subroutine_type): add the subroutine type to the die immediately to allow a parameter type to be the same subroutine type.