OSDN Git Service

Expand the gdbarch per-architecture data vector as needed, rather
authorjimb <jimb>
Sat, 2 Jun 2001 03:50:55 +0000 (03:50 +0000)
committerjimb <jimb>
Sat, 2 Jun 2001 03:50:55 +0000 (03:50 +0000)
commitb0a1b19b5480fabda2eaedcc940b43bcd3d387e9
treed79d537e89b0ff94c4de23e063d5d18cd0df584f
parent937d29b7a63f3f4163f202f8038fc2bd65d974b5
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