summaryrefslogtreecommitdiff
path: root/gdb/gdbarch.h
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2001-05-14 16:43:35 +0000
committerAndrew Cagney <cagney@redhat.com>2001-05-14 16:43:35 +0000
commitb732d07d86411216a0913c95f55bfc1d2c59ee90 (patch)
tree28050766cce41c0cdb5c814fe0124c8529d9546d /gdb/gdbarch.h
parent4ed00bba849db255def415a1c8071ddcb8af7b61 (diff)
downloadbinutils-gdb-b732d07d86411216a0913c95f55bfc1d2c59ee90.tar.gz
Fix logic selecting a new architecture. Use the sequence:
o provided by INFO o hard-wired by (gdb) set ... o reversed engineered from INFO.abfd o default to previous architecture
Diffstat (limited to 'gdb/gdbarch.h')
-rw-r--r--gdb/gdbarch.h17
1 files changed, 5 insertions, 12 deletions
diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h
index e2982746794..5b2bcacdfd5 100644
--- a/gdb/gdbarch.h
+++ b/gdb/gdbarch.h
@@ -1607,9 +1607,6 @@ struct gdbarch_list
struct gdbarch_info
{
- /* Use default: bfd_arch_unknown (ZERO). */
- enum bfd_architecture bfd_architecture;
-
/* Use default: NULL (ZERO). */
const struct bfd_arch_info *bfd_arch_info;
@@ -1663,16 +1660,12 @@ extern struct gdbarch *gdbarch_alloc (const struct gdbarch_info *info, struct gd
extern void gdbarch_free (struct gdbarch *);
-/* Helper function. Force an update of the current architecture. Used
- by legacy targets that have added their own target specific
- architecture manipulation commands.
+/* Helper function. Force an update of the current architecture.
- The INFO parameter shall be fully initialized (``memset (&INFO,
- sizeof (info), 0)'' set relevant fields) before gdbarch_update_p()
- is called. gdbarch_update_p() shall initialize any ``default''
- fields using information obtained from the previous architecture or
- INFO.ABFD (if specified) before calling the corresponding
- architectures INIT function.
+ The actual architecture selected is determined by INFO, ``(gdb) set
+ architecture'' et.al., the existing architecture and BFD's default
+ architecture. INFO should be initialized to zero and then selected
+ fields should be updated.
Returns non-zero if the update succeeds */