diff options
author | Doug Evans <xdje42@gmail.com> | 2014-02-20 09:27:12 -0800 |
---|---|---|
committer | Doug Evans <xdje42@gmail.com> | 2014-02-20 09:27:12 -0800 |
commit | 1254eefca2c2af47e8333bbc33d878998703a204 (patch) | |
tree | 263fa84864a3ccfa8a218c0c9df20994d852a7d7 | |
parent | 8c3cb9fa4405d86e57cc3b02ef38e50ef6747924 (diff) | |
download | gdb-1254eefca2c2af47e8333bbc33d878998703a204.zip gdb-1254eefca2c2af47e8333bbc33d878998703a204.tar.gz gdb-1254eefca2c2af47e8333bbc33d878998703a204.tar.bz2 |
Move containing_scm arg from gdbscm_fill_eqable_gsmob_ptr_slot
to gdbscm_init_eqable_gsmob.
* guile/scm-gsmob.c (gdbscm_init_eqable_gsmob): New arg containing_scm.
All callers updated.
(gdbscm_fill_eqable_gsmob_ptr_slot): Delete arg containing_scm.
All callers updated.
* guile/guile-internal.h (gdbscm_init_eqable_gsmob): Update.
(gdbscm_fill_eqable_gsmob_ptr_slot): Update.
-rw-r--r-- | gdb/ChangeLog | 9 | ||||
-rw-r--r-- | gdb/guile/guile-internal.h | 6 | ||||
-rw-r--r-- | gdb/guile/scm-block.c | 4 | ||||
-rw-r--r-- | gdb/guile/scm-frame.c | 4 | ||||
-rw-r--r-- | gdb/guile/scm-gsmob.c | 15 | ||||
-rw-r--r-- | gdb/guile/scm-symbol.c | 4 | ||||
-rw-r--r-- | gdb/guile/scm-symtab.c | 4 | ||||
-rw-r--r-- | gdb/guile/scm-type.c | 4 |
8 files changed, 28 insertions, 22 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 40b6055..5620269 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,12 @@ +2014-02-20 Doug Evans <xdje42@gmail.com> + + * guile/scm-gsmob.c (gdbscm_init_eqable_gsmob): New arg containing_scm. + All callers updated. + (gdbscm_fill_eqable_gsmob_ptr_slot): Delete arg containing_scm. + All callers updated. + * guile/guile-internal.h (gdbscm_init_eqable_gsmob): Update. + (gdbscm_fill_eqable_gsmob_ptr_slot): Update. + 2014-02-20 lin zuojian <manjian2006@gmail.com> Joel Brobecker <brobecker@adacore.com> Doug Evans <xdje42@gmail.com> diff --git a/gdb/guile/guile-internal.h b/gdb/guile/guile-internal.h index dcdd422..f95f092 100644 --- a/gdb/guile/guile-internal.h +++ b/gdb/guile/guile-internal.h @@ -219,7 +219,8 @@ extern void gdbscm_init_gsmob (gdb_smob *base); extern void gdbscm_init_chained_gsmob (chained_gdb_smob *base); -extern void gdbscm_init_eqable_gsmob (eqable_gdb_smob *base); +extern void gdbscm_init_eqable_gsmob (eqable_gdb_smob *base, + SCM containing_scm); extern SCM gdbscm_mark_gsmob (gdb_smob *base); @@ -242,8 +243,7 @@ extern eqable_gdb_smob **gdbscm_find_eqable_gsmob_ptr_slot (htab_t htab, eqable_gdb_smob *base); extern void gdbscm_fill_eqable_gsmob_ptr_slot (eqable_gdb_smob **slot, - eqable_gdb_smob *base, - SCM containing_scm); + eqable_gdb_smob *base); extern void gdbscm_clear_eqable_gsmob_ptr_slot (htab_t htab, eqable_gdb_smob *base); diff --git a/gdb/guile/scm-block.c b/gdb/guile/scm-block.c index de41af2..4e1748e 100644 --- a/gdb/guile/scm-block.c +++ b/gdb/guile/scm-block.c @@ -193,7 +193,7 @@ bkscm_make_block_smob (void) b_smob->block = NULL; b_smob->objfile = NULL; b_scm = scm_new_smob (block_smob_tag, (scm_t_bits) b_smob); - gdbscm_init_eqable_gsmob (&b_smob->base); + gdbscm_init_eqable_gsmob (&b_smob->base, b_scm); return b_scm; } @@ -237,7 +237,7 @@ bkscm_scm_from_block (const struct block *block, struct objfile *objfile) b_smob = (block_smob *) SCM_SMOB_DATA (b_scm); b_smob->block = block; b_smob->objfile = objfile; - gdbscm_fill_eqable_gsmob_ptr_slot (slot, &b_smob->base, b_scm); + gdbscm_fill_eqable_gsmob_ptr_slot (slot, &b_smob->base); return b_scm; } diff --git a/gdb/guile/scm-frame.c b/gdb/guile/scm-frame.c index a46d1e3..6031a7f 100644 --- a/gdb/guile/scm-frame.c +++ b/gdb/guile/scm-frame.c @@ -201,7 +201,7 @@ frscm_make_frame_smob (void) f_smob->inferior = NULL; f_smob->frame_id_is_next = 0; f_scm = scm_new_smob (frame_smob_tag, (scm_t_bits) f_smob); - gdbscm_init_eqable_gsmob (&f_smob->base); + gdbscm_init_eqable_gsmob (&f_smob->base, f_scm); return f_scm; } @@ -275,7 +275,7 @@ frscm_scm_from_frame (struct frame_info *frame, struct inferior *inferior) f_smob->inferior = inferior; f_smob->frame_id_is_next = frame_id_is_next; - gdbscm_fill_eqable_gsmob_ptr_slot (slot, &f_smob->base, f_scm); + gdbscm_fill_eqable_gsmob_ptr_slot (slot, &f_smob->base); return f_scm; } diff --git a/gdb/guile/scm-gsmob.c b/gdb/guile/scm-gsmob.c index 5f9e856..b0f9e19 100644 --- a/gdb/guile/scm-gsmob.c +++ b/gdb/guile/scm-gsmob.c @@ -148,13 +148,13 @@ gdbscm_init_chained_gsmob (chained_gdb_smob *base) /* Initialize an eqable_gdb_smob. This is the same as gdbscm_init_gsmob except that it also sets - containing_scm to #f. */ + BASE->containing_scm to CONTAINING_SCM. */ void -gdbscm_init_eqable_gsmob (eqable_gdb_smob *base) +gdbscm_init_eqable_gsmob (eqable_gdb_smob *base, SCM containing_scm) { gdbscm_init_gsmob ((gdb_smob *) base); - base->containing_scm = SCM_BOOL_F; + base->containing_scm = containing_scm; } /* Call this from each smob's "mark" routine. @@ -419,16 +419,13 @@ gdbscm_find_eqable_gsmob_ptr_slot (htab_t htab, eqable_gdb_smob *base) return (eqable_gdb_smob **) slot; } -/* Record CONTAINING_SCM as the object containing BASE, and record it in - SLOT. SLOT must be the result of calling gdbscm_find_eqable_gsmob_ptr_slot - on BASE (or equivalent for lookup). */ +/* Record BASE in SLOT. SLOT must be the result of calling + gdbscm_find_eqable_gsmob_ptr_slot on BASE (or equivalent for lookup). */ void gdbscm_fill_eqable_gsmob_ptr_slot (eqable_gdb_smob **slot, - eqable_gdb_smob *base, - SCM containing_scm) + eqable_gdb_smob *base) { - base->containing_scm = containing_scm; *slot = base; } diff --git a/gdb/guile/scm-symbol.c b/gdb/guile/scm-symbol.c index 53cc272..0c5cc05 100644 --- a/gdb/guile/scm-symbol.c +++ b/gdb/guile/scm-symbol.c @@ -159,7 +159,7 @@ syscm_make_symbol_smob (void) s_smob->symbol = NULL; s_scm = scm_new_smob (symbol_smob_tag, (scm_t_bits) s_smob); - gdbscm_init_eqable_gsmob (&s_smob->base); + gdbscm_init_eqable_gsmob (&s_smob->base, s_scm); return s_scm; } @@ -202,7 +202,7 @@ syscm_scm_from_symbol (struct symbol *symbol) s_scm = syscm_make_symbol_smob (); s_smob = (symbol_smob *) SCM_SMOB_DATA (s_scm); s_smob->symbol = symbol; - gdbscm_fill_eqable_gsmob_ptr_slot (slot, &s_smob->base, s_scm); + gdbscm_fill_eqable_gsmob_ptr_slot (slot, &s_smob->base); return s_scm; } diff --git a/gdb/guile/scm-symtab.c b/gdb/guile/scm-symtab.c index 910d8b7..7294fea 100644 --- a/gdb/guile/scm-symtab.c +++ b/gdb/guile/scm-symtab.c @@ -184,7 +184,7 @@ stscm_make_symtab_smob (void) st_smob->symtab = NULL; st_scm = scm_new_smob (symtab_smob_tag, (scm_t_bits) st_smob); - gdbscm_init_eqable_gsmob (&st_smob->base); + gdbscm_init_eqable_gsmob (&st_smob->base, st_scm); return st_scm; } @@ -226,7 +226,7 @@ stscm_scm_from_symtab (struct symtab *symtab) st_scm = stscm_make_symtab_smob (); st_smob = (symtab_smob *) SCM_SMOB_DATA (st_scm); st_smob->symtab = symtab; - gdbscm_fill_eqable_gsmob_ptr_slot (slot, &st_smob->base, st_scm); + gdbscm_fill_eqable_gsmob_ptr_slot (slot, &st_smob->base); return st_scm; } diff --git a/gdb/guile/scm-type.c b/gdb/guile/scm-type.c index 36cba79..4fa0c28 100644 --- a/gdb/guile/scm-type.c +++ b/gdb/guile/scm-type.c @@ -283,7 +283,7 @@ tyscm_make_type_smob (void) t_smob->type = NULL; t_scm = scm_new_smob (type_smob_tag, (scm_t_bits) t_smob); - gdbscm_init_eqable_gsmob (&t_smob->base); + gdbscm_init_eqable_gsmob (&t_smob->base, t_scm); return t_scm; } @@ -326,7 +326,7 @@ tyscm_scm_from_type (struct type *type) t_scm = tyscm_make_type_smob (); t_smob = (type_smob *) SCM_SMOB_DATA (t_scm); t_smob->type = type; - gdbscm_fill_eqable_gsmob_ptr_slot (slot, &t_smob->base, t_scm); + gdbscm_fill_eqable_gsmob_ptr_slot (slot, &t_smob->base); return t_scm; } |