From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18181 invoked by alias); 8 Sep 2003 18:43:50 -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 18167 invoked from network); 8 Sep 2003 18:43:49 -0000 Received: from unknown (HELO localhost.redhat.com) (66.30.197.194) by sources.redhat.com with SMTP; 8 Sep 2003 18:43:49 -0000 Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id C3E852B7F; Mon, 8 Sep 2003 14:43:41 -0400 (EDT) Message-ID: <3F5CCDDD.4010809@redhat.com> Date: Mon, 08 Sep 2003 18:43:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.2) Gecko/20030820 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Mark Kettenis Cc: gdb@sources.redhat.com, dan@debian.org Subject: Re: REG_STRUCT_HAS_ADDR References: <200309062206.h86M62no012596@elgar.kettenis.dyndns.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-09/txt/msg00102.txt.bz2 > Unfortunately this breaks debugging with stabs, since stabsread.c uses > the same REG_STRUCT_HAS_ADDR to see if a function argument is passed > by value or by reference. I think we really want to get rid of the > broken code in infcall.c in the long run. Therefore I looked for a > way to disable it for "modern" targets, i.e. targets that define > PUSH_DUMMY_CALL as opposed to the old PUSH_DUMMY_FRAME & friends. > Looking at the code I found that the following targets (besides SPARC) > are using REG_STRUCT_HAS_ADDR: Instead, add a new method: STABS_REG_STRUCT_HAS_ADDR with a default of: if (DEPRECATED_REG_STRUCT_HAS_ADDR_P () return REG_STRUCT ... (); else return 0; (no predicate) (I think I've got that right) (better name?) and deprecate REG_STRUCT_HAS_ADDR{,_P}. I think stabsread.c can then switch to the STABS variant. That should let you safely disentangle the SPARC without breaking "stabsread.c". > - if (REG_STRUCT_HAS_ADDR_P ()) > + if (REG_STRUCT_HAS_ADDR_P () > + && !gdbarch_push_dummy_call_p (current_gdbcarch)) The switch to push_dummy_call_p shouldn't cause unexpected side effects such as disabling REG_STRUCT_HAS_ADDR_P. From memory, I've got the current code down to just one and even that doesn't really need it. Andrew