Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Kevin Buettner <kevinb@redhat.com>
To: David Edelsohn <dje@watson.ibm.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: PowerPC64 skip_prologue patch
Date: Wed, 24 Apr 2002 00:58:00 -0000	[thread overview]
Message-ID: <1020424075830.ZM12269@localhost.localdomain> (raw)
In-Reply-To: David Edelsohn <dje@watson.ibm.com> "PowerPC64 skip_prologue patch" (Apr 23, 11:41pm)

On Apr 23, 11:41pm, David Edelsohn wrote:

> 	What is the status of the PowerPC64 skip_prologue patch?  Without
> this patch, GDB does not recognize standard PowerPC64 prologue
> instructions which makes debugging very difficult.

I'm working on it.  Since we don't have a copyright assignment for
these changes, I've been told that I should pseudo-cleanroom it. 
Basically, what I'm going to do is look at the testsuite failures that
occur on PowerPC64 without the patch that you've posted, do my own
analysis, and create my own fixes.  I fully expect that the patches
that I come up with will look remarkably similar to the ones that
you've posted.  (Sigh.)

BTW, the patch you've just posted has more than just skip_prologue()
changes in it.  The following portions have already been dealt with:

> @@ -842,9 +878,6 @@
>  		       int nargs, struct value **args, struct type *type,
>  		       int gcc_p)
>  {
> -#define	TOC_ADDR_OFFSET		20
> -#define	TARGET_ADDR_OFFSET	28
> -
>    int ii;
>    CORE_ADDR target_addr;
>  

The above was taken care of by:

2002-04-08  Kevin Buettner  <kevinb@redhat.com>

	From Jimi X <jimix@watson.ibm.com>:
	* rs6000-tdep.c (rs6000_fix_call_dummy): Delete unused macro
	definitions for TOC_ADDR_OFFSET and TARGET_ADDR_OFFSET.


> @@ -975,7 +1008,8 @@
>  ran_out_of_registers_for_arguments:
>  
>    saved_sp = read_sp ();
> -#ifndef ELF_OBJECT_FORMAT
> +
> +#if !defined (ELF_OBJECT_FORMAT) || defined (ELF64_OBJECT_FORMAT)
>    /* location for 8 parameters are always reserved. */
>    sp -= wordsize * 8;
>  
> @@ -984,7 +1018,7 @@
>  
>    /* stack pointer must be quadword aligned */
>    sp &= -16;
> -#endif
> +#endif /* ! ELF_OBJECT_FORMAT || ELF64_OBJECT_FORMAT */
>  
>    /* if there are more arguments, allocate space for them in 
>       the stack, then push them starting from the ninth one. */

For the above patch, I decided that ELF_OBJECT_FORMAT was no
longer needed.  So I did:

2002-04-08  Kevin Buettner  <kevinb@redhat.com>

	* config/powerpc/tm-ppc-eabi.h (ELF_OBJECT_FORMAT): Delete.
	* rs6000-tdep.c (rs6000_push_arguments): Eliminate
	ELF_OBJECT_FORMAT ifdef.

> @@ -1284,6 +1318,16 @@
>        if (fi->next->signal_handler_caller)
>  	return read_memory_addr (fi->next->frame + SIG_FRAME_LR_OFFSET,
>  				 wordsize);
> +      else if (wordsize == 8)
> +	{
> +	  /* FIXME: If this is ever called, cause skip prologue should
> +	     get it right, then on a 64-bit target DEFAULT_LR_SAVE is
> +	     different (should be 16 not 8), if target is 32 bits then
> +	     we let the definition decide since it is ABI
> +	     dependent. */
> +	  return read_memory_addr (FRAME_CHAIN (fi) + 16,
> +				     wordsize);
> +	}
>        else
>  	return read_memory_addr (FRAME_CHAIN (fi) + DEFAULT_LR_SAVE,
>  				 wordsize);

I dealt with this differently too...

2002-04-12  Kevin Buettner  <kevinb@redhat.com>

	* ppc-tdep.h (struct gdbarch_tdep): Add new member ``lr_frame_offset''.
	* rs6000-tdep.c (rs6000_frame_saved_pc): Use ``lr_frame_offset''
	from tdep struct instead of DEFAULT_LR_SAVE.
	(rs6000_gdbarch_init): Initialize ``lr_frame_offset''.
	* config/powerpc/tm-ppc-eabi.h (DEFAULT_LR_SAVE): Delete.
	* config/rs6000/tm-rs6000.h (DEFAULT_LR_SAVE): Delete.


  reply	other threads:[~2002-04-24  7:58 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-23 20:41 David Edelsohn
2002-04-24  0:58 ` Kevin Buettner [this message]
2002-04-24  8:01   ` David Edelsohn
2002-04-24  8:34   ` Stan Shebs
2002-04-24  8:55     ` Christopher Faylor
2002-04-24 10:55       ` Stan Shebs
2002-04-24  9:49     ` Andrew Cagney
2002-04-24  9:58       ` David Edelsohn
2002-04-24 11:11         ` Andrew Cagney

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=1020424075830.ZM12269@localhost.localdomain \
    --to=kevinb@redhat.com \
    --cc=dje@watson.ibm.com \
    --cc=gdb-patches@sources.redhat.com \
    /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