This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[commit] Fix typo in ppc64_standard_linkage7
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: gdb-patches at sourceware dot org
- Cc: amodra at gmail dot com
- Date: Tue, 28 Jan 2014 18:10:01 +0100 (CET)
- Subject: [commit] Fix typo in ppc64_standard_linkage7
- Authentication-results: sourceware.org; auth=none
Hello,
The ppc64_standard_linkage7 pattern added by Alan's recent patch:
https://sourceware.org/ml/gdb-patches/2013-11/msg00274.html
contains a typo: the ELFv2 TOC slot offset is 24, not 40.
This was correct in the comment, but not the actual code.
Fixed by the patch below, which fixes a number of regressions
on powerpc64le-linux.
Applied to mainline and 7.7 branch.
Bye,
Ulrich
ChangeLog:
* ppc64-tdep.c (ppc64_standard_linkage7): Fix typo.
Index: binutils-gdb/gdb/ppc64-tdep.c
===================================================================
--- binutils-gdb.orig/gdb/ppc64-tdep.c
+++ binutils-gdb/gdb/ppc64-tdep.c
@@ -289,7 +289,7 @@ static struct ppc_insn_pattern ppc64_sta
static struct ppc_insn_pattern ppc64_standard_linkage7[] =
{
/* std r2, 24(r1) <optional> */
- { -1, insn_ds (62, 2, 1, 40, 0), 1 },
+ { -1, insn_ds (62, 2, 1, 24, 0), 1 },
/* ld r12, <any>(r2) */
{ insn_ds (-1, -1, -1, 0, -1), insn_ds (58, 12, 2, 0, 0), 0 },
--
Dr. Ulrich Weigand
GNU/Linux compilers and toolchain
Ulrich.Weigand@de.ibm.com