Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <ac131313@redhat.com>
To: Andreas Schwab <schwab@suse.de>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [commit] infcall.c cleanup - explict bp_addr variable
Date: Fri, 27 Jun 2003 22:04:00 -0000	[thread overview]
Message-ID: <3EFCBF6F.2050805@redhat.com> (raw)
In-Reply-To: <jey8znkzi3.fsf@sykes.suse.de>

> Andrew Cagney <ac131313@redhat.com> 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  <schwab@suse.de>
> 
> 	* 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." 



  reply	other threads:[~2003-06-27 22:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-23 19:12 Andrew Cagney
2003-06-27 21:00 ` Andreas Schwab
2003-06-27 22:04   ` Andrew Cagney [this message]
2003-06-27 23:05     ` Andreas Schwab
2003-07-01 17:44     ` Andreas Schwab
2003-07-01 21:35       ` Kevin Buettner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3EFCBF6F.2050805@redhat.com \
    --to=ac131313@redhat.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=schwab@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox