From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2108 invoked by alias); 7 Feb 2002 20:27:20 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 2033 invoked from network); 7 Feb 2002 20:27:16 -0000 Received: from unknown (HELO nevyn.them.org) (128.2.145.6) by sources.redhat.com with SMTP; 7 Feb 2002 20:27:16 -0000 Received: from drow by nevyn.them.org with local (Exim 3.34 #1 (Debian)) id 16Yv8P-00079v-00; Thu, 07 Feb 2002 15:27:09 -0500 Date: Thu, 07 Feb 2002 12:27:00 -0000 From: Daniel Jacobowitz To: Jim Blandy Cc: Andrew Cagney , gdb-patches@sources.redhat.com, Jason Merrill Subject: Re: RFA: MI tests: tolerate prototypes Message-ID: <20020207152709.A27386@nevyn.them.org> Mail-Followup-To: Jim Blandy , Andrew Cagney , gdb-patches@sources.redhat.com, Jason Merrill References: <20020203210609.E5E035E9DE@zwingli.cygnus.com> <20020203180133.C26302@nevyn.them.org> <20020205202132.A17384@nevyn.them.org> <20020206004829.A1357@nevyn.them.org> <3C61C6EB.5060908@cygnus.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.3.23i X-SW-Source: 2002-02/txt/msg00196.txt.bz2 On Thu, Feb 07, 2002 at 02:03:20PM -0500, Jim Blandy wrote: > > > Jim, my preference here is more along your proposal - have an explicit > > ``prototype-unknown'' state. > > > > From memory the last time this came up I also suggested here that > > changing the default behavour across GDB is probably a good thing. I > > don't think this is something that individual targets should be > > deciding. Instead GDB should exibit consistent behavour across > > host/target combinations, the decision being made on the basis of the > > debug info. > > Well, I wouldn't call it target-specific. The compromise we're making > is more like this: > > GCC's STABS describe prototyped function types as if they were > non-prototyped function types. However, it does provide accurate > pass-as types for function definitions. This means that GDB can > correctly call functions under STABS if it reads function definition > types *as if* they were prototyped, using the pass-as types as the > argument types. > > The downsides of this proposal: > > - GDB will print function argument types incorrectly. For example, > suppose we have the following function definition: > > int f (short s, float f) { return s + f; } > > Since the arguments' pass-as types for `s' and `f' are `int' and > `double', GDB will print f's type as `int f(int, double)'. This is > weird, but it's a direct consequence of lying about the type. Clarification: If f were not prototyped, this would be true. So it's a very small price to pay, IMHO. If it is prototyped, the pass-as type for f will be float, right? -- Daniel Jacobowitz Carnegie Mellon University MontaVista Software Debian GNU/Linux Developer