diff options
author | Ulrich Weigand <uweigand@de.ibm.com> | 2013-08-07 14:39:57 +0000 |
---|---|---|
committer | Ulrich Weigand <uweigand@de.ibm.com> | 2013-08-07 14:39:57 +0000 |
commit | b08ee99f15ab5b1a2bf4572f34fdd1322debecb8 (patch) | |
tree | 1ea1c86f2228d784f1d67c0c329f730200a88414 /gdb/rs6000-nat.c | |
parent | fecf803efafe6339bb45401ecbaef00b9a85295e (diff) | |
download | gdb-b08ee99f15ab5b1a2bf4572f34fdd1322debecb8.zip gdb-b08ee99f15ab5b1a2bf4572f34fdd1322debecb8.tar.gz gdb-b08ee99f15ab5b1a2bf4572f34fdd1322debecb8.tar.bz2 |
2013-08-07 Raunaq Bathija <raunaq12@in.ibm.com>
Ulrich Weigand <uweigand@de.ibm.com>
* gdb_ptrace.h: Use ptrace64 instead of ptrace if HAVE_PTRACE64
is defined.
* rs6000-nat.c: Check for __ld_info64_ if compiling 64 BIT gdb.
(rs6000_ptrace32): Call ptrace64 instead of ptrace if present.
(rs6000_ptrace64): Call ptace64 instead of ptracex if present.
* configure.ac: Check for ptrace64.
* configure, config.in: Regenerate.
Diffstat (limited to 'gdb/rs6000-nat.c')
-rw-r--r-- | gdb/rs6000-nat.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/gdb/rs6000-nat.c b/gdb/rs6000-nat.c index 6769618..0953356 100644 --- a/gdb/rs6000-nat.c +++ b/gdb/rs6000-nat.c @@ -65,7 +65,7 @@ /* In 32-bit compilation mode (which is the only mode from which ptrace() works on 4.3), __ld_info32 is #defined as equivalent to ld_info. */ -#ifdef __ld_info32 +#if defined (__ld_info32) || defined (__ld_info64) # define ARCH3264 #endif @@ -131,7 +131,11 @@ regmap (struct gdbarch *gdbarch, int regno, int *isfloat) static int rs6000_ptrace32 (int req, int id, int *addr, int data, int *buf) { + #ifdef HAVE_PTRACE64 + int ret = ptrace64 (req, id, (long long) addr, data, buf); + #else int ret = ptrace (req, id, (int *)addr, data, buf); + #endif #if 0 printf ("rs6000_ptrace32 (%d, %d, 0x%x, %08x, 0x%x) = 0x%x\n", req, id, (unsigned int)addr, data, (unsigned int)buf, ret); @@ -145,7 +149,11 @@ static int rs6000_ptrace64 (int req, int id, long long addr, int data, void *buf) { #ifdef ARCH3264 + #ifdef HAVE_PTRACE64 + int ret = ptrace64 (req, id, addr, data, buf); + #else int ret = ptracex (req, id, addr, data, buf); + #endif #else int ret = 0; #endif |