From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18667 invoked by alias); 12 Jan 2010 08:38:23 -0000 Received: (qmail 18644 invoked by uid 22791); 12 Jan 2010 08:38:22 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail-pw0-f49.google.com (HELO mail-pw0-f49.google.com) (209.85.160.49) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 12 Jan 2010 08:38:18 +0000 Received: by pwj12 with SMTP id 12so2233843pwj.8 for ; Tue, 12 Jan 2010 00:38:17 -0800 (PST) MIME-Version: 1.0 Received: by 10.142.1.34 with SMTP id 34mr1732570wfa.26.1263285497126; Tue, 12 Jan 2010 00:38:17 -0800 (PST) In-Reply-To: References: <20100111034437.GA28673@caradoc.them.org> <20100111092907.GA27357@host0.dyn.jankratochvil.net> From: Hui Zhu Date: Tue, 12 Jan 2010 08:38:00 -0000 Message-ID: Subject: Re: --enable-targets=all cannot work with bfd? To: Jan Kratochvil , Daniel Jacobowitz Cc: gdb@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2010-01/txt/msg00122.txt.bz2 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[] =3D { #ifdef ASSOCIATED_VECS ASSOCIATED_VECS, #endif NULL }; I think we can extend it. static const bfd_target *_bfd_associated_vector[] =3D { #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 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. =A0I try set arch and set osabi, > but still cannot handle it. =A0Does gdb have some way to handle it? > > Best regards, > Hui > > On Mon, Jan 11, 2010 at 17:29, Jan Kratochvil = 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=3Dall >>> --enable-64-bits-bfd >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 ^ 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 = 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 >>> > >> >