Binutils with MCST patches
Go to file
Joel Brobecker 11cb8762fc thread support broken on ppc-aix.
Thread support got broken when adding 64bit support on ppc-aix.
Upon digging further, I found that the following patch...

   | * 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.

... is responsible for this regression:

    (gdb) x /x &__n_pthreads
    0xf06a8258 <__n_pthreads>: Cannot access memory at address 0xf06a8258

Prior to the patch, we have:

    (gdb) x /x &__n_pthreads
    0xf06a8258 <__n_pthreads>: 0x00000003

The problem occurs inside rs6000_ptrace32, while calling ptrace64.
The address is given to rs6000_ptrace32 as an "int *", while
ptrace64 takes a "long long". The cast causes the address to be
sign-extended, which results in GDB trying to read the wrong address.

This patch fixes the issue by casting the address to a "uintptr_t"
instead, and letting the compiler do the implicit conversion to
"long long" in the function call.

gdb/ChangeLog:

        * rs6000-nat.c (rs6000_ptrace32): Cast "addr" to "uintptr_t"
        instead of "long long" in call to ptrace64.
2013-08-29 21:02:15 +00:00
bfd * elf64-x86-64.c (elf_x86_64_check_tls_transition): Allow 2013-08-29 10:25:27 +00:00
binutils PR binutils/15796 2013-08-27 16:22:48 +00:00
config 2013-04-30 Jan-Benedict Glaw <jbglaw@lug-owl.de> 2013-04-30 12:40:42 +00:00
cpu PR binutils/15241 2013-03-08 17:25:12 +00:00
elfcpp elfcpp/ 2013-03-01 22:45:56 +00:00
etc PR other/46202: implement install-strip. 2010-11-20 19:37:58 +00:00
gas * aarch64-opc.c (aarch64_logical_immediate_p): Return FALSE if the 2013-08-28 10:25:36 +00:00
gdb thread support broken on ppc-aix. 2013-08-29 21:02:15 +00:00
gold gold/ 2013-08-27 21:49:48 +00:00
gprof bfd/ 2013-08-05 21:58:23 +00:00
include PR binutils/15834 2013-08-23 07:54:19 +00:00
intl merge from gcc 2010-09-27 21:01:18 +00:00
ld * elf64-x86-64.c (elf_x86_64_check_tls_transition): Allow 2013-08-29 10:25:27 +00:00
libdecnumber merge from gcc 2013-07-09 16:04:44 +00:00
libiberty merge from gcc 2013-08-20 06:02:53 +00:00
opcodes * aarch64-opc.c (aarch64_logical_immediate_p): Return FALSE if the 2013-08-28 10:25:36 +00:00
readline readline/ 2013-05-22 09:51:49 +00:00
sim * gdb-if.c (hw_breakpoints): Remove. 2013-08-08 00:10:01 +00:00
texinfo
.cvsignore
.gitignore Sync the root .gitignore file with GCC's. 2013-01-11 15:17:35 +00:00
COPYING
COPYING.LIB
COPYING.LIBGLOSS 2013-01-07 Jeff Johnston <jjohnstn@redhat.com> 2013-01-07 21:39:26 +00:00
COPYING.NEWLIB 2013-05-06 Sandra Loosemore <sandra@codesourcery.com> 2013-05-06 18:31:56 +00:00
COPYING3
COPYING3.LIB
ChangeLog src-release: Strip "-cvs" from GDB source dir and tarball. 2013-08-17 01:07:52 +00:00
MAINTAINERS MAINTAINERS: clarify policy with config/ (and other top level files) 2012-05-12 03:10:17 +00:00
Makefile.def 2013-08-12 Jan-Benedict Glaw <jbglaw@lug-owl.de> 2013-08-12 11:36:35 +00:00
Makefile.in 2013-08-12 Jan-Benedict Glaw <jbglaw@lug-owl.de> 2013-08-12 11:36:35 +00:00
Makefile.tpl * Makefile.tpl (BOOT_ADAFLAGS): Remove -gnata. 2013-01-11 11:48:54 +00:00
README
README-maintainer-mode Cleanups after the update to Autoconf 2.64, Automake 1.11. 2009-08-22 17:08:11 +00:00
compile Update automake-provided files in the toplevel. 2009-08-22 11:48:33 +00:00
config-ml.in * config-ml.in: Don't handle arc-*-elf*. 2011-03-22 20:01:13 +00:00
config.guess * config.guess: Update from config repo. 2013-04-29 15:13:53 +00:00
config.rpath Remove freebsd1 from libtool.m4 macros and config.rpath. 2011-02-13 21:00:14 +00:00
config.sub * config.guess: Update from config repo. 2013-04-29 15:13:53 +00:00
configure 2013-08-12 Jan-Benedict Glaw <jbglaw@lug-owl.de> 2013-08-12 11:36:35 +00:00
configure.ac 2013-08-12 Jan-Benedict Glaw <jbglaw@lug-owl.de> 2013-08-12 11:36:35 +00:00
depcomp Update automake-provided files in the toplevel. 2009-08-22 11:48:33 +00:00
djunpack.bat
install-sh Update automake-provided files in the toplevel. 2009-08-22 11:48:33 +00:00
libtool.m4 PR target/38607 2012-09-14 23:55:22 +00:00
ltgcc.m4
ltmain.sh Backport from Libtool: Fix relink mode to use absolute path if hardcode_minus_L. 2011-01-13 18:52:53 +00:00
ltoptions.m4 Sync Libtool from GCC. 2010-01-09 21:11:44 +00:00
ltsugar.m4
ltversion.m4 Sync Libtool from GCC. 2010-01-09 21:11:44 +00:00
lt~obsolete.m4 Sync Libtool from GCC. 2010-01-09 21:11:44 +00:00
makefile.vms
missing Update automake-provided files in the toplevel. 2009-08-22 11:48:33 +00:00
mkdep
mkinstalldirs Update automake-provided files in the toplevel. 2009-08-22 11:48:33 +00:00
move-if-change Import move-if-change script from gnulib. 2011-02-12 15:47:02 +00:00
setup.com 2009-09-01 Tristan Gingold <gingold@adacore.com> 2009-09-01 13:38:26 +00:00
src-release src-release: Strip "-cvs" from GDB source dir and tarball. 2013-08-17 01:07:52 +00:00
symlink-tree
ylwrap Update automake-provided files in the toplevel. 2009-08-22 11:48:33 +00:00

