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.
This commit is contained in:
parent
3ce6e97279
commit
b2715b270a
22 changed files with 102 additions and 344 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue