aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbarch.h
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>1998-12-18 03:21:45 +0000
committerAndrew Cagney <cagney@redhat.com>1998-12-18 03:21:45 +0000
commit2e64ee9aae3cc3061f14c4cd1283b67a8c68d4a4 (patch)
treeacb5c04b4f4c52a1a0c370f67b7b144bea58860a /gdb/gdbarch.h
parent492eae092d30d43aa13c1c39fbd167706c685e76 (diff)
downloadgdb-2e64ee9aae3cc3061f14c4cd1283b67a8c68d4a4.zip
gdb-2e64ee9aae3cc3061f14c4cd1283b67a8c68d4a4.tar.gz
gdb-2e64ee9aae3cc3061f14c4cd1283b67a8c68d4a4.tar.bz2
CARP:
Pass gdbarch_info by value to the arch init function. Review doco. Update mips-tdep.c
Diffstat (limited to 'gdb/gdbarch.h')
-rw-r--r--gdb/gdbarch.h19
1 files changed, 14 insertions, 5 deletions
diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h
index a6a18be..566f84a 100644
--- a/gdb/gdbarch.h
+++ b/gdb/gdbarch.h
@@ -100,10 +100,9 @@ extern struct gdbarch_tdep *gdbarch_tdep PARAMS ((struct gdbarch*));
INIT takes two parameters: INFO which contains the information
available to gdbarch about the (possibly new) architecture; ARCHES
which is a list of the previously created ``struct gdbarch'' for
- this architecture. Fields within the structure INFO which have no
- previous value are set to defaults: BFD_ARCHITECTURE -
- bfd_arch_unknown; BFD_ARCH_INFO - NULL; BYTE_ORDER - 0; ABFD -
- NULL;
+ this architecture. When possible, and when no other value was
+ provided, INFO is initialized using either the ABFD or the current
+ GDBARCH.
The INIT function shall return any of: NULL indicating that it
doesn't reconize the selected architecture; an existing ``struct
@@ -120,13 +119,23 @@ struct gdbarch_list
struct gdbarch_info
{
+ /* Default: bfd_arch_unknown. */
enum bfd_architecture bfd_architecture;
+
+ /* Default: NULL */
const struct bfd_arch_info *bfd_arch_info;
+
+ /* Default: 0 */
int byte_order;
+
+ /* Default: NULL */
bfd *abfd;
+
+ /* Default: NULL */
+ struct gdbarch_tdep_info *tdep_info;
};
-typedef struct gdbarch *(gdbarch_init_ftype) PARAMS ((const struct gdbarch_info *info, struct gdbarch_list *arches));
+typedef struct gdbarch *(gdbarch_init_ftype) PARAMS ((struct gdbarch_info info, struct gdbarch_list *arches));
extern void register_gdbarch_init PARAMS ((enum bfd_architecture, gdbarch_init_ftype *));