Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* --enable-targets=all cannot work with bfd?
@ 2010-01-11  3:25 Hui Zhu
  2010-01-11  3:44 ` Daniel Jacobowitz
  0 siblings, 1 reply; 7+ messages in thread
From: Hui Zhu @ 2010-01-11  3:25 UTC (permalink / raw)
  To: gdb

Hello guys,

I try use --enable-targets=all when I config the gdb.  But looks bfd
of gdb cannot read this file.
For example:
head config.log
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by configure, which was
generated by GNU Autoconf 2.64.  Invocation command line was

 $ ../src/configure --disable-sid --disable-rda --disable-binutils
--disable-gas --disable-ld --disable-gprof --enable-targets=all
--enable-64-bits-bfd

## --------- ##
## Platform. ##
teawater@pek-hzhu:~/gdb/cvs/bgdball$ file vmlinux
vmlinux: ELF 64-bit LSB executable, x86-64, version 1 (SYSV),
statically linked, not stripped
teawater@pek-hzhu:~/gdb/cvs/bgdball$ gdb/gdb vmlinux
This GDB was configured as "i686-pc-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
"/home/teawater/gdb/cvs/bgdball/vmlinux": not in executable format:
File format not recognized
(gdb) quit

teawater@pek-hzhu:~/gdb/cvs/bgdball$ file arm
arm: ELF 32-bit LSB executable, ARM, version 1 (SYSV), statically
linked, not stripped
teawater@pek-hzhu:~/gdb/cvs/bgdball$ gdb/gdb arm
GNU gdb (GDB) 7.0.50.20100105-cvs
Copyright (C) 2010 Free Software Foundation, Inc.

For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
"/home/teawater/gdb/cvs/bgdball/arm": not in executable format: File
format is ambiguous


head bfd/config.log
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by configure, which was
generated by GNU Autoconf 2.64.  Invocation command line was

 $ /home/teawater/gdb/cvs/src/bfd/configure
--cache-file=./config.cache --with-system-zlib --disable-sid
--disable-rda --disable-binutils --disable-gas --disable-ld
--disable-gprof --enable-targets=all --enable-64-bits-bfd
--program-transform-name=s,y,y, --disable-option-checking
--build=i686-pc-linux-gnu --host=i686-pc-linux-gnu
--target=i686-pc-linux-gnu --srcdir=../../src/bfd
build_alias=i686-pc-linux-gnu host_alias=i686-pc-linux-gnu
target_alias=i686-pc-linux-gnu CC=gcc CFLAGS=-g -O2 LDFLAGS=
--no-create --no-recursion

What I miss?

Thanks,
Hui


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: --enable-targets=all cannot work with bfd?
  2010-01-11  3:25 --enable-targets=all cannot work with bfd? Hui Zhu
@ 2010-01-11  3:44 ` Daniel Jacobowitz
  2010-01-11  3:59   ` Hui Zhu
  2010-01-11  3:59   ` Hui Zhu
  0 siblings, 2 replies; 7+ messages in thread
From: Daniel Jacobowitz @ 2010-01-11  3:44 UTC (permalink / raw)
  To: Hui Zhu; +Cc: gdb

On Mon, Jan 11, 2010 at 11:25:05AM +0800, Hui Zhu wrote:
> What I miss?

Try --enable-64-bit-bfd.

-- 
Daniel Jacobowitz
CodeSourcery


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: --enable-targets=all cannot work with bfd?
  2010-01-11  3:44 ` Daniel Jacobowitz
@ 2010-01-11  3:59   ` Hui Zhu
  2010-01-11  9:29     ` Jan Kratochvil
  2010-01-11  3:59   ` Hui Zhu
  1 sibling, 1 reply; 7+ messages in thread
From: Hui Zhu @ 2010-01-11  3:59 UTC (permalink / raw)
  To: Hui Zhu, gdb