README

		   README for GNU development tools

This directory contains various GNU compilers, assemblers, linkers, 
debuggers, etc., plus their support routines, definitions, and documentation.

If you are receiving this as part of a GDB release, see the file gdb/README.
If with a binutils release, see binutils/README;  if with a libg++ release,
see libg++/README, etc.  That'll give you info about this
package -- supported targets, how to use it, how to report bugs, etc.

It is now possible to automatically configure and build a variety of
tools with one command.  To build all of the tools contained herein,
run the ``configure'' script here, e.g.:

	./configure 
	make

To install them (by default in /usr/local/bin, /usr/local/lib, etc),
then do:
	make install

(If the configure script can't determine your type of computer, give it
the name as an argument, for instance ``./configure sun4''.  You can
use the script ``config.sub'' to test whether a name is recognized; if
it is, config.sub translates it to a triplet specifying CPU, vendor,
and OS.)

If you have more than one compiler on your system, it is often best to
explicitly set CC in the environment before running configure, and to
also set CC when running make.  For example (assuming sh/bash/ksh):

	CC=gcc ./configure
	make

A similar example using csh:

	setenv CC gcc
	./configure
	make

Much of the code and documentation enclosed is copyright by
the Free Software Foundation, Inc.  See the file COPYING or
COPYING.LIB in the various directories, for a description of the
GNU General Public License terms under which you can copy the files.

REPORTING BUGS: Again, see gdb/README, binutils/README, etc., for info
on where and how to report problems.