From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30315 invoked by alias); 20 Mar 2003 15:27:59 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 30306 invoked from network); 20 Mar 2003 15:27:59 -0000 Received: from unknown (HELO localhost.redhat.com) (207.219.125.105) by sources.redhat.com with SMTP; 20 Mar 2003 15:27:59 -0000 Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 279E12B11; Thu, 20 Mar 2003 10:27:55 -0500 (EST) Message-ID: <3E79DDFB.4030003@redhat.com> Date: Thu, 20 Mar 2003 15:27:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.2) Gecko/20030223 X-Accept-Language: en-us, en MIME-Version: 1.0 To: gdb@sources.redhat.com, Corinna Vinschen Subject: Re: Where to set correct value for tdep->struct_return for Cygwin? References: <20030320152019.GA2699@cygbert.vinschen.de> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-03/txt/msg00301.txt.bz2 > Hi, > > I just found the following problem: > > In i386-tdep.c::i386_gdbarch_init(), tdep->struct_return is set to > pcc_struct_return by default. Several i386 targets set this value > in their appropriate _init function to reg_struct_return (e. g. the > bsd and interix targets). > > Cygwin is using reg_struct_return as well but unfortunately in contrast > to Interix it has no own tdep.c file and so there's no appropriate _init > function as e. g. i386_interix_init_abi() available to set that value. > This results in having tdep->struct_return still set to pcc_struct_return > and about 25 fails in the testsuite. > > So the question is, where to set that value? Shall we add a new cygwin-tdep.c > file, just to set this one value? Or is there some already existing obvious > place to do this? win32-nat.c seems to be not a good chice, btw. If both interix and cygwin are sharing a common ABI, then shouldn't that common ABI code live in i386-win32-tdep.c? Andrew