mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-22 19:09:31 +08:00
Use clean_restart in gdb.threads
Change gdb.threads to use clean_restart more consistently.
This commit is contained in:
@ -32,11 +32,8 @@ remote_exec build "rm -f ${binfile}"
|
|||||||
#log_user 1
|
#log_user 1
|
||||||
|
|
||||||
proc corefunc { threadtype } {
|
proc corefunc { threadtype } {
|
||||||
global srcfile
|
|
||||||
global binfile
|
global binfile
|
||||||
global escapedbinfile
|
global escapedbinfile
|
||||||
global srcdir
|
|
||||||
global subdir
|
|
||||||
global gdb_prompt
|
global gdb_prompt
|
||||||
|
|
||||||
set test_spawn_id [spawn_wait_for_attach $binfile]
|
set test_spawn_id [spawn_wait_for_attach $binfile]
|
||||||
@ -45,11 +42,7 @@ proc corefunc { threadtype } {
|
|||||||
# Stop the program
|
# Stop the program
|
||||||
remote_exec build "kill -s STOP ${testpid}"
|
remote_exec build "kill -s STOP ${testpid}"
|
||||||
|
|
||||||
# Start with clean gdb
|
clean_restart $binfile
|
||||||
gdb_exit
|
|
||||||
gdb_start
|
|
||||||
gdb_reinitialize_dir $srcdir/$subdir
|
|
||||||
gdb_load ${binfile}
|
|
||||||
|
|
||||||
# Verify that we can attach to the stopped process.
|
# Verify that we can attach to the stopped process.
|
||||||
|
|
||||||
|
@ -79,11 +79,7 @@ gdb_test_multiple "info threads" "$test" {
|
|||||||
|
|
||||||
# Start over, but this time, don't switch away from the fork event thread.
|
# Start over, but this time, don't switch away from the fork event thread.
|
||||||
|
|
||||||
gdb_exit
|
clean_restart $binfile
|
||||||
gdb_start
|
|
||||||
gdb_reinitialize_dir $srcdir/$subdir
|
|
||||||
|
|
||||||
gdb_load ${binfile}
|
|
||||||
if {![runto_main]} {
|
if {![runto_main]} {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
@ -146,11 +146,7 @@ proc step_ten_loops { cmd } {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Start with a fresh gdb.
|
clean_restart
|
||||||
|
|
||||||
gdb_exit
|
|
||||||
gdb_start
|
|
||||||
gdb_reinitialize_dir $srcdir/$subdir
|
|
||||||
|
|
||||||
# We'll need this when we send_gdb a ^C to GDB. Need to do it before we
|
# We'll need this when we send_gdb a ^C to GDB. Need to do it before we
|
||||||
# run the program and gdb starts saving and restoring tty states.
|
# run the program and gdb starts saving and restoring tty states.
|
||||||
|
@ -31,11 +31,7 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executab
|
|||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
|
||||||
gdb_exit
|
clean_restart $binfile
|
||||||
gdb_start
|
|
||||||
gdb_reinitialize_dir $srcdir/$subdir
|
|
||||||
gdb_load ${binfile}
|
|
||||||
|
|
||||||
gdb_test_no_output "set can-use-hw-watchpoints 1" ""
|
gdb_test_no_output "set can-use-hw-watchpoints 1" ""
|
||||||
|
|
||||||
#
|
#
|
||||||
|
Reference in New Issue
Block a user