No description
c38e85596e
I noticed GDB was failing to enable threading support for 32-bit AIX cores. I traced it to failure to read variables from libpthreads.a. The issue is that data for that library is loaded at a high address, and bfd is sign extending the section addresses: (gdb) info files Symbols from "/home/palves/crash". Local core dump file: `/home/palves/core', file type aixcoff-rs6000. 0x2ff22000 - 0x2ff23000 is .stack 0x20000000 - 0x200316e0 is .data 0x20000e90 - 0x200016c0 is .data 0xfffffffff0254000 - 0xfffffffff0297920 is .data 0xfffffffff07b46a8 - 0xfffffffff07b47c8 is .data 0xfffffffff0298000 - 0xfffffffff029bfcc is .data 0xfffffffff06dafe0 - 0xfffffffff07b3838 is .data Local exec file: `/home/palves/crash', file type aixcoff-rs6000. Entry point: 0x20001394 0x10000150 - 0x10000e90 is .text 0x20000e90 - 0x2000149c is .data 0x2000149c - 0x200016c0 is .bss 0xd053b124 - 0xd053e15f is .text in /usr/lib/libpthreads.a(shr_comm.o) 0xf0254000 - 0xf0297920 is .data in /usr/lib/libpthreads.a(shr_comm.o) 0xf0254450 - 0xf0297920 is .bss in /usr/lib/libpthreads.a(shr_comm.o) 0xd053a280 - 0xd053aabe is .text in /usr/lib/libcrypt.a(shr.o) 0xf07b46a8 - 0xf07b47c8 is .data in /usr/lib/libcrypt.a(shr.o) 0xf07b47c8 - 0xf07b47c8 is .bss in /usr/lib/libcrypt.a(shr.o) 0xd04fb180 - 0xd053917e is .text in /usr/lib/libpthreads.a(shr_xpg5.o) 0xf0298000 - 0xf029bfcc is .data in /usr/lib/libpthreads.a(shr_xpg5.o) 0xf029bf64 - 0xf029bfcc is .bss in /usr/lib/libpthreads.a(shr_xpg5.o) 0xd0100900 - 0xd04fa39c is .text in /usr/lib/libc.a(shr.o) 0xf06dafe0 - 0xf07b3838 is .data in /usr/lib/libc.a(shr.o) 0xf0751e94 - 0xf07b3838 is .bss in /usr/lib/libc.a(shr.o) Notice: ... 0xfffffffff0298000 - 0xfffffffff029bfcc is .data ... Those are the bfd section start/end addresses. It't not visible here: ... 0xf0298000 - 0xf029bfcc is .data in /usr/lib/libpthreads.a(shr_xpg5.o) ... ... just because GDB trims that number to 32-bit when printing. GDB then fails to find the memory for libpthreads.a variables in the core, and falls back to reading it directly from the executable (which yields the values as originally initialized in the code). E.g.: (gdb) p &__n_pthreads $2 = (<data variable, no debug info> *) 0xf074fda8 <__n_pthreads> (gdb) p __n_pthreads $1 = -1 That should have returned 2 instead of -1. bfd/ 2014-03-07 Pedro Alves <palves@redhat.com> * rs6000-core.c (rs6000coff_core_p): Cast pointers to bfd_vma through ptr_to_uint instead of through long. |
||
---|---|---|
bfd | ||
binutils | ||
config | ||
cpu | ||
elfcpp | ||
etc | ||
gas | ||
gdb | ||
gold | ||
gprof | ||
include | ||
intl | ||
ld | ||
libdecnumber | ||
libiberty | ||
opcodes | ||
readline | ||
sim | ||
texinfo | ||
.cvsignore | ||
.gitignore | ||
ChangeLog | ||
compile | ||
config-ml.in | ||
config.guess | ||
config.rpath | ||
config.sub | ||
configure | ||
configure.ac | ||
COPYING | ||
COPYING.LIB | ||
COPYING.LIBGLOSS | ||
COPYING.NEWLIB | ||
COPYING3 | ||
COPYING3.LIB | ||
depcomp | ||
djunpack.bat | ||
install-sh | ||
libtool.m4 | ||
ltgcc.m4 | ||
ltmain.sh | ||
ltoptions.m4 | ||
ltsugar.m4 | ||
ltversion.m4 | ||
lt~obsolete.m4 | ||
MAINTAINERS | ||
Makefile.def | ||
Makefile.in | ||
Makefile.tpl | ||
makefile.vms | ||
missing | ||
mkdep | ||
mkinstalldirs | ||
move-if-change | ||
README | ||
README-maintainer-mode | ||
setup.com | ||
src-release | ||
symlink-tree | ||
ylwrap |
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.