OSDN Git Service

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)
commit9d110bd32e9e7793e77594de54fb3a5320d83c7f
tree90aeb5609792dc5d5ca8aa420ffdc46a5f8a160b
parent5acf0fd2de27650398d471895bf48d7e77f0708a
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