2003-08-04 Andrew Cagney <cagney@redhat.com>
authorAndrew Cagney <cagney@redhat.com>
Mon, 4 Aug 2003 22:24:44 +0000 (22:24 +0000)
committerAndrew Cagney <cagney@redhat.com>
Mon, 4 Aug 2003 22:24:44 +0000 (22:24 +0000)
* gdbarch.sh (gdbarch_data_free_ftype): Delete declaration.
(register_gdbarch_data): Delete "free" parameter.  Update
comments.
* gdbarch.h, gdbarch.c: Re-generate.
* reggroups.c (_initialize_reggroup): Update.
* gnu-v3-abi.c (init_gnuv3_ops): Update.
* frame-base.c (_initialize_frame_base): Update.
* frame-unwind.c (_initialize_frame_unwind): Update.
* user-regs.c (_initialize_user_regs): Update.
* remote.c (_initialize_remote): Update.
* regcache.c (_initialize_regcache): Update.

gdb/ChangeLog
gdb/frame-base.c
gdb/frame-unwind.c
gdb/gdbarch.c
gdb/gdbarch.h
gdb/gdbarch.sh
gdb/gnu-v3-abi.c
gdb/regcache.c
gdb/reggroups.c
gdb/remote.c
gdb/user-regs.c

index 45c139799cae6f9cfda03940a022067998255990..ed376c0257a019f8afdeb4044b183da2b63d1cb8 100644 (file)
@@ -1,5 +1,17 @@
 2003-08-04  Andrew Cagney  <cagney@redhat.com>
 
+       * gdbarch.sh (gdbarch_data_free_ftype): Delete declaration.
+       (register_gdbarch_data): Delete "free" parameter.  Update
+       comments.
+       * gdbarch.h, gdbarch.c: Re-generate.
+       * reggroups.c (_initialize_reggroup): Update.
+       * gnu-v3-abi.c (init_gnuv3_ops): Update.
+       * frame-base.c (_initialize_frame_base): Update.
+       * frame-unwind.c (_initialize_frame_unwind): Update.
+       * user-regs.c (_initialize_user_regs): Update.
+       * remote.c (_initialize_remote): Update.
+       * regcache.c (_initialize_regcache): Update.
+
        * regcache.c (xfree_regcache_descr): Delete function.
        (_initialize_regcache): Update call to register_gdbarch_data.
        (init_regcache_descr, init_legacy_regcache_descr): Use
index ad2d7b895c0b00cfb901a7cf5edc25722b415a7a..66a0106aa0b83b1cbf149cccb868429a4c1be122 100644 (file)
@@ -146,5 +146,5 @@ extern initialize_file_ftype _initialize_frame_base; /* -Wmissing-prototypes */
 void
 _initialize_frame_base (void)
 {
-  frame_base_data = register_gdbarch_data (frame_base_init, NULL);
+  frame_base_data = register_gdbarch_data (frame_base_init);
 }
index dda92b03c77243cc27c5e589c286479ea46e7acb..fc5a82122e4a9d0dd6a1a2354f897dd5e7c9707b 100644 (file)
@@ -95,5 +95,5 @@ extern initialize_file_ftype _initialize_frame_unwind; /* -Wmissing-prototypes *
 void
 _initialize_frame_unwind (void)
 {
-  frame_unwind_data = register_gdbarch_data (frame_unwind_init, NULL);
+  frame_unwind_data = register_gdbarch_data (frame_unwind_init);
 }
index 9d34aa5a761bac7ae202066da038d057a79ac467..b9aea09b8478aa27618e0abbf296158c77f5892c 100644 (file)
@@ -5646,8 +5646,7 @@ struct gdbarch_data_registry gdbarch_data_registry =
 };
 
 struct gdbarch_data *
-register_gdbarch_data (gdbarch_data_init_ftype *init,
-                       gdbarch_data_free_ftype *free)
+register_gdbarch_data (gdbarch_data_init_ftype *init)
 {
   struct gdbarch_data_registration **curr;
   /* Append the new registraration.  */
index 7753022a64c0ce0c10c8144729c0955c357275e8..3850c4b045516f4d85ba3b19b99142cd89cb4ffd 100644 (file)
@@ -3257,7 +3257,11 @@ extern int gdbarch_update_p (struct gdbarch_info info);
 
    The per-architecture data-pointer is either initialized explicitly
    (set_gdbarch_data()) or implicitly (by INIT() via a call to
-   gdbarch_data()).  FREE() is ignored.
+   gdbarch_data()).
+
+   Memory for the per-architecture data shall be allocated using
+   gdbarch_obstack_zalloc.  That memory will be deleted when the
+   corresponding architecture object is deleted.
 
    When a previously created architecture is re-selected, the
    per-architecture data-pointer for that previous architecture is
@@ -3269,10 +3273,7 @@ extern int gdbarch_update_p (struct gdbarch_info info);
 struct gdbarch_data;
 
 typedef void *(gdbarch_data_init_ftype) (struct gdbarch *gdbarch);
-typedef void (gdbarch_data_free_ftype) (struct gdbarch *gdbarch,
-                                       void *pointer);
-extern struct gdbarch_data *register_gdbarch_data (gdbarch_data_init_ftype *init,
-                                                  gdbarch_data_free_ftype *free);
+extern struct gdbarch_data *register_gdbarch_data (gdbarch_data_init_ftype *init);
 extern void set_gdbarch_data (struct gdbarch *gdbarch,
                              struct gdbarch_data *data,
                              void *pointer);
