From: Hui Zhu <teawater@gmail.com>
To: Jan Kratochvil <jan.kratochvil@redhat.com>,
Daniel Jacobowitz <dan@codesourcery.com>
Cc: gdb@sourceware.org
Subject: Re: --enable-targets=all cannot work with bfd?
Date: Tue, 12 Jan 2010 08:38:00 -0000 [thread overview]
Message-ID: <daef60381001120037g59da55dei942214c62fdf9c60@mail.gmail.com> (raw)
In-Reply-To: <daef60381001112329s5d7b182elecdfbc85b7bf4ccd@mail.gmail.com>
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
>>> >
>>
>
prev parent reply other threads:[~2010-01-12 8:38 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-11 3:25 Hui Zhu
2010-01-11 3:44 ` Daniel Jacobowitz
2010-01-11 3:59 ` Hui Zhu
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 [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=daef60381001120037g59da55dei942214c62fdf9c60@mail.gmail.com \
--to=teawater@gmail.com \
--cc=dan@codesourcery.com \
--cc=gdb@sourceware.org \
--cc=jan.kratochvil@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox