Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Gaius Mulley <gaius@glam.ac.uk>
To: Daniel Jacobowitz <drow@false.org>
Cc: gdb-patches@sources.redhat.com
Subject: Re: patch for dwarf2read.c
Date: Thu, 20 Nov 2008 01:56:00 -0000	[thread overview]
Message-ID: <87abbvmopa.fsf@j228-gm.comp.glam.ac.uk> (raw)
In-Reply-To: <20081117133610.GA30098@caradoc.them.org>


Daniel Jacobowitz <drow@false.org> 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  <gaius@glam.ac.uk>

	* dwarf2read.c (read_subroutine_type): add the subroutine
	  type to the die immediately to allow a parameter type to be
	  the same subroutine type.


      reply	other threads:[~2008-11-19 20:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-17 20:42 Gaius Mulley
2008-11-17 21:02 ` Gaius Mulley
2008-11-17 22:01 ` Daniel Jacobowitz
2008-11-20  1:56   ` Gaius Mulley [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87abbvmopa.fsf@j228-gm.comp.glam.ac.uk \
    --to=gaius@glam.ac.uk \
    --cc=drow@false.org \
    --cc=gdb-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox