mipsel-linux-gdb(5.2): DW_FORM_strp pointing outside of .debug_str section
Hi,
I get the above error from gdb 5.2 when using the <file> command.
...
(gdb) file iprbs
file iprbs
Reading symbols from iprbs...DW_FORM_strp pointing outside of .debug_str section (gdb)
...
My mipsel-linux- toolchain consist of the following packages:
binutils-2.12.1 gcc-3.1 glibc-2.2.5 gdb-5.2
I have no idea what the problem might be.
Any hints (solutions/workaround) are welcome.
Best regards,
Carsten
begin:vcard
n:Lange;Carsten
tel;fax:+49 6104 4234
tel;work:+49 30 6104 4228
x-mozilla-html:FALSE
url:http://www.detewe.de
org:Cordless Technology A/S Berlin
adr:;;Koepenicker Str. 180;10997 Berlin;;;
version:2.1
email;internet:[email protected]
x-mozilla-cpt:;0
fn:Carsten Lange
end:vcard
Quoted 11 lines · Carsten Lange
Hi,
I get the above error from gdb 5.2 when using the <file> command.
...
(gdb) file iprbs
file iprbs
Reading symbols from iprbs...DW_FORM_strp pointing outside of .debug_str section (gdb)
...My mipsel-linux- toolchain consist of the following packages:
Quoted 8 lines
binutils-2.12.1 gcc-3.1 glibc-2.2.5 gdb-5.2I have no idea what the problem might be.
Any hints (solutions/workaround) are welcome.
Can you produce a testcase? These versions of the tools should not show the problem, assuming you rebuilt everything using them.
Signature · 2 lines
Daniel Jacobowitz Carnegie Mellon University MontaVista Software Debian GNU/Linux Developer
Quoted 17 lines · Daniel Jacobowitz
Quoted 16 lines · Carsten Lange
Hi,
I get the above error from gdb 5.2 when using the <file> command.
...
(gdb) file iprbs
file iprbs
Reading symbols from iprbs...DW_FORM_strp pointing outside of .debug_str section (gdb)
...My mipsel-linux- toolchain consist of the following packages:
binutils-2.12.1 gcc-3.1 glibc-2.2.5 gdb-5.2
Quoted 7 lines
Quoted 3 lines
I have no idea what the problem might be.
Any hints (solutions/workaround) are welcome.
Can you produce a testcase? These versions of the tools should not show the problem, assuming you rebuilt everything using them.
Please get the Linux binutils 2.12.90.0.12. You need that for gcc 3.1 on Linux/mips.
H.J.
Hi,
when I use binutils 2.12.90.0.12 gcc 3.1 will not compile anymore.
The error is:
...
mkdir libgcc
if [ -f stmp-dirs ]; then true; else touch stmp-dirs; fi /opt/cross/production/build/gcc/gcc/xgcc -B/opt/cross/production/build/gcc/gcc/ -B/opt/cross/mipsel-linux/mipsel-linux/bin/ -B/opt/cross/mipsel-linux/mipsel-linux/lib/ -isystem/opt/cross/mipsel-linux/mipsel-linux/include -O2 -DIN_GCC -DCROSS_COMPILE -W -Wall -Wwrite-strings
-Wstrict-prototypes -Wmissing-prototypes -isystem ./include -fPIC -g -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc -I. -I. -I/opt/cross/production/src/gcc-3.1/gcc -I/opt/cross/production/src/gcc-3.1/gcc/. -I/opt/cross/production/src/gcc-3.1/gcc/config -I/opt/cross/production/src/gcc-3.1/gcc/../include -DL_muldi3 -c /opt/cross/production/src/gcc-3.1/gcc/libgcc2.c -o libgcc/./_muldi3.o /tmp/ccPEIznf.s: Assembler messages:/tmp/ccPEIznf.s:5: Error: file number 1 already allocated
make[2]: *** [libgcc/./_muldi3.o] Error 1
make[2]: Leaving directory `/opt/cross/production/build/gcc/gcc'
make[1]: *** [libgcc.a] Error 2
make[1]: Leaving directory `/opt/cross/production/build/gcc/gcc'
make: *** [all-gcc] Error 2
...
Building the toolchain works fine with binutils-2.12.1.
I attach 2 files (the build_mips_toolchain and mipsel-linux.source) which I use to build the tools from scratch on my linux i586 box.
Any program build with this toolchain cannot be opened with gdb.
What are the recommended versions of gcc, glibc and gdb?
Many thanks
Carsten
Quoted 23 lines · H. J. Lu
Quoted 21 lines · Daniel Jacobowitz
Quoted 19 lines · Carsten Lange
Hi,
I get the above error from gdb 5.2 when using the <file> command.
...
(gdb) file iprbs
file iprbs
Reading symbols from iprbs...DW_FORM_strp pointing outside of .debug_str section (gdb)
...My mipsel-linux- toolchain consist of the following packages:
binutils-2.12.1 gcc-3.1 glibc-2.2.5 gdb-5.2I have no idea what the problem might be.
Any hints (solutions/workaround) are welcome.
Quoted 8 lines
Quoted 3 lines
Can you produce a testcase? These versions of the tools should not show the problem, assuming you rebuilt everything using them.
Please get the Linux binutils 2.12.90.0.12. You need that for gcc 3.1 on Linux/mips.
H.J.
#!/bin/sh
if [ "x$1" == "x" ]
then
echo "usage: $0 <file_to_get_config_from>"
exit 1
fi
if [ -f ${1}.source ]
then
. ${1}.source
else
echo "usage: $0 <file_to_get_config_from>"
exit 1
fi
execute()
{
echo "+++++++++++++++++++++++++++ $@ "
echo "+++++++++++++++++++++++++++ $@ " >> $LOGFILE 2>&1
$@ >> $LOGFILE 2>&1
if [ ! $? = 0 ]
then
echo "$@ FAILED!"
exit 1
fi
}execute_patch()
{
echo "+ patch $1 -s < $2"
if [ -f $2 ]
then
pkgpatch $1 -s < $2
if [ ! $? = 0 ]
then
echo "patch $1 -s < $2 FAILED!"
exit 1
fi
else
echo "Patchfile $2 not found!"
exit 1
fi
}#cleanup
execute rm -rf $BUILD
execute mkdir -p $BUILD
execute rm -rf $SRC
execute mkdir -p $SRC
#
#
# BINUTILS
if [ ! -f ${PREFIX}/binutils-${BINUTILS_V} ] ; then execute cd $SRC
#execute tar xzf $PKG/binutils-${BINUTILS_V}.tar.gz execute tar xjf $PKG/binutils-${BINUTILS_V}.tar.bz2 execute cd $BUILD
execute mkdir binutils
execute cd binutils
execute $SRC/binutils-${BINUTILS_V}/configure \
--target=${TARGET} \
--prefix=${PREFIX}execute make
execute make install
execute rm -rf $SRC/binutils-${BINUTILS_V}
execute rm -rf $BUILD/binutils
execute touch ${PREFIX}/binutils-${BINUTILS_V}
fi
#
#
# INCLUDE FILES
#execute rm -rf ${PREFIX}/target
#execute mkdir -p ${PREFIX}/target/include
#execute cd /opt/cross/devel/ip_rbs/linux/include
#execute tar cf /tmp/${TARGET}_include .
#execute cd ${PREFIX}/target/usr/include
#execute tar xf /tmp/${TARGET}_include
#execute ln -sf /opt/cross/devel/ip_rbs/linux/include/asm ${PREFIX}/target/include/asm #execute ln -sf /opt/cross/devel/ip_rbs/linux/include/linux ${PREFIX}/target/include/linux
# GCC
if [ ! -f ${PREFIX}/gcc-${GCC_V}_step1 ] ; then
execute cd $SRC
execute tar xzf $PKG/gcc-${GCC_V}.tar.gz
execute cd $BUILD
execute mkdir gcc
execute cd gcc
execute $SRC/gcc-${GCC_V}/configure \
--target=${TARGET} \
--prefix=${PREFIX} \
--enable-languages=c \
--disable-shared \
--with-newlib \
--with-headers=${HEADERS}execute make
execute make install
execute touch ${PREFIX}/gcc-${GCC_V}_step1
fi
#
#
# GLIBC
if [ ! -f ${PREFIX}/glibc-${GLIBC_V} ] ; then execute cd $SRC
execute tar xzf $PKG/glibc-${GLIBC_V}.tar.gz execute cd glibc-${GLIBC_V}
execute tar xzf $PKG/glibc-linuxthreads-${GLIBC_V}.tar.gz execute cd $BUILD
execute mkdir glibc
execute cd glibc
execute $SRC/glibc-${GLIBC_V}/configure \
--build=i686-linux \
--host=${TARGET} \
--enable-add-ons \
--disable-sanity-checks \
--prefix=${PREFIX}/${TARGTET}execute make
execute make install
execute touch ${PREFIX}/glibc-${GLIBC_V}
fi
#
#
# GCC again
if [ ! -f ${PREFIX}/gcc-${GCC_V} ] ; then
execute cd $BUILD
execute cd gcc
execute $SRC/gcc-${GCC_V}/configure \
--target=${TARGET} \
--prefix=${PREFIX} \
--enable-languages=c,c++ \
--with-libs=${PREFIX}/${TARGTET}/lib \
--with-headers=${HEADERS}execute make
execute make install
execute touch ${PREFIX}/gcc-${GCC_V}
fi
#
#
# GDB
if [ ! -f ${PREFIX}/gdb-${GDB_V} ] ; then
execute cd $SRC
execute execute tar xzf $PKG/gdb-${GDB_V}.tar.gz
execute cd $BUILD
execute mkdir -p gdb
execute cd gdb
execute $SRC/gdb-${GDB_V}/configure \
--target=${TARGET} \
--prefix=${PREFIX}execute make
execute make install
execute touch ${PREFIX}/gdb-${GDB_V}
fi
#
#
# GDB SERVER
if [ ! -f ${PREFIX}/gdbserver-${GDB_V} ] ; then execute mkdir -p $BUILD/gdbserver
execute cd $BUILD
execute cd gdbserver
execute chmod u+x $SRC/gdb-${GDB_V}/gdb/gdbserver/configure export CC=mipsel-linux-gcc
execute $SRC/gdb-${GDB_V}/gdb/gdbserver/configure \
--target=${TARGET} \
--prefix=${PREFIX}execute make
execute make install
execute touch ${PREFIX}/gdbserver-${GDB_V}
fi
execute echo "############ DONE ############"
# TARGET
TARGET=mipsel-linux
HEADERS=/opt/cross/devel/ip_rbs/linux/include
# VERSIONS
#BINUTILS_V="2.12.90.0.12"
BINUTILS_V="2.12.1"
GCC_V="3.1"
GLIBC_V="2.2.5"
INSIGHT_V="5.1.1"
GDB_V="5.2"
DDD_V="3.3.1"
# CONFIGURATION
CROSSROOT=/opt/cross
BASEDIR=$CROSSROOT/production
PREFIX=$CROSSROOT/${TARGET}
BUILD=$BASEDIR/build
SRC=$BASEDIR/src
PKG=$BASEDIR/pkg
LOGDIR=$BASEDIR/log LOGFILE=$LOGDIR/${0}_date +%d%m%Y_date +%H%M.log
# PATH
PATH="$PREFIX/bin:$HOSTPREFIX/bin:$PATH"
export PATH
echo "LOGFILE is ${LOGFILE}"
begin:vcard
n:Lange;Carsten
tel;fax:+49 6104 4234
tel;work:+49 30 6104 4228
x-mozilla-html:FALSE
url:http://www.detewe.de
org:Cordless Technology A/S Berlin
adr:;;Koepenicker Str. 180;10997 Berlin;;;
version:2.1
email;internet:[email protected]
x-mozilla-cpt:;0
fn:Carsten Lange
end:vcard
Quoted 3 lines · Carsten Lange
Hi,
when I use binutils 2.12.90.0.12 gcc 3.1 will not compile anymore.
Yes. At this time you'll need to use a GCC on the 3.1 CVS branch to get around this problem.
Signature · 2 lines
Daniel Jacobowitz Carnegie Mellon University MontaVista Software Debian GNU/Linux Developer
Quoted 20 lines · H. J. Lu
Quoted 19 lines · Daniel Jacobowitz
Quoted 18 lines · Carsten Lange
Hi,
I get the above error from gdb 5.2 when using the <file> command.
...
(gdb) file iprbs
file iprbs
Reading symbols from iprbs...DW_FORM_strp pointing outside of .debug_str section (gdb)
...My mipsel-linux- toolchain consist of the following packages:
binutils-2.12.1 gcc-3.1 glibc-2.2.5 gdb-5.2I have no idea what the problem might be.
Quoted 8 lines
Quoted 5 lines
Quoted 1 line
Any hints (solutions/workaround) are welcome.
Can you produce a testcase? These versions of the tools should not show the problem, assuming you rebuilt everything using them.
Please get the Linux binutils 2.12.90.0.12. You need that for gcc 3.1 on Linux/mips.
Would you mind explaining what binutils patch affected the DW_FORM_strp problems? Was it a SEC_MERGE bug that I recall being recently discussed.
Signature · 2 lines
Daniel Jacobowitz Carnegie Mellon University MontaVista Software Debian GNU/Linux Developer
Quoted 7 lines · Daniel Jacobowitz
Quoted 3 lines
Please get the Linux binutils 2.12.90.0.12. You need that for gcc 3.1 on Linux/mips.
Would you mind explaining what binutils patch affected the
DW_FORM_strpproblems? Was it aSEC_MERGEbug that I recall being recently discussed.
Yes:
http://sources.redhat.com/ml/binutils/2002-06/msg00111.html
Please test it as much as you can. I want to make sure it is 100% correct. Also as Daniel said, you need gcc 3.1 branch from CVS to get gdb working with dwarf.
H.J.
Quoted 4 lines · Carsten Lange
Hi,
when I use binutils 2.12.90.0.12 gcc 3.1 will not compile anymore.
You need gcc 3.1 from CVS. I may be able to provide a gcc 3.1.1 rpm for RedHat 7.3/mips with the java support. Is anyone interested?
H.J.
Where and how do I get gcc3.1 from CVS?
Do you recommend getting glibc and gdb from CVS too? If yes what versions and where from?
Many thangs
carsten
Quoted 11 lines · H. J. Lu
Quoted 4 lines · Carsten Lange
Hi,
when I use binutils 2.12.90.0.12 gcc 3.1 will not compile anymore.
You need gcc 3.1 from CVS. I may be able to provide a gcc 3.1.1 rpm for RedHat 7.3/mips with the java support. Is anyone interested?
H.J.
begin:vcard
n:Lange;Carsten
tel;fax:+49 6104 4234
tel;work:+49 30 6104 4228
x-mozilla-html:FALSE
url:http://www.detewe.de
org:Cordless Technology A/S Berlin
adr:;;Koepenicker Str. 180;10997 Berlin;;;
version:2.1
email;internet:[email protected]
x-mozilla-cpt:;0
fn:Carsten Lange
end:vcard
Quoted 4 lines · Carsten Lange
Where and how do I get gcc3.1 from CVS?
Do you recommend getting glibc and gdb from CVS too? If yes what versions and where from?
My RedHat 7.3/mips port has quite current glibc and gdb. I am testing gcc 3.1.1 now.
H.J.