This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC] RE: bfd/cpu-powerpc.c, bfd/cpu-h8300.c problems (bfd_lookup_arch)


Hi all,

I bump with same problem on h8300 arches, and for solving this problem one and for all, I see next 2 ways:
Hmm, yes, two occurances of the same problem definitly suggests the current technique isn't maintainable.


1) export from archures.c something like
const bfd_arch_info_type *bfd_get_lookup_arch_head
(enum bfd_architecture arch);

This is not so good, because it assume hacking bfd internals.

2) Or, put gdbarch_printables_names to bfd like:

const char **bfd_machine_printables_names (enum bfd_architecture arch);
There is bfd_arch_list(). A per-architecture one would do what GDB needs. See gdbarch.c:gdbarch_printable_names().


which return all machine names for given architecture.

What do you think?

--

I should note that GDB pulls another swifty.

It runs config.bfd so that it can identify the default bfd vector (${targ_defvec}) (for the byte-order) and default bfd architecture (${targ_archs}) (for the default architecture). Perhaps there should be interfaces for these as well.

Andrew




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]