This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [rfc] Add set_gdbarch_data() and revamp
- To: GDB Patches <gdb-patches at sourceware dot cygnus dot com>
- Subject: Re: [rfc] Add set_gdbarch_data() and revamp
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Tue, 06 Feb 2001 18:57:19 -0800
- References: <3A79156A.5DD5C7E1@cygnus.com>
FYI,
I've checked this in.
Andrew
Wed Jan 31 09:58:18 2001 Andrew Cagney <cagney@redhat.com>
* gdbarch.sh: Include "gdb_assert.h".
(struct gdbarch): Change ``nr_data'' to unsigned.
(alloc_gdbarch_data, free_gdbarch_data): New functions.
(gdbarch_free): Free the data-pointer vector. Use xfree to
delete
architecture vector.
(struct gdbarch_data, struct gdbarch_data_registration): Move
init
method to gdbarch_data. Add free method, make index unsigned.
(struct gdbarch_data_registry): Make nr unsigned.
(register_gdbarch_data): Add free parameter. Store in
gdbarch_data.
(init_gdbarch_data): Use set_gdbarch_data.
(set_gdbarch_data): New function.
* gdbarch.h, gdbarch.c: Re-generate.