aboutsummaryrefslogtreecommitdiff
path: root/gdb/guile/guile-internal.h
diff options
context:
space:
mode:
authorAndy Wingo <wingo@igalia.com>2014-05-26 17:34:27 -0700
committerDoug Evans <xdje42@gmail.com>2014-05-26 17:34:27 -0700
commitb2715b270ae27eccefe8edbbacb3910bc7cc9383 (patch)
treece6fc357f9c5618a691f7b1bd06446e439fecd21 /gdb/guile/guile-internal.h
parent3ce6e9727987728ad8afa28ecfdece0375501988 (diff)
downloadgdb-b2715b270ae27eccefe8edbbacb3910bc7cc9383.zip
gdb-b2715b270ae27eccefe8edbbacb3910bc7cc9383.tar.gz
gdb-b2715b270ae27eccefe8edbbacb3910bc7cc9383.tar.bz2
gdb smob cleanups
* guile/guile-internal.h (GDB_SMOB_HEAD): Replace properties with empty_base_class. All uses updated. (gdbscm_mark_gsmob, gdbscm_mark_chained_gsmob) (gdbscm_mark_eqable_gsmob): Remove these now-unneeded functions. Adapt all callers. * guile/scm-gsmob.c (gdbscm_mark_gsmob) (gdbscm_mark_chained_gsmob, gdbscm_mark_eqable_gsmob): Remove. (gdbscm_gsmob_property, gdbscm_set_gsmob_property_x) (gdbscm_gsmob_has_property_p, add_property_name) (gdbscm_gsmob_properties): Remove, and remove them from gsmob_functions. * guile/lib/gdb.scm (gdb-object-property, set-gdb-object-property) (gdb-object-has-property?, gdb-object-properties): Remove. (gdb-object-kind): Renamed from gsmob-kind. doc/ * guile.texi (GDB Scheme Data Types): Remove documentation for removed interfaces. Update spelling of gdb-object-kind. testsuite/ * gdb.guile/scm-breakpoint.exp: * gdb.guile/scm-gsmob.exp: Update to use plain old object properties instead of gdb-object-properties.
Diffstat (limited to 'gdb/guile/guile-internal.h')
-rw-r--r--gdb/guile/guile-internal.h31
1 files changed, 15 insertions, 16 deletions
diff --git a/gdb/guile/guile-internal.h b/gdb/guile/guile-internal.h
index b6d01f4..e2e1c01 100644
--- a/gdb/guile/guile-internal.h
+++ b/gdb/guile/guile-internal.h
@@ -153,26 +153,31 @@ extern void gdbscm_dynwind_xfree (void *ptr);
extern int gdbscm_is_procedure (SCM proc);
-/* GDB smobs, from scm-smob.c */
+/* GDB smobs, from scm-gsmob.c */
/* All gdb smobs must contain one of the following as the first member:
gdb_smob, chained_gdb_smob, or eqable_gdb_smob.
- The next,prev members of chained_gdb_smob allow for chaining gsmobs
- together so that, for example, when an objfile is deleted we can clean up
- all smobs that reference it.
+ Chained GDB smobs should have chained_gdb_smob as their first member. The
+ next,prev members of chained_gdb_smob allow for chaining gsmobs together so
+ that, for example, when an objfile is deleted we can clean up all smobs that
+ reference it.
- The containing_scm member of eqable_gdb_smob allows for returning the
- same gsmob instead of creating a new one, allowing them to be eq?-able.
+ Eq-able GDB smobs should have eqable_gdb_smob as their first member. The
+ containing_scm member of eqable_gdb_smob allows for returning the same gsmob
+ instead of creating a new one, allowing them to be eq?-able.
- IMPORTANT: chained_gdb_smob and eqable_gdb-smob are a "subclasses" of
+ All other smobs should have gdb_smob as their first member.
+ FIXME: dje/2014-05-26: gdb_smob was useful during early development as a
+ "baseclass" for all gdb smobs. If it's still unused by gdb 8.0 delete it.
+
+ IMPORTANT: chained_gdb_smob and eqable_gdb-smob are "subclasses" of
gdb_smob. The layout of chained_gdb_smob,eqable_gdb_smob must match
gdb_smob as if it is a subclass. To that end we use macro GDB_SMOB_HEAD
to ensure this. */
-#define GDB_SMOB_HEAD \
- /* Property list for externally added fields. */ \
- SCM properties;
+#define GDB_SMOB_HEAD \
+ int empty_base_class;
typedef struct
{
@@ -222,12 +227,6 @@ extern void gdbscm_init_chained_gsmob (chained_gdb_smob *base);
extern void gdbscm_init_eqable_gsmob (eqable_gdb_smob *base,
SCM containing_scm);
-extern SCM gdbscm_mark_gsmob (gdb_smob *base);
-
-extern SCM gdbscm_mark_chained_gsmob (chained_gdb_smob *base);
-
-extern SCM gdbscm_mark_eqable_gsmob (eqable_gdb_smob *base);
-
extern void gdbscm_add_objfile_ref (struct objfile *objfile,
const struct objfile_data *data_key,
chained_gdb_smob *g_smob);