This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Does gdb 5.2 support gcc 3.1.1 on Linux/mips?
- From: "H . J . Lu" <hjl at lucon dot org>
- To: GDB <gdb at sources dot redhat dot com>, gcc at gcc dot gnu dot org
- Cc: binutils at sources dot redhat dot com
- Date: Sun, 2 Jun 2002 23:03:31 -0700
- Subject: Re: Does gdb 5.2 support gcc 3.1.1 on Linux/mips?
- References: <20020602143627.A10506@lucon.org> <20020603010003.GA16363@branoic.them.org> <20020602194326.A14976@lucon.org> <20020603050101.GA18906@branoic.them.org> <20020602220534.B17122@lucon.org> <20020603050906.GA19164@branoic.them.org> <20020602224240.A17723@lucon.org>
On Sun, Jun 02, 2002 at 10:42:40PM -0700, H . J . Lu wrote:
> On Mon, Jun 03, 2002 at 01:09:06AM -0400, Daniel Jacobowitz wrote:
> > > >
> > > > Then could you check if the produced binary is incorrect? That error
> > > > usually indicates linker error.
> > >
> > > Did you imply gdb 5.2 worked fine for you with gcc 3.1.1 running on
> > > your mips platform? My Linux/mipsel gcc 3.1.1 seems to work ok
> > > otherwise:
> > >
> > > http://gcc.gnu.org/ml/gcc-testresults/2002-06/msg00069.html
> >
> > I haven't tried it in a while, but 3.1 snapshots worked fine with 5.2
> > release, yes.
> >
>
> I doubt it is a linker bug. I have a simple C file. I cross compiled
> it to Linux/mipsel on Linux/x86 with gcc 3.1.1. I got
>
> # gcc -g ~/tmp/s.c -o ~/tmp/s
> # gcc -g ~/tmp/s.c -o ~/tmp/s.o -c
> # readelf -dw ~/tmp/s.o > /dev/null
> unsupported or unknown DW_CFA_17
> # readelf -dw ~/tmp/s.o > /dev/null
> unsupported or unknown DW_CFA_17
> # gdb ~/tmp/s
> ...
> DW_FORM_strp pointing outside of .debug_str section
>
> It looks like a gcc/gas bug to me. Can you tell me what you get with
> your gdb and readelf on the enclosed s.o and s as well as what you get
> with s and s.o compiled from s.c with your gcc 3.1 mips compiler?
DW_CFA_17 is DW_CFA_offset_extended_sf, which was added to gcc on
2002-01-30. I have verifed that gcc 3.1.1 does generate it for mips.
It looks like we have at least 2 bugs. First, readelf doesn't handle
DW_CFA_offset_extended_sf and maybe other DAWRF debug info generated
by gcc 3.1.1. Secondly, gdb 5.2 doesn't work with gcc 3.1.1 for
Linux/mips.
H.J.