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.
This commit is contained in:
Andrew Cagney 2003-08-04 22:24:44 +00:00
parent 116f06eabf
commit fcc1c85c67
11 changed files with 33 additions and 21 deletions

View File

@ -1,5 +1,17 @@
2003-08-04 Andrew Cagney <cagney@redhat.com> 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. * regcache.c (xfree_regcache_descr): Delete function.
(_initialize_regcache): Update call to register_gdbarch_data. (_initialize_regcache): Update call to register_gdbarch_data.
(init_regcache_descr, init_legacy_regcache_descr): Use (init_regcache_descr, init_legacy_regcache_descr): Use

View File

@ -146,5 +146,5 @@ extern initialize_file_ftype _initialize_frame_base; /* -Wmissing-prototypes */
void void
_initialize_frame_base (void) _initialize_frame_base (void)
{ {
frame_base_data = register_gdbarch_data (frame_base_init, NULL); frame_base_data = register_gdbarch_data (frame_base_init);
} }

View File

@ -95,5 +95,5 @@ extern initialize_file_ftype _initialize_frame_unwind; /* -Wmissing-prototypes *
void void
_initialize_frame_unwind (void) _initialize_frame_unwind (void)
{ {
frame_unwind_data = register_gdbarch_data (frame_unwind_init, NULL); frame_unwind_data = register_gdbarch_data (frame_unwind_init);
} }

View File

@ -5646,8 +5646,7 @@ struct gdbarch_data_registry gdbarch_data_registry =
}; };
struct gdbarch_data * struct gdbarch_data *
register_gdbarch_data (gdbarch_data_init_ftype *init, register_gdbarch_data (gdbarch_data_init_ftype *init)
gdbarch_data_free_ftype *free)
{ {
struct gdbarch_data_registration **curr; struct gdbarch_data_registration **curr;
/* Append the new registraration. */ /* Append the new registraration. */

View File

@ -3257,7 +3257,11 @@ extern int gdbarch_update_p (struct gdbarch_info info);
The per-architecture data-pointer is either initialized explicitly The per-architecture data-pointer is either initialized explicitly
(set_gdbarch_data()) or implicitly (by INIT() via a call to (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 When a previously created architecture is re-selected, the
per-architecture data-pointer for that previous architecture is 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; struct gdbarch_data;
typedef void *(gdbarch_data_init_ftype) (struct gdbarch *gdbarch); typedef void *(gdbarch_data_init_ftype) (struct gdbarch *gdbarch);
typedef void (gdbarch_data_free_ftype) (struct gdbarch *gdbarch, extern struct gdbarch_data *register_gdbarch_data (gdbarch_data_init_ftype *init);
void *pointer);
extern struct gdbarch_data *register_gdbarch_data (gdbarch_data_init_ftype *init,
gdbarch_data_free_ftype *free);
extern void set_gdbarch_data (struct gdbarch *gdbarch, extern void set_gdbarch_data (struct gdbarch *gdbarch,
struct gdbarch_data *data, struct gdbarch_data *data,
void *pointer); void *pointer);

View File

@ -1175,7 +1175,11 @@ extern int gdbarch_update_p (struct gdbarch_info info);
The per-architecture data-pointer is either initialized explicitly The per-architecture data-pointer is either initialized explicitly
(set_gdbarch_data()) or implicitly (by INIT() via a call to (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 When a previously created architecture is re-selected, the
per-architecture data-pointer for that previous architecture is 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; struct gdbarch_data;
typedef void *(gdbarch_data_init_ftype) (struct gdbarch *gdbarch); typedef void *(gdbarch_data_init_ftype) (struct gdbarch *gdbarch);
typedef void (gdbarch_data_free_ftype) (struct gdbarch *gdbarch, extern struct gdbarch_data *register_gdbarch_data (gdbarch_data_init_ftype *init);
void *pointer);
extern struct gdbarch_data *register_gdbarch_data (gdbarch_data_init_ftype *init,
gdbarch_data_free_ftype *free);
extern void set_gdbarch_data (struct gdbarch *gdbarch, extern void set_gdbarch_data (struct gdbarch *gdbarch,
struct gdbarch_data *data, struct gdbarch_data *data,
void *pointer); void *pointer);
@ -1890,8 +1891,7 @@ struct gdbarch_data_registry gdbarch_data_registry =
}; };
struct gdbarch_data * struct gdbarch_data *
register_gdbarch_data (gdbarch_data_init_ftype *init, register_gdbarch_data (gdbarch_data_init_ftype *init)
gdbarch_data_free_ftype *free)
{ {
struct gdbarch_data_registration **curr; struct gdbarch_data_registration **curr;
/* Append the new registraration. */ /* Append the new registraration. */

View File

@ -433,7 +433,7 @@ gnuv3_baseclass_offset (struct type *type, int index, char *valaddr,
static void static void
init_gnuv3_ops (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.shortname = "gnu-v3";
gnu_v3_abi_ops.longname = "GNU G++ Version 3 ABI"; gnu_v3_abi_ops.longname = "GNU G++ Version 3 ABI";

View File

@ -1662,7 +1662,7 @@ extern initialize_file_ftype _initialize_regcache; /* -Wmissing-prototype */
void void
_initialize_regcache (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 (current_regcache);
register_gdbarch_swap (&deprecated_registers, sizeof (deprecated_registers), NULL); register_gdbarch_swap (&deprecated_registers, sizeof (deprecated_registers), NULL);
register_gdbarch_swap (&deprecated_register_valid, sizeof (deprecated_register_valid), NULL); register_gdbarch_swap (&deprecated_register_valid, sizeof (deprecated_register_valid), NULL);

View File

@ -259,7 +259,7 @@ extern initialize_file_ftype _initialize_reggroup; /* -Wmissing-prototypes */
void void
_initialize_reggroup (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. */ /* The pre-defined list of groups. */
add_group (&default_groups, general_reggroup, XMALLOC (struct reggroup_el)); add_group (&default_groups, general_reggroup, XMALLOC (struct reggroup_el));

View File

@ -6056,7 +6056,7 @@ _initialize_remote (void)
struct cmd_list_element *tmpcmd; struct cmd_list_element *tmpcmd;
/* architecture specific data */ /* 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 /* Old tacky stuff. NOTE: This comes after the remote protocol so
that the remote protocol has been initialized. */ that the remote protocol has been initialized. */

View File

@ -201,5 +201,5 @@ extern initialize_file_ftype _initialize_user_regs; /* -Wmissing-prototypes */
void void
_initialize_user_regs (void) _initialize_user_regs (void)
{ {
user_regs_data = register_gdbarch_data (user_regs_init, NULL); user_regs_data = register_gdbarch_data (user_regs_init);
} }