aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorUlrich Weigand <ulrich.weigand@de.ibm.com>2014-02-04 18:41:36 +0100
committerUlrich Weigand <ulrich.weigand@de.ibm.com>2014-02-04 18:41:36 +0100
commit52f548e41f085550d7740c350c1c8a239532af77 (patch)
tree179f74e2933f43f6e02eb534a4f2c0c271167b1a /gdb
parentd4094b6a8883ae481c7644c5a210254efe92e9ad (diff)
downloadgdb-52f548e41f085550d7740c350c1c8a239532af77.zip
gdb-52f548e41f085550d7740c350c1c8a239532af77.tar.gz
gdb-52f548e41f085550d7740c350c1c8a239532af77.tar.bz2
PowerPC64 ELFv2 ABI: stack frame layout changes
This implementes another change in ELFv2: the stack frame no longer contains the reserved double words for linker and compiler use (which weren't really used for much of anything anyway). This affects placement of on-stack parameters in inferior calls. gdb/ChangeLog: * ppc-sysv-tdep.c (ppc64_sysv_abi_push_dummy_call): Use correct offset to the stack parameter list for the ELFv2 ABI.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/ppc-sysv-tdep.c10
2 files changed, 12 insertions, 3 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 795e23f..a479346 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
2014-02-04 Ulrich Weigand  <uweigand@de.ibm.com>
+ * ppc-sysv-tdep.c (ppc64_sysv_abi_push_dummy_call): Use correct
+ offset to the stack parameter list for the ELFv2 ABI.
+
+2014-02-04 Ulrich Weigand  <uweigand@de.ibm.com>
+
* ppc-linux-tdep.c (ppc_linux_init_abi): Only call
set_gdbarch_convert_from_func_ptr_addr and
set_gdbarch_elf_make_msymbol_special for ELFv1.
diff --git a/gdb/ppc-sysv-tdep.c b/gdb/ppc-sysv-tdep.c
index b7fb429..f6b24bf 100644
--- a/gdb/ppc-sysv-tdep.c
+++ b/gdb/ppc-sysv-tdep.c
@@ -1474,9 +1474,13 @@ ppc64_sysv_abi_push_dummy_call (struct gdbarch *gdbarch,
argpos.regcache = regcache;
argpos.refparam = align_down (sp - refparam_size, 16);
argpos.gparam = align_down (argpos.refparam - gparam_size, 16);
- /* Add in space for the TOC, link editor double word,
- compiler double word, LR save area, CR save area. */
- sp = align_down (argpos.gparam - 48, 16);
+ /* Add in space for the TOC, link editor double word (v1 only),
+ compiler double word (v1 only), LR save area, CR save area,
+ and backchain. */
+ if (tdep->elf_abi == POWERPC_ELF_V1)
+ sp = align_down (argpos.gparam - 48, 16);
+ else
+ sp = align_down (argpos.gparam - 32, 16);
}
/* If the function is returning a `struct', then there is an