$ ../src/configure --disable-sid --disable-rda --disable-binutils
--disable-gas --disable-ld --disable-gprof --enable-targets=all
--enable-64-bits-bfd

On Mon, Jan 11, 2010 at 11:44, Daniel Jacobowitz <dan@codesourcery.com> wrote:
> On Mon, Jan 11, 2010 at 11:25:05AM +0800, Hui Zhu wrote:
>> What I miss?
>
> Try --enable-64-bit-bfd.
>
> --
> Daniel Jacobowitz
> CodeSourcery
>


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: --enable-targets=all cannot work with bfd?
  2010-01-11  3:44 ` Daniel Jacobowitz
  2010-01-11  3:59   ` Hui Zhu
@ 2010-01-11  3:59   ` Hui Zhu
  1 sibling, 0 replies; 7+ messages in thread
From: Hui Zhu @ 2010-01-11  3:59 UTC (permalink / raw)
  To: Hui Zhu, gdb

And even if 32 bits arm, it didn't work too.

On Mon, Jan 11, 2010 at 11:44, Daniel Jacobowitz <dan@codesourcery.com> wrote:
> On Mon, Jan 11, 2010 at 11:25:05AM +0800, Hui Zhu wrote:
>> What I miss?
>
> Try --enable-64-bit-bfd.
>
> --
> Daniel Jacobowitz
> CodeSourcery
>


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: --enable-targets=all cannot work with bfd?
  2010-01-11  3:59   ` Hui Zhu
@ 2010-01-11  9:29     ` Jan Kratochvil
  2010-01-12  7:29       ` Hui Zhu
  0 siblings, 1 reply; 7+ messages in thread
From: Jan Kratochvil @ 2010-01-11  9:29 UTC (permalink / raw)
  To: Hui Zhu; +Cc: gdb

On Mon, 11 Jan 2010 04:58:46 +0100, Hui Zhu wrote:
> $ ../src/configure --disable-sid --disable-rda --disable-binutils
> --disable-gas --disable-ld --disable-gprof --enable-targets=all
> --enable-64-bits-bfd
                 ^ typo bits->bit

amd64:
not in executable format: File format not recognized
arm:
not in executable format: File format is ambiguous

For arm it is something more specific.


Regards,
Jan


> On Mon, Jan 11, 2010 at 11:44, Daniel Jacobowitz <dan@codesourcery.com> wrote:
> > On Mon, Jan 11, 2010 at 11:25:05AM +0800, Hui Zhu wrote:
> >> What I miss?
> >
> > Try --enable-64-bit-bfd.
> >
> > --
> > Daniel Jacobowitz
> > CodeSourcery
> >


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: --enable-targets=all cannot work with bfd?
  2010-01-11  9:29     ` Jan Kratochvil
@ 2010-01-12  7:29       ` Hui Zhu
  2010-01-12  8:38         ` Hui Zhu
  0 siblings, 1 reply; 7+ messages in thread
From: Hui Zhu @ 2010-01-12  7:29 UTC (permalink / raw)
  To: Jan Kratochvil, Daniel Jacobowitz; +Cc: gdb

Thanks Jan and Daniel,

For the amd64, I am OK now.

For the arm and mips, I found that because it get more than one
bfd_target in bfd_check_format_matches.  I try set arch and set osabi,
but still cannot handle it.  Does gdb have some way to handle it?

Best regards,
Hui

On Mon, Jan 11, 2010 at 17:29, Jan Kratochvil <jan.kratochvil@redhat.com> wrote:
> On Mon, 11 Jan 2010 04:58:46 +0100, Hui Zhu wrote:
>> $ ../src/configure --disable-sid --disable-rda --disable-binutils
>> --disable-gas --disable-ld --disable-gprof --enable-targets=all
>> --enable-64-bits-bfd
>                 ^ typo bits->bit
>
> amd64:
> not in executable format: File format not recognized
> arm:
> not in executable format: File format is ambiguous
>
> For arm it is something more specific.
>
>
> Regards,
> Jan
>
>
>> On Mon, Jan 11, 2010 at 11:44, Daniel Jacobowitz <dan@codesourcery.com> wrote:
>> > On Mon, Jan 11, 2010 at 11:25:05AM +0800, Hui Zhu wrote:
>> >> What I miss?
>> >
>> > Try --enable-64-bit-bfd.
>> >
>> > --
>> > Daniel Jacobowitz
>> > CodeSourcery
>> >
>


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: --enable-targets=all cannot work with bfd?
  2010-01-12  7:29       ` Hui Zhu
