Default architecture according --target=...configury?
Andrew Cagney
ac131313@cygnus.com
Wed Aug 18 02:06:00 GMT 1999
Hello,
Is it possible to reliably determine the default architecture (struct
bfd_arch_info) as selected by the configuration option --target=....
(even when --enable-targets was specified)?
I suspect not but would like to double check.
My guess at the change required is for archures.c:
static const bfd_arch_info_type * const bfd_archures_list[] =
{
#ifdef SELECT_ARCHITECTURES
SELECT_ARCHITECTURES,
#else
&bfd_a29k_arch,
to be modified to be more like targets.c vs:
const bfd_target * const bfd_target_vector[] = {
#ifdef SELECT_VECS
SELECT_VECS,
#else /* not SELECT_VECS */
#ifdef DEFAULT_VECTOR
&DEFAULT_VECTOR,
#endif
(Add DEFAULT_ARCHITECTURE_VECTOR say).
The function bfd_lookup_arch() could then be modified to detect a user
asking for a default architecture (arch == 0 (bfd_arch_unknown)?).
Comments?
Andrew
PS: Why? I'd like GDB to make a better guess at a default
architecture. bfd_default_arch_struct just isn't very interesting.
More information about the Gdb
mailing list