Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Kevin Buettner <kevinb@redhat.com>
To: gdb-patches@sources.redhat.com
Subject: [PATCH] rs6000-tdep.c: Use rs6000_* methods for 64-bit SysV ABI.
Date: Fri, 12 Apr 2002 10:18:00 -0000	[thread overview]
Message-ID: <1020412171832.ZM7472@localhost.localdomain> (raw)

I've just committed the patch below.

Note (see the comments) that I do have some concerns about this patch.
However, I think that we're better off with Jimi's changes than we are
with the status quo.

	From Jimi X <jimix@watson.ibm.com>:
	* rs6000-tdep.c (rs6000_gdbarch_init): Use rs6000_* methods for
	64-bit SysV ABI.

Index: rs6000-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/rs6000-tdep.c,v
retrieving revision 1.52
diff -u -p -r1.52 rs6000-tdep.c
--- rs6000-tdep.c	12 Apr 2002 07:37:18 -0000	1.52
+++ rs6000-tdep.c	12 Apr 2002 07:59:08 -0000
@@ -2658,7 +2658,14 @@ rs6000_gdbarch_init (struct gdbarch_info
 
   set_gdbarch_extract_return_value (gdbarch, rs6000_extract_return_value);
   
-  if (sysv_abi)
+  /* Note: kevinb/2002-04-12: I'm not convinced that rs6000_push_arguments()
+     is correct for the SysV ABI when the wordsize is 8, but I'm also
+     fairly certain that ppc_sysv_abi_push_arguments() will give even
+     worse results since it only works for 32-bit code.  So, for the moment,
+     we're better off calling rs6000_push_arguments() since it works for
+     64-bit code.  At some point in the future, this matter needs to be
+     revisited.  */
+  if (sysv_abi && wordsize == 4)
     set_gdbarch_push_arguments (gdbarch, ppc_sysv_abi_push_arguments);
   else
     set_gdbarch_push_arguments (gdbarch, rs6000_push_arguments);
@@ -2699,7 +2706,9 @@ rs6000_gdbarch_init (struct gdbarch_info
     }
 
   set_gdbarch_frame_chain_valid (gdbarch, file_frame_chain_valid);
-  if (osabi == ELFOSABI_LINUX)
+  /* Note: kevinb/2002-04-12: See note above regarding *_push_arguments().
+     The same remarks hold for the methods below.  */
+  if (osabi == ELFOSABI_LINUX && wordsize == 4)
     {
       set_gdbarch_frameless_function_invocation (gdbarch,
 	ppc_linux_frameless_function_invocation);


             reply	other threads:[~2002-04-12 17:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-12 10:18 Kevin Buettner [this message]
2002-04-12 11:23 ` Andrew Cagney
2002-04-12 12:01   ` 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=1020412171832.ZM7472@localhost.localdomain \
    --to=kevinb@redhat.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