This is the mail archive of the
gdb@sourceware.cygnus.com
mailing list for the GDB project.
Default architecture according --target=...configury?
- To: binutils@sourceware.cygnus.com
- Subject: Default architecture according --target=...configury?
- From: Andrew Cagney <ac131313@cygnus.com>
- Date: Wed, 18 Aug 1999 19:05:43 +1000
- CC: gdb@sourceware.cygnus.com
- Organization: Cygnus Solutions
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.