-# Copyright (C) 2010-2014 Free Software Foundation, Inc.
+# Copyright (C) 2010-2019 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
standard_testfile
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
return -1
}
gdb_test "guile (print (length del-list))" \
"= 3" "number of breakpoints before delete"
gdb_continue_to_breakpoint "Break at multiply." \
- ".*/$srcfile:$deltst_location.*"
+ ".*$srcfile:$deltst_location.*"
gdb_scm_test_silent_cmd "guile (delete-breakpoint! dp1)" \
"delete breakpoint"
gdb_test "guile (print (breakpoint-number dp1))" \
"get breakpoint list 5"
gdb_test "guile (print (length del-list))" \
"= 2" "number of breakpoints after delete"
- gdb_continue_to_breakpoint "Break at end." ".*/$srcfile:$end_location.*"
+ gdb_continue_to_breakpoint "Break at end." ".*$srcfile:$end_location.*"
}
}
"create also-eval-bp1 breakpoint"
gdb_scm_test_silent_cmd "guile (define never-eval-bp1 (make-bp-also-eval \"$end_location\"))" \
"create never-eval-bp1 breakpoint"
- gdb_continue_to_breakpoint "Break at multiply." ".*/$srcfile:$bp_location2.*"
+ gdb_continue_to_breakpoint "Break at multiply." ".*$srcfile:$bp_location2.*"
gdb_test "print i" "3" "check inferior value matches guile accounting"
gdb_test "guile (print (bp-eval-inf-i eval-bp1))" \
"= 3" "check guile accounting matches inferior"
gdb_test "guile (print (bp-eval-count check-eval))" \
"= 0" \
"test that evaluate function has not been yet executed (ie count = 0)"
- gdb_continue_to_breakpoint "Break at multiply." ".*/$srcfile:$bp_location2.*"
+ gdb_continue_to_breakpoint "Break at multiply." ".*$srcfile:$bp_location2.*"
gdb_test "guile (print (bp-eval-count check-eval))" \
"= 1" \
"test that evaluate function is run when location also has normal bp"
}
}
+proc test_bkpt_address {} {
+ global decimal srcfile
+
+ # Leading whitespace is intentional!
+ gdb_scm_test_silent_cmd \
+ "guile (define bp1 (make-breakpoint \" *multiply\"))" \
+ "create address breakpoint a ' *multiply'" 1
+
+ gdb_test "guile (register-breakpoint! bp1)" \
+ ".*Breakpoint ($decimal)+ at .*$srcfile, line ($decimal)+\."
+}
+
+proc test_bkpt_probe {} {
+ global decimal hex testfile srcfile
+
+ if { [prepare_for_testing "failed to prepare" ${testfile}-probes \
+ ${srcfile} {additional_flags=-DUSE_PROBES}] } {
+ return -1
+ }
+
+ if ![gdb_guile_runto_main] then {
+ return
+ }
+
+ gdb_scm_test_silent_cmd \
+ "guile (define bp1 (make-breakpoint \"-probe test:result_updated\"))" \
+ "create probe breakpoint"
+
+ gdb_test \
+ "guile (register-breakpoint! bp1)" \
+ "Breakpoint $decimal at $hex" \
+ "register probe breakpoint"
+}
+
test_bkpt_basic
test_bkpt_deletion
test_bkpt_cond_and_cmds
test_bkpt_internal
test_bkpt_eval_funcs
test_bkpt_registration
+test_bkpt_address
+test_bkpt_probe