Expand the gdbarch per-architecture data vector as needed, rather
authorJim Blandy <jimb@codesourcery.com>
Sat, 2 Jun 2001 03:50:56 +0000 (03:50 +0000)
committerJim Blandy <jimb@codesourcery.com>
Sat, 2 Jun 2001 03:50:56 +0000 (03:50 +0000)
commit3c875b6f0df9267035aca956fa7fee446d03ec18
treeaa68e1f25edde8b79f8125a1aa6e0f50d33b4c5c
parent98f96ba187da56d93a8b58e794bd6acb58c7034c
Expand the gdbarch per-architecture data vector as needed, rather
than requiring that all per-architecture data be registered before
the first gdbarch object is allocated.
* gdbarch.sh: Changes to effect the following:
* gdbarch.c (alloc_gdbarch_data, init_gdbarch_data): Delete
declarations and definitions.
(check_gdbarch_data): New function, and declaration.
(gdbarch_alloc): Don't call alloc_gdbarch_data; leaving the fields
zero is good enough.
(free_gdbarch_data): Tolerate a null data pointer.  Free only
those data items gdbarch->data actually has allocated.
(set_gdbarch_data, gdbarch_data): Call check_gdbarch_data.
(gdbarch_update_p): No need to call init_gdbarch_data.
gdb/ChangeLog
gdb/gdbarch.c
gdb/gdbarch.sh