aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite
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/testsuite
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/testsuite')
-rw-r--r--gdb/testsuite/ChangeLog6
-rw-r--r--gdb/testsuite/gdb.guile/scm-breakpoint.exp14
-rw-r--r--gdb/testsuite/gdb.guile/scm-gsmob.exp20
3 files changed, 22 insertions, 18 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index de32b61..dc9cff0 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2014-05-26 Andy Wingo <wingo@igalia.com>
+
+ * gdb.guile/scm-breakpoint.exp:
+ * gdb.guile/scm-gsmob.exp: Update to use plain old object
+ properties instead of gdb-object-properties.
+
2014-05-26 Yao Qi <yao@codesourcery.com>
* gdb.server/no-thread-db.exp: Specify source file name
diff --git a/gdb/testsuite/gdb.guile/scm-breakpoint.exp b/gdb/testsuite/gdb.guile/scm-breakpoint.exp
index b25d4e0..fd7c970 100644
--- a/gdb/testsuite/gdb.guile/scm-breakpoint.exp
+++ b/gdb/testsuite/gdb.guile/scm-breakpoint.exp
@@ -310,14 +310,14 @@ proc test_bkpt_eval_funcs { } {
"(define set-bp-data-count! set-car!)" "" \
"(define bp-data-inf-i cdr)" "" \
"(define set-bp-data-inf-i! set-cdr!)" "" \
- "(define (bp-eval-count bkpt) (bp-data-count (gsmob-property bkpt 'bp-data)))" "" \
- "(define (bp-eval-inf-i bkpt) (bp-data-inf-i (gsmob-property bkpt 'bp-data)))" "" \
+ "(define (bp-eval-count bkpt) (bp-data-count (object-property bkpt 'bp-data)))" "" \
+ "(define (bp-eval-inf-i bkpt) (bp-data-inf-i (object-property bkpt 'bp-data)))" "" \
"(define (make-bp-eval location)" "" \
" (let ((bp (create-breakpoint! location)))" "" \
- " (set-gsmob-property! bp 'bp-data (make-bp-data))" "" \
+ " (set-object-property! bp 'bp-data (make-bp-data))" "" \
" (set-breakpoint-stop! bp" "" \
" (lambda (bkpt)" "" \
- " (let ((data (gsmob-property bkpt 'bp-data))" "" \
+ " (let ((data (object-property bkpt 'bp-data))" "" \
" (inf-i (parse-and-eval \"i\")))" "" \
" (set-bp-data-count! data (+ (bp-data-count data) 1))" "" \
" (set-bp-data-inf-i! data inf-i)" "" \
@@ -329,10 +329,10 @@ proc test_bkpt_eval_funcs { } {
"guile" "" \
"(define (make-bp-also-eval location)" "" \
" (let ((bp (create-breakpoint! location)))" "" \
- " (set-gsmob-property! bp 'bp-data (make-bp-data))" "" \
+ " (set-object-property! bp 'bp-data (make-bp-data))" "" \
" (set-breakpoint-stop! bp" "" \
" (lambda (bkpt)" "" \
- " (let* ((data (gsmob-property bkpt 'bp-data))" "" \
+ " (let* ((data (object-property bkpt 'bp-data))" "" \
" (count (+ (bp-data-count data) 1)))" "" \
" (set-bp-data-count! data count)" "" \
" (= count 9))))" "" \
@@ -343,7 +343,7 @@ proc test_bkpt_eval_funcs { } {
"guile" "" \
"(define (make-bp-basic location)" "" \
" (let ((bp (create-breakpoint! location)))" "" \
- " (set-gsmob-property! bp 'bp-data (make-bp-data))" "" \
+ " (set-object-property! bp 'bp-data (make-bp-data))" "" \
" bp))" "" \
"end" ""
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) (string<? (symbol->string a) (symbol->string b)))))" \
- "= \\($prop_list\\)" "gsmob-properties"
+gdb_test "gu (print (sort (map car (object-properties arch)) (lambda (a b) (string<? (symbol->string a) (symbol->string b)))))" \
+ "= \\($prop_list\\)" "object-properties"