From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28753 invoked by alias); 7 Feb 2002 00:14:38 -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 28685 invoked from network); 7 Feb 2002 00:14:37 -0000 Received: from unknown (HELO localhost.redhat.com) (24.114.26.18) by sources.redhat.com with SMTP; 7 Feb 2002 00:14:37 -0000 Received: from cygnus.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 0B6693E6A; Wed, 6 Feb 2002 19:14:36 -0500 (EST) Message-ID: <3C61C6EB.5060908@cygnus.com> Date: Wed, 06 Feb 2002 16:14:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:0.9.7) Gecko/20020103 X-Accept-Language: en-us MIME-Version: 1.0 To: Jim Blandy Cc: Daniel Jacobowitz , gdb-patches@sources.redhat.com, Jason Merrill Subject: Re: RFA: MI tests: tolerate prototypes References: <20020203210609.E5E035E9DE@zwingli.cygnus.com> <20020203180133.C26302@nevyn.them.org> <20020205202132.A17384@nevyn.them.org> <20020206004829.A1357@nevyn.them.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2002-02/txt/msg00188.txt.bz2 > Daniel Jacobowitz writes: > >> > Ah, by building `prototype'-style types for all the functions, even >> > those declared without prototypes, and using the called-as types as >> > the prototype argument types. It'll work because, even though the >> > type claims to be prototyped, the argument types are such that we end >> > up doing the same promotions required by the rules for calling >> > non-prototyped functions. > >> >> So, the question becomes - do we need MAYBE_PROTOTYPED? If we accept >> that the types marked in stabs as parameters are promoted types, then >> we can simply mark stabs functions as being prototyped, and trust >> TYPE_FLAG_PROTOTYPED more than we do. > > > If we do that, then: > - Dwarf 2 will continue to work correctly, since its prototype info > has always been accurate, > - under STABS, calls to functions whose definitions we have debug info > for will always work, unlike the current state of affairs, and > - under STABS, calls via function pointers will do non-prototyped > argument promotion, which is no worse than now. > > Sounds good to me. > > It does bother me, sort of on principle, that we won't really have > info about which functions were declared in which way. I mean, > prototypedness is a real property of function types in ISO C. But > given that our debug format doesn't carry the info we need, I guess > I'll just get over it. :) 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. enjoy, Andrew