@ 2010-01-12  8:38         ` Hui Zhu
  0 siblings, 0 replies; 7+ messages in thread
From: Hui Zhu @ 2010-01-12  8:38 UTC (permalink / raw)
  To: Jan Kratochvil, Daniel Jacobowitz; +Cc: gdb

If gdb still doesn't have some way to handle it, I have a idea on it.

In bfd_check_format_matches, if match_count > 1, mean that there are
more than one bfd_target fit with the file, it will check
"bfd_associated_vector".
static const bfd_target *_bfd_associated_vector[] = {
#ifdef ASSOCIATED_VECS
	ASSOCIATED_VECS,
#endif
	NULL
};
I think we can extend it.
static const bfd_target *_bfd_associated_vector[] = {
#ifdef DEFAULT_VECTOR
	&DEFAULT_VECTOR,
#endif
#ifdef ASSOCIATED_VECS
	ASSOCIATED_VECS,
#endif
	NULL
};

Add a new function set_bfd_associated_vector in there can set the
first member of _bfd_associated_vector.
And add a new cmd in gdb called "set bfd" to set it.
Then, user can set it when he need. Of course, we can post some hint
when he get "File format is ambiguous".

I did a small try on it, it worked OK.

What do you think about it?


Thanks,
Hui

On Tue, Jan 12, 2010 at 15:29, Hui Zhu <teawater@gmail.com> wrote:
> Thanks Jan and Daniel,
>
> For the amd64, I am OK now.
>
> For the arm and mips, I found that because it get more than one
> bfd_target in bfd_check_format_matches.  I try set arch and set osabi,
> but still cannot handle it.  Does gdb have some way to handle it?
>
> Best regards,
> Hui
>
> On Mon, Jan 11, 2010 at 17:29, Jan Kratochvil <jan.kratochvil@redhat.com> wrote:
>> On Mon, 11 Jan 2010 04:58:46 +0100, Hui Zhu wrote:
>>> $ ../src/configure --disable-sid --disable-rda --disable-binutils
>>> --disable-gas --disable-ld --disable-gprof --enable-targets=all
>>> --enable-64-bits-bfd
>>                 ^ typo bits->bit
>>
>> amd64:
>> not in executable format: File format not recognized
>> arm:
>> not in executable format: File format is ambiguous
>>
>> For arm it is something more specific.
>>
>>
>> Regards,
>> Jan
>>
>>
>>> On Mon, Jan 11, 2010 at 11:44, Daniel Jacobowitz <dan@codesourcery.com> wrote:
>>> > On Mon, Jan 11, 2010 at 11:25:05AM +0800, Hui Zhu wrote:
>>> >> What I miss?
>>> >
>>> > Try --enable-64-bit-bfd.
>>> >
>>> > --
>>> > Daniel Jacobowitz
>>> > CodeSourcery
>>> >
>>
>


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-01-12  8:38 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-11  3:25 --enable-targets=all cannot work with bfd? Hui Zhu
2010-01-11  3:44 ` Daniel Jacobowitz
2010-01-11  3:59   ` Hui Zhu
2010-01-11  9:29     ` Jan Kratochvil
2010-01-12  7:29       ` Hui Zhu
2010-01-12  8:38         ` Hui Zhu
2010-01-11  3:59   ` Hui Zhu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox