Multiarch STAB_REG_TO_REGNUM, ECOFF_REG_TO_REGNUM,
[deliverable/binutils-gdb.git] / gdb / gdbarch.sh
index 541250f236acc50972a971fa0b1653566cd4f9a2..216a47f852a7c8ce8af298c03a8cbb91858faab4 100755 (executable)
@@ -371,6 +371,17 @@ v:2:PC_REGNUM:int:pc_regnum::::0:-1
 v:2:FP0_REGNUM:int:fp0_regnum::::0:-1::0
 v:2:NPC_REGNUM:int:npc_regnum::::0:-1::0
 v:2:NNPC_REGNUM:int:nnpc_regnum::::0:-1::0
+# Convert stab register number (from \`r\' declaration) to a gdb REGNUM.
+f:2:STAB_REG_TO_REGNUM:int:stab_reg_to_regnum:int stab_regnr:stab_regnr:::no_op_reg_to_regnum::0
+# Provide a default mapping from a ecoff register number to a gdb REGNUM.
+f:2:ECOFF_REG_TO_REGNUM:int:ecoff_reg_to_regnum:int ecoff_regnr:ecoff_regnr:::no_op_reg_to_regnum::0
+# Provide a default mapping from a DWARF register number to a gdb REGNUM.
+f:2:DWARF_REG_TO_REGNUM:int:dwarf_reg_to_regnum:int dwarf_regnr:dwarf_regnr:::no_op_reg_to_regnum::0
+# Convert from an sdb register number to an internal gdb register number.
+# This should be defined in tm.h, if REGISTER_NAMES is not set up
+# to map one to one onto the sdb register numbers.
+f:2:SDB_REG_TO_REGNUM:int:sdb_reg_to_regnum:int sdb_regnr:sdb_regnr:::no_op_reg_to_regnum::0
+f:2:DWARF2_REG_TO_REGNUM:int:dwarf2_reg_to_regnum:int dwarf2_regnr:dwarf2_regnr:::no_op_reg_to_regnum::0
 f:2:REGISTER_NAME:char *:register_name:int regnr:regnr:::legacy_register_name::0
 v:2:REGISTER_SIZE:int:register_size::::0:-1
 v:2:REGISTER_BYTES:int:register_bytes::::0:-1
@@ -1470,7 +1481,7 @@ done
 cat <<EOF
 
 
-/* Keep a registrary of per-architecture data-pointers required by GDB
+/* Keep a registry of per-architecture data-pointers required by GDB
    modules. */
 
 struct gdbarch_data
@@ -1485,13 +1496,13 @@ struct gdbarch_data_registration
   struct gdbarch_data_registration *next;
 };
 
-struct gdbarch_data_registrary
+struct gdbarch_data_registry
 {
   int nr;
   struct gdbarch_data_registration *registrations;
 };
 
-struct gdbarch_data_registrary gdbarch_data_registrary =
+struct gdbarch_data_registry gdbarch_data_registry =
 {
   0, NULL,
 };
@@ -1500,14 +1511,14 @@ struct gdbarch_data *
 register_gdbarch_data (gdbarch_data_ftype *init)
 {
   struct gdbarch_data_registration **curr;
-  for (curr = &gdbarch_data_registrary.registrations;
+  for (curr = &gdbarch_data_registry.registrations;
        (*curr) != NULL;
        curr = &(*curr)->next);
   (*curr) = XMALLOC (struct gdbarch_data_registration);
   (*curr)->next = NULL;
   (*curr)->init = init;
   (*curr)->data = XMALLOC (struct gdbarch_data);
-  (*curr)->data->index = gdbarch_data_registrary.nr++;
+  (*curr)->data->index = gdbarch_data_registry.nr++;
   return (*curr)->data;
 }
 
@@ -1518,9 +1529,9 @@ static void
 init_gdbarch_data (struct gdbarch *gdbarch)
 {
   struct gdbarch_data_registration *rego;
-  gdbarch->nr_data = gdbarch_data_registrary.nr + 1;
+  gdbarch->nr_data = gdbarch_data_registry.nr + 1;
   gdbarch->data = xmalloc (sizeof (void*) * gdbarch->nr_data);
-  for (rego = gdbarch_data_registrary.registrations;
+  for (rego = gdbarch_data_registry.registrations;
        rego != NULL;
        rego = rego->next)
     {
@@ -1543,7 +1554,7 @@ gdbarch_data (struct gdbarch_data *data)
 
 
 
-/* Keep a registrary of swapped data required by GDB modules. */
+/* Keep a registry of swapped data required by GDB modules. */
 
 struct gdbarch_swap
 {
@@ -1560,13 +1571,13 @@ struct gdbarch_swap_registration
   struct gdbarch_swap_registration *next;
 };
 
-struct gdbarch_swap_registrary
+struct gdbarch_swap_registry
 {
   int nr;
   struct gdbarch_swap_registration *registrations;
 };
 
-struct gdbarch_swap_registrary gdbarch_swap_registrary = 
+struct gdbarch_swap_registry gdbarch_swap_registry = 
 {
   0, NULL,
 };
@@ -1577,7 +1588,7 @@ register_gdbarch_swap (void *data,
                       gdbarch_swap_ftype *init)
 {
   struct gdbarch_swap_registration **rego;
-  for (rego = &gdbarch_swap_registrary.registrations;
+  for (rego = &gdbarch_swap_registry.registrations;
        (*rego) != NULL;
        rego = &(*rego)->next);
   (*rego) = XMALLOC (struct gdbarch_swap_registration);
@@ -1593,7 +1604,7 @@ init_gdbarch_swap (struct gdbarch *gdbarch)
 {
   struct gdbarch_swap_registration *rego;
   struct gdbarch_swap **curr = &gdbarch->swap;
-  for (rego = gdbarch_swap_registrary.registrations;
+  for (rego = gdbarch_swap_registry.registrations;
        rego != NULL;
        rego = rego->next)
     {
@@ -1632,7 +1643,7 @@ swapin_gdbarch_swap (struct gdbarch *gdbarch)
 }
 
 
-/* Keep a registrary of the architectures known by GDB. */
+/* Keep a registry of the architectures known by GDB. */
 
 struct gdbarch_registration
 {
@@ -1643,7 +1654,7 @@ struct gdbarch_registration
   struct gdbarch_registration *next;
 };
 
-static struct gdbarch_registration *gdbarch_registrary = NULL;
+static struct gdbarch_registration *gdbarch_registry = NULL;
 
 static void
 append_name (const char ***buf, int *nr, const char *name)
@@ -1664,7 +1675,7 @@ gdbarch_printable_names (void)
       int nr_arches = 0;
       const char **arches = NULL;
       struct gdbarch_registration *rego;
-      for (rego = gdbarch_registrary;
+      for (rego = gdbarch_registry;
           rego != NULL;
           rego = rego->next)
        {
@@ -1703,7 +1714,7 @@ gdbarch_register (enum bfd_architecture bfd_architecture,
       internal_error ("gdbarch: Attempt to register unknown architecture (%d)", bfd_architecture);
     }
   /* Check that we haven't seen this architecture before */
-  for (curr = &gdbarch_registrary;
+  for (curr = &gdbarch_registry;
        (*curr) != NULL;
        curr = &(*curr)->next)
     {
@@ -1800,7 +1811,7 @@ gdbarch_update_p (struct gdbarch_info info)
   /* A default for abfd? */
 
   /* Find the target that knows about this architecture. */
-  for (rego = gdbarch_registrary;
+  for (rego = gdbarch_registry;
        rego != NULL;
        rego = rego->next)
     if (rego->bfd_architecture == info.bfd_architecture)
This page took 0.025002 seconds and 4 git commands to generate.