mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-07-28 12:24:04 +08:00
[mti-fix-scope]
* gdb.mi/mi-watch.exp (test_watchpoint_all): New function. Move all the tests here and run them twice, once using software watchpoints and once using hardware watchpoints. * gdb.mi/mi2-watch.exp (test_watchpoint_all): Likewise.
This commit is contained in:
gdb/testsuite
@ -1,3 +1,11 @@
|
|||||||
|
2007-09-14 Maciej W. Rozycki <macro@mips.com>
|
||||||
|
|
||||||
|
[mti-fix-scope]
|
||||||
|
* gdb.mi/mi-watch.exp (test_watchpoint_all): New function.
|
||||||
|
Move all the tests here and run them twice, once using software
|
||||||
|
watchpoints and once using hardware watchpoints.
|
||||||
|
* gdb.mi/mi2-watch.exp (test_watchpoint_all): Likewise.
|
||||||
|
|
||||||
2007-09-12 Daniel Jacobowitz <dan@codesourcery.com>
|
2007-09-12 Daniel Jacobowitz <dan@codesourcery.com>
|
||||||
|
|
||||||
* gdb.base/solib-weak.exp (do_test): Adjust the file names for each
|
* gdb.base/solib-weak.exp (do_test): Adjust the file names for each
|
||||||
|
@ -41,10 +41,6 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
|
|||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
|
||||||
mi_delete_breakpoints
|
|
||||||
mi_gdb_reinitialize_dir $srcdir/$subdir
|
|
||||||
mi_gdb_load ${binfile}
|
|
||||||
|
|
||||||
proc test_watchpoint_creation_and_listing {} {
|
proc test_watchpoint_creation_and_listing {} {
|
||||||
global mi_gdb_prompt
|
global mi_gdb_prompt
|
||||||
global srcfile
|
global srcfile
|
||||||
@ -167,10 +163,18 @@ proc test_watchpoint_triggering {} {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Disable hardware watchpoints if necessary.
|
proc test_watchpoint_all {type} {
|
||||||
if [target_info exists gdb,no_hardware_watchpoints] {
|
global pf_prefix
|
||||||
mi_gdb_test "-gdb-set can-use-hw-watchpoints 0" "\\^done" ""
|
upvar srcdir srcdir
|
||||||
}
|
upvar subdir subdir
|
||||||
|
upvar binfile binfile
|
||||||
|
|
||||||
|
set old_prefix $pf_prefix
|
||||||
|
lappend pf_prefix "$type:"
|
||||||
|
|
||||||
|
mi_delete_breakpoints
|
||||||
|
mi_gdb_reinitialize_dir $srcdir/$subdir
|
||||||
|
mi_gdb_load ${binfile}
|
||||||
|
|
||||||
mi_runto callee4
|
mi_runto callee4
|
||||||
test_watchpoint_creation_and_listing
|
test_watchpoint_creation_and_listing
|
||||||
@ -178,5 +182,29 @@ test_watchpoint_creation_and_listing
|
|||||||
#test_awatch_creation_and_listing
|
#test_awatch_creation_and_listing
|
||||||
test_watchpoint_triggering
|
test_watchpoint_triggering
|
||||||
|
|
||||||
|
set pf_prefix $old_prefix
|
||||||
|
}
|
||||||
|
|
||||||
|
# Run the tests twice, once using software watchpoints...
|
||||||
|
mi_gdb_test "567-gdb-set can-use-hw-watchpoints 0" \
|
||||||
|
"567\\^done" \
|
||||||
|
"hw watchpoints toggle (1)"
|
||||||
|
test_watchpoint_all sw
|
||||||
|
|
||||||
|
mi_gdb_exit
|
||||||
|
|
||||||
|
# ... and unless requested otherwise...
|
||||||
|
if [target_info exists gdb,no_hardware_watchpoints] {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
mi_gdb_start
|
||||||
|
|
||||||
|
# ... once using hardware watchpoints (if available).
|
||||||
|
mi_gdb_test "890-gdb-set can-use-hw-watchpoints 1" \
|
||||||
|
"890\\^done" \
|
||||||
|
"hw watchpoints toggle (2)"
|
||||||
|
test_watchpoint_all hw
|
||||||
|
|
||||||
mi_gdb_exit
|
mi_gdb_exit
|
||||||
return 0
|
return 0
|
||||||
|
@ -41,10 +41,6 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
|
|||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
|
||||||
mi_delete_breakpoints
|
|
||||||
mi_gdb_reinitialize_dir $srcdir/$subdir
|
|
||||||
mi_gdb_load ${binfile}
|
|
||||||
|
|
||||||
proc test_watchpoint_creation_and_listing {} {
|
proc test_watchpoint_creation_and_listing {} {
|
||||||
global mi_gdb_prompt
|
global mi_gdb_prompt
|
||||||
global srcfile
|
global srcfile
|
||||||
@ -167,10 +163,18 @@ proc test_watchpoint_triggering {} {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Disable hardware watchpoints if necessary.
|
proc test_watchpoint_all {type} {
|
||||||
if [target_info exists gdb,no_hardware_watchpoints] {
|
global pf_prefix
|
||||||
mi_gdb_test "-gdb-set can-use-hw-watchpoints 0" "\\^done" ""
|
upvar srcdir srcdir
|
||||||
}
|
upvar subdir subdir
|
||||||
|
upvar binfile binfile
|
||||||
|
|
||||||
|
set old_prefix $pf_prefix
|
||||||
|
lappend pf_prefix "$type:"
|
||||||
|
|
||||||
|
mi_delete_breakpoints
|
||||||
|
mi_gdb_reinitialize_dir $srcdir/$subdir
|
||||||
|
mi_gdb_load ${binfile}
|
||||||
|
|
||||||
mi_runto callee4
|
mi_runto callee4
|
||||||
test_watchpoint_creation_and_listing
|
test_watchpoint_creation_and_listing
|
||||||
@ -178,5 +182,29 @@ test_watchpoint_creation_and_listing
|
|||||||
#test_awatch_creation_and_listing
|
#test_awatch_creation_and_listing
|
||||||
test_watchpoint_triggering
|
test_watchpoint_triggering
|
||||||
|
|
||||||
|
set pf_prefix $old_prefix
|
||||||
|
}
|
||||||
|
|
||||||
|
# Run the tests twice, once using software watchpoints...
|
||||||
|
mi_gdb_test "567-gdb-set can-use-hw-watchpoints 0" \
|
||||||
|
"567\\^done" \
|
||||||
|
"hw watchpoints toggle (1)"
|
||||||
|
test_watchpoint_all sw
|
||||||
|
|
||||||
|
mi_gdb_exit
|
||||||
|
|
||||||
|
# ... and unless requested otherwise...
|
||||||
|
if [target_info exists gdb,no_hardware_watchpoints] {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
mi_gdb_start
|
||||||
|
|
||||||
|
# ... once using hardware watchpoints (if available).
|
||||||
|
mi_gdb_test "890-gdb-set can-use-hw-watchpoints 1" \
|
||||||
|
"890\\^done" \
|
||||||
|
"hw watchpoints toggle (2)"
|
||||||
|
test_watchpoint_all hw
|
||||||
|
|
||||||
mi_gdb_exit
|
mi_gdb_exit
|
||||||
return 0
|
return 0
|
||||||
|
Reference in New Issue
Block a user