Blame SOURCES/gdb-rhbz1125820-ppc64le-enablement-31of37.patch

01917d
commit 52f548e41f085550d7740c350c1c8a239532af77
01917d
Author: Ulrich Weigand <ulrich.weigand@de.ibm.com>
01917d
Date:   Tue Feb 4 18:41:36 2014 +0100
01917d
01917d
    PowerPC64 ELFv2 ABI: stack frame layout changes
01917d
    
01917d
    This implementes another change in ELFv2: the stack frame no longer
01917d
    contains the reserved double words for linker and compiler use
01917d
    (which weren't really used for much of anything anyway).  This
01917d
    affects placement of on-stack parameters in inferior calls.
01917d
    
01917d
    gdb/ChangeLog:
01917d
    
01917d
    	* ppc-sysv-tdep.c (ppc64_sysv_abi_push_dummy_call): Use correct
01917d
    	offset to the stack parameter list for the ELFv2 ABI.
01917d
01917d
Index: gdb-7.6.1/gdb/ppc-sysv-tdep.c
01917d
===================================================================
01917d
--- gdb-7.6.1.orig/gdb/ppc-sysv-tdep.c
01917d
+++ gdb-7.6.1/gdb/ppc-sysv-tdep.c
01917d
@@ -1473,9 +1473,13 @@ ppc64_sysv_abi_push_dummy_call (struct g
01917d
 	  argpos.regcache = regcache;
01917d
 	  argpos.refparam = align_down (sp - refparam_size, 16);
01917d
 	  argpos.gparam = align_down (argpos.refparam - gparam_size, 16);
01917d
-	  /* Add in space for the TOC, link editor double word,
01917d
-	     compiler double word, LR save area, CR save area.  */
01917d
-	  sp = align_down (argpos.gparam - 48, 16);
01917d
+	  /* Add in space for the TOC, link editor double word (v1 only),
01917d
+	     compiler double word (v1 only), LR save area, CR save area,
01917d
+	     and backchain.  */
01917d
+	  if (tdep->elf_abi == POWERPC_ELF_V1)
01917d
+	    sp = align_down (argpos.gparam - 48, 16);
01917d
+	  else
01917d
+	    sp = align_down (argpos.gparam - 32, 16);
01917d
 	}
01917d
 
01917d
       /* If the function is returning a `struct', then there is an