aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbarch.h
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2002-06-08 18:09:01 +0000
committerAndrew Cagney <cagney@redhat.com>2002-06-08 18:09:01 +0000
commit76860b5fb39d8868e8e77d1073f41a1f6fbb3aaf (patch)
treee7b3724e700414e66056ad621e1b9ce214032fe4 /gdb/gdbarch.h
parent30107679305ff85961c28f93889ea2daf9dfa432 (diff)
downloadgdb-76860b5fb39d8868e8e77d1073f41a1f6fbb3aaf.zip
gdb-76860b5fb39d8868e8e77d1073f41a1f6fbb3aaf.tar.gz
gdb-76860b5fb39d8868e8e77d1073f41a1f6fbb3aaf.tar.bz2
* gdbarch.sh (struct gdbarch_data): Add field init_p.
(register_gdbarch_data): Initialize init_p. (gdbarch_data): Initialize data pointer using the init function. (init_gdbarch_data): Delete function. (gdbarch_update_p): Update. (initialize_non_multiarch): Update. (struct gdbarch): Add field initialized_p. * gdbarch.h, gdbarch.c: Re-generate.
Diffstat (limited to 'gdb/gdbarch.h')
-rw-r--r--gdb/gdbarch.h17
1 files changed, 6 insertions, 11 deletions
diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h
index 09c2f41..9a1fa19 100644
--- a/gdb/gdbarch.h
+++ b/gdb/gdbarch.h
@@ -2591,20 +2591,15 @@ extern int gdbarch_update_p (struct gdbarch_info info);
for the reserved data-pointer is returned. That identifer should
be saved in a local static variable.
- The per-architecture data-pointer can be initialized in one of two
- ways: The value can be set explicitly using a call to
- set_gdbarch_data(); the value can be set implicitly using the value
- returned by a non-NULL INIT() callback. INIT(), when non-NULL is
- called after the basic architecture vector has been created.
+ The per-architecture data-pointer is either initialized explicitly
+ (set_gdbarch_data()) or implicitly (by INIT() via a call to
+ gdbarch_data()). FREE() is called to delete either an existing
+ data-poitner overridden by set_gdbarch_data() or when the
+ architecture object is being deleted.
When a previously created architecture is re-selected, the
per-architecture data-pointer for that previous architecture is
- restored. INIT() is not called.
-
- During initialization, multiple assignments of the data-pointer are
- allowed, non-NULL values are deleted by calling FREE(). If the
- architecture is deleted using gdbarch_free() all non-NULL data
- pointers are also deleted using FREE().
+ restored. INIT() is not re-called.
Multiple registrarants for any architecture are allowed (and
strongly encouraged). */