From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8155 invoked by alias); 30 Mar 2003 14:59:13 -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 8148 invoked from network); 30 Mar 2003 14:59:13 -0000 Received: from unknown (HELO localhost.redhat.com) (24.157.166.107) by sources.redhat.com with SMTP; 30 Mar 2003 14:59:13 -0000 Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 9F9102B23; Sun, 30 Mar 2003 09:59:11 -0500 (EST) Message-ID: <3E87063F.7020506@redhat.com> Date: Sun, 30 Mar 2003 14:59: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: Andrew Cagney Cc: gdb-patches@sources.redhat.com Subject: Re: [patch rfc] TARGET_WRITE_SP -> DEPRECATED_DUMMY_WRITE_SP References: <3E8470A1.9060106@redhat.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-03/txt/msg00594.txt.bz2 I've checked this in. > The attached patch replaces TARGET_WRITE_SP with DEPRECATED_DUMMY_WRITE_SP. Instead of providing this method, an architecture is expected to update the stack pointer as part of creating the fake call-frame (in push_dummy_call()). > > To make DEPRECATED_DUMMY_WRITE_SP optional, all the existing targets (except the d10v) were updated to explicitly set this new method (gdb_mbuild.sh rules m'kay). > > In addition, it alters the valops.c logic that decides if/when DEPRECATED_DUMMY_WRITE_SP() should be called: > > stored the stack pointer (as part of creating the fake call > frame), and none of the code following that code adjusts the > stack-pointer value, the below call is entirely redundant. */ > - if (!gdbarch_push_dummy_call_p (current_gdbarch)) > - TARGET_WRITE_SP (sp); > + if (DEPRECATED_DUMMY_WRITE_SP_P ()) > + DEPRECATED_DUMMY_WRITE_SP (sp); > > if (SAVE_DUMMY_FRAME_TOS_P ()) > SAVE_DUMMY_FRAME_TOS (sp); > > By doing this, migrating to push_dummy_call() from push_arguments() is much easier. The SP code can be moved over separate to switching to push_dummy_call(). > > > I'll look to commit in a few days, > > Andrew > > > > Index: doc/ChangeLog > 2003-03-27 Andrew Cagney > > * gdbint.texinfo (Target Architecture Definition): Remove > reference to TARGET_WRITE_SP. > > 2003-03-28 Andrew Cagney > > * gdbarch.sh (DEPRECATED_DUMMY_WRITE_SP): Replace TARGET_WRITE_SP. > * gdbarch.h, gdbarch.c: Regenerate. > * arm-tdep.c (arm_gdbarch_init): Set deprecated_dummy_write_sp. > * v850-tdep.c (v850_gdbarch_init): Ditto. > * xstormy16-tdep.c (xstormy16_gdbarch_init): Ditto. > * mcore-tdep.c (mcore_gdbarch_init): Ditto. > * m68k-tdep.c (m68k_gdbarch_init): Ditto. > * i386-tdep.c (i386_gdbarch_init): Ditto. > * h8300-tdep.c (h8300_gdbarch_init): Ditto. > * cris-tdep.c (cris_gdbarch_init): Ditto. > * vax-tdep.c (vax_gdbarch_init): Ditto. > * s390-tdep.c (s390_gdbarch_init): Ditto. > * ns32k-tdep.c (ns32k_gdbarch_init): Ditto. > * mn10300-tdep.c (mn10300_gdbarch_init): Ditto. > * alpha-tdep.c (alpha_gdbarch_init): Ditto. > * sparc-tdep.c (sparc_push_dummy_frame, sparc_pop_frame): Update. > * config/sparc/tm-sp64.h (DEPRECATED_DUMMY_WRITE_SP): Update. > * config/pa/tm-hppa.h (DEPRECATED_DUMMY_WRITE_SP): Define. > * sparc-tdep.c (sparc_gdbarch_init): Update. > * sh-tdep.c (sh_gdbarch_init): Update. > * rs6000-tdep.c (rs6000_gdbarch_init): Update. > * mips-tdep.c (mips_gdbarch_init): Update. > * m68hc11-tdep.c (m68hc11_gdbarch_init): Update. > * ia64-tdep.c (ia64_gdbarch_init): Update. > * frv-tdep.c (frv_gdbarch_init): Update. > * avr-tdep.c (avr_gdbarch_init): Update. > * valops.c (hand_function_call): Replace TARGET_WRITE_SP with > DEPRECATED_DUMMY_WRITE_SP. Call when the method is available, > instead of when push_dummy_call is not available. >