This is the mail archive of the gdb@sourceware.cygnus.com mailing list for the GDB project.


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

Default architecture according --target=...configury?


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.

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