From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21885 invoked by alias); 27 Jun 2003 22:04:32 -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 21878 invoked from network); 27 Jun 2003 22:04:31 -0000 Received: from unknown (HELO localhost.redhat.com) (216.129.200.2) by sources.redhat.com with SMTP; 27 Jun 2003 22:04:31 -0000 Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id ACC002B5F; Fri, 27 Jun 2003 18:04:31 -0400 (EDT) Message-ID: <3EFCBF6F.2050805@redhat.com> Date: Fri, 27 Jun 2003 22:04: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: Andreas Schwab Cc: gdb-patches@sources.redhat.com Subject: Re: [commit] infcall.c cleanup - explict bp_addr variable References: <3EA6AE7F.7060708@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-SW-Source: 2003-06/txt/msg00839.txt.bz2 > Andrew Cagney writes: > > |> @@ -649,7 +663,13 @@ > |> return-address register as appropriate. Formerly this has been > |> done in PUSH_ARGUMENTS, but that's overloading its > |> functionality a bit, so I'm making it explicit to do it here. */ > |> - sp = DEPRECATED_PUSH_RETURN_ADDRESS (real_pc, sp); > |> + /* NOTE: cagney/2003-04-22: The first parameter ("real_pc") has > |> + been replaced with zero, it turns out that no implementation > |> + used that parameter. This occured because the value being > > This is obviously wrong. See ia64_push_return_address. Fixes PR1256 and > most testsuite failures (there are a few new failures of things that > weren't tested before, especially backtraces from call dummies are > broken). In a word, outch! (I missed that). > static CORE_ADDR > ia64_push_return_address (CORE_ADDR pc, CORE_ADDR sp) > { > CORE_ADDR global_pointer = FIND_GLOBAL_POINTER (pc); > > if (global_pointer != 0) > write_register (IA64_GR1_REGNUM, global_pointer); > > write_register (IA64_BR0_REGNUM, CALL_DUMMY_ADDRESS ()); > return sp; > } Does, instead, a s/push_arguments/push_dummy_call/ and move the above code to push_dummy_call (PC -> FUNC_ADDR, CALL_DUMMY_ADDRESS -> BP_ADDR) work? Andrew > Andreas. > > 2003-06-27 Andreas Schwab > > * infcall.c (call_function_by_hand): Partially revert change of > 2003-04-22: do pass real_pc to DEPRECATED_PUSH_RETURN_ADDRESS. > > --- gdb/infcall.c.~1.17.~ 2003-06-20 11:44:27.000000000 +0200 > +++ gdb/infcall.c 2003-06-27 21:58:41.000000000 +0200 > @@ -768,13 +768,7 @@ You must use a pointer to function type > return-address register as appropriate. Formerly this has been > done in PUSH_ARGUMENTS, but that's overloading its > functionality a bit, so I'm making it explicit to do it here. */ > - /* NOTE: cagney/2003-04-22: The first parameter ("real_pc") has > - been replaced with zero, it turns out that no implementation > - used that parameter. This occured because the value being > - supplied - the address of the called function's entry point > - instead of the address of the breakpoint that the called > - function should return to - wasn't useful. */ > - sp = DEPRECATED_PUSH_RETURN_ADDRESS (0, sp); > + sp = DEPRECATED_PUSH_RETURN_ADDRESS (real_pc, sp); > > /* NOTE: cagney/2003-03-23: Diable this code when there is a > push_dummy_call() method. Since that method will have already > > -- Andreas Schwab, SuSE Labs, schwab@suse.de SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."