From b2715b270ae27eccefe8edbbacb3910bc7cc9383 Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Mon, 26 May 2014 17:34:27 -0700 Subject: 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. --- gdb/testsuite/gdb.guile/scm-gsmob.exp | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) (limited to 'gdb/testsuite/gdb.guile/scm-gsmob.exp') diff --git a/gdb/testsuite/gdb.guile/scm-gsmob.exp b/gdb/testsuite/gdb.guile/scm-gsmob.exp index 470afc4..70c3a65 100644 --- a/gdb/testsuite/gdb.guile/scm-gsmob.exp +++ b/gdb/testsuite/gdb.guile/scm-gsmob.exp @@ -45,26 +45,24 @@ proc prop_name { i } { # Set and ref the properties in separate loops to verify previously set # properties are not lost when we set a new property or switch to htabs. for {set i 0} {$i <= $SMOB_PROP_HTAB_THRESHOLD} {incr i} { - gdb_test "gu (print (gsmob-has-property? arch '[prop_name $i]))" \ + gdb_test "gu (print (object-property arch '[prop_name $i]))" \ "= #f" "property prop$i not present before set" - gdb_test_no_output "gu (set-gsmob-property! arch '[prop_name $i] $i)" \ - "set prop $i" - gdb_test "gu (print (gsmob-has-property? arch '[prop_name $i]))" \ - "= #t" "property prop$i present after set" + gdb_test "gu (print (set-object-property! arch '[prop_name $i] $i))" \ + "= $i" "set prop $i" + gdb_test "gu (print (object-property arch '[prop_name $i]))" \ + "= $i" "property prop$i present after set" } for {set i 0} {$i <= $SMOB_PROP_HTAB_THRESHOLD} {incr i} { - gdb_test "gu (print (gsmob-has-property? arch '[prop_name $i]))" \ - "= #t" "property prop$i present after all set" - gdb_test "gu (print (gsmob-property arch '[prop_name $i]))" \ + gdb_test "gu (print (object-property arch '[prop_name $i]))" \ "= $i" "ref prop $i" } -# Verify gsmob-properties. +# Verify properties. set prop_list "" for {set i 0} {$i <= $SMOB_PROP_HTAB_THRESHOLD} {incr i} { set prop_list "$prop_list [prop_name $i]" } set prop_list [lsort $prop_list] verbose -log "prop_list: $prop_list" -gdb_test "gu (print (sort (gsmob-properties arch) (lambda (a b) (stringstring a) (symbol->string b)))))" \ - "= \\($prop_list\\)" "gsmob-properties" +gdb_test "gu (print (sort (map car (object-properties arch)) (lambda (a b) (stringstring a) (symbol->string b)))))" \ + "= \\($prop_list\\)" "object-properties" -- cgit v1.1