index fc72ce2980cd5d86418b9dcaf053ac65d0b152a6..9a633482a087e2f4b46c69226763a7cc803ab14b 100755 (executable)
@@ -1175,7 +1175,11 @@ extern int gdbarch_update_p (struct gdbarch_info info);
 
    The per-architecture data-pointer is either initialized explicitly
    (set_gdbarch_data()) or implicitly (by INIT() via a call to
-   gdbarch_data()).  FREE() is ignored.
+   gdbarch_data()).
+
+   Memory for the per-architecture data shall be allocated using
+   gdbarch_obstack_zalloc.  That memory will be deleted when the
+   corresponding architecture object is deleted.
 
    When a previously created architecture is re-selected, the
    per-architecture data-pointer for that previous architecture is
@@ -1187,10 +1191,7 @@ extern int gdbarch_update_p (struct gdbarch_info info);
 struct gdbarch_data;
 
 typedef void *(gdbarch_data_init_ftype) (struct gdbarch *gdbarch);
-typedef void (gdbarch_data_free_ftype) (struct gdbarch *gdbarch,
-                                       void *pointer);
-extern struct gdbarch_data *register_gdbarch_data (gdbarch_data_init_ftype *init,
-                                                  gdbarch_data_free_ftype *free);
+extern struct gdbarch_data *register_gdbarch_data (gdbarch_data_init_ftype *init);
 extern void set_gdbarch_data (struct gdbarch *gdbarch,
                              struct gdbarch_data *data,
                              void *pointer);
@@ -1890,8 +1891,7 @@ struct gdbarch_data_registry gdbarch_data_registry =
 };
 
 struct gdbarch_data *
-register_gdbarch_data (gdbarch_data_init_ftype *init,
-                       gdbarch_data_free_ftype *free)
+register_gdbarch_data (gdbarch_data_init_ftype *init)
 {
   struct gdbarch_data_registration **curr;
   /* Append the new registraration.  */
index bbfd118520119b5fd9ff3e5d36a4853cd8b6efdb..d9947f9f87da70c837f5b4a7b40fdb1ef59f4dbe 100644 (file)
@@ -433,7 +433,7 @@ gnuv3_baseclass_offset (struct type *type, int index, char *valaddr,
 static void
 init_gnuv3_ops (void)
 {
-  vtable_type_gdbarch_data = register_gdbarch_data (build_gdb_vtable_type, 0);
+  vtable_type_gdbarch_data = register_gdbarch_data (build_gdb_vtable_type);
 
   gnu_v3_abi_ops.shortname = "gnu-v3";
   gnu_v3_abi_ops.longname = "GNU G++ Version 3 ABI";
index 74b98d932e5ffc79873a78d9c78c7b99ceaceaab..5c7f0ca9169a516a64a3f8add3ad7952d2355e4e 100644 (file)
@@ -1662,7 +1662,7 @@ extern initialize_file_ftype _initialize_regcache; /* -Wmissing-prototype */
 void
 _initialize_regcache (void)
 {
-  regcache_descr_handle = register_gdbarch_data (init_regcache_descr, NULL);
+  regcache_descr_handle = register_gdbarch_data (init_regcache_descr);
   REGISTER_GDBARCH_SWAP (current_regcache);
   register_gdbarch_swap (&deprecated_registers, sizeof (deprecated_registers), NULL);
   register_gdbarch_swap (&deprecated_register_valid, sizeof (deprecated_register_valid), NULL);
index a4e940ef2cceef46a59383e9601c7d5fcb090685..791ec0abd521f426295bcbd83bb1509736b519db 100644 (file)
@@ -259,7 +259,7 @@ extern initialize_file_ftype _initialize_reggroup; /* -Wmissing-prototypes */
 void
 _initialize_reggroup (void)
 {
-  reggroups_data = register_gdbarch_data (reggroups_init, NULL);
+  reggroups_data = register_gdbarch_data (reggroups_init);
 
   /* The pre-defined list of groups.  */
   add_group (&default_groups, general_reggroup, XMALLOC (struct reggroup_el));
index 0da3fecff8a3b5a4d82b3fd480575f09e2ede682..73906c7c719f0b6a1c7a351b2dbe0efb87c4e441 100644 (file)
@@ -6056,7 +6056,7 @@ _initialize_remote (void)
   struct cmd_list_element *tmpcmd;
 
   /* architecture specific data */
-  remote_gdbarch_data_handle = register_gdbarch_data (init_remote_state, NULL);
+  remote_gdbarch_data_handle = register_gdbarch_data (init_remote_state);
 
   /* Old tacky stuff.  NOTE: This comes after the remote protocol so
      that the remote protocol has been initialized.  */
index 8b4600d43386b5b1658bbde174ad2fe251158965..470a518796a866ff515acd9d33fb9f0e2794f1e1 100644 (file)
@@ -201,5 +201,5 @@ extern initialize_file_ftype _initialize_user_regs; /* -Wmissing-prototypes */
 void
 _initialize_user_regs (void)
 {
-  user_regs_data = register_gdbarch_data (user_regs_init, NULL);
+  user_regs_data = register_gdbarch_data (user_regs_init);
 }
This page took 0.044281 seconds and 4 git commands to generate.