diff options
author | Jason Molenda <jmolenda@apple.com> | 1999-10-26 03:43:48 +0000 |
---|---|---|
committer | Jason Molenda <jmolenda@apple.com> | 1999-10-26 03:43:48 +0000 |
commit | e514a9d64262fcceccd85180b20b7adc3c4a5eed (patch) | |
tree | 15fda31e24d9ce88756ba5e4d3c6a54711e8648e /gdb/gdbarch.c | |
parent | 4c1102fd195c4ec6aaff893d5d4df4fc5faa0fc1 (diff) | |
download | gdb-e514a9d64262fcceccd85180b20b7adc3c4a5eed.zip gdb-e514a9d64262fcceccd85180b20b7adc3c4a5eed.tar.gz gdb-e514a9d64262fcceccd85180b20b7adc3c4a5eed.tar.bz2 |
import gdb-1999-10-25 snapshot
Diffstat (limited to 'gdb/gdbarch.c')
-rw-r--r-- | gdb/gdbarch.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c index 54fd444..f7fbea4 100644 --- a/gdb/gdbarch.c +++ b/gdb/gdbarch.c @@ -3161,6 +3161,35 @@ int sizeof_call_dummy_words = sizeof (call_dummy_words); #endif +/* Initialize the current architecture. */ +void +initialize_current_architecture () +{ + if (GDB_MULTI_ARCH) + { + struct gdbarch_init_registration *rego; + const struct bfd_arch_info *chosen = NULL; + for (rego = gdbarch_init_registrary; rego != NULL; rego = rego->next) + { + const struct bfd_arch_info *ap + = bfd_lookup_arch (rego->bfd_architecture, 0); + + /* Choose the first architecture alphabetically. */ + if (chosen == NULL + || strcmp (ap->printable_name, chosen->printable_name) < 0) + chosen = ap; + } + + if (chosen != NULL) + { + struct gdbarch_info info; + memset (&info, 0, sizeof info); + info.bfd_arch_info = chosen; + gdbarch_update (info); + } + } +} + extern void _initialize_gdbarch (void); void _initialize_gdbarch () |