mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-11-16 12:34:43 +00:00
Compare commits
5 Commits
gdb-13.1-r
...
users/palv
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bdfbda93f2 | ||
|
|
df47e3e9fe | ||
|
|
fc9cf3cb3c | ||
|
|
026fd25d4e | ||
|
|
c80c1bb3e4 |
@@ -169,7 +169,7 @@ proc gdb_load { arg } {
|
||||
}
|
||||
if { $state == "pass" } {
|
||||
if [gdb_target_monitor $arg] { return -1 }
|
||||
gdb_test "list main" ".*" ""
|
||||
gdb_test "list -q main" ".*" ""
|
||||
verbose "Loaded $arg into $GDB\n"
|
||||
return 0
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" }
|
||||
|
||||
clean_restart ${testfile}
|
||||
|
||||
if ![runto main] then {
|
||||
if ![runto_main] then {
|
||||
perror "Couldn't run ${testfile}"
|
||||
return
|
||||
}
|
||||
|
||||
@@ -58,14 +58,7 @@ gdb_test_multiple "catch exception" $msg {
|
||||
load_lib mi-support.exp
|
||||
set MIFLAGS "-i=mi"
|
||||
|
||||
gdb_exit
|
||||
if [mi_gdb_start] {
|
||||
continue
|
||||
}
|
||||
|
||||
mi_delete_breakpoints
|
||||
mi_gdb_reinitialize_dir $srcdir/$subdir
|
||||
mi_gdb_load ${binfile}
|
||||
mi_clean_restart $binfile
|
||||
|
||||
###################################################
|
||||
# 2. Try catching conditionnal failed assertion. #
|
||||
@@ -77,7 +70,7 @@ mi_gdb_load ${binfile}
|
||||
# - continue, we should see the second failed assertion
|
||||
# - continue, the program exits.
|
||||
|
||||
if ![mi_run_to_main] then {
|
||||
if {[mi_runto_main] < 0} {
|
||||
fail "cannot run to main, testcase aborted"
|
||||
return 0
|
||||
}
|
||||
|
||||
@@ -58,21 +58,14 @@ gdb_test_multiple "catch exception" $msg {
|
||||
load_lib mi-support.exp
|
||||
set MIFLAGS "-i=mi"
|
||||
|
||||
gdb_exit
|
||||
if [mi_gdb_start] {
|
||||
continue
|
||||
}
|
||||
|
||||
mi_delete_breakpoints
|
||||
mi_gdb_reinitialize_dir $srcdir/$subdir
|
||||
mi_gdb_load ${binfile}
|
||||
mi_clean_restart $binfile
|
||||
|
||||
####################################
|
||||
# 1. Try catching all exceptions. #
|
||||
####################################
|
||||
|
||||
with_test_prefix "scenario 1" {
|
||||
if ![mi_run_to_main] then {
|
||||
if {[mi_runto_main] < 0} {
|
||||
fail "cannot run to main, testcase aborted"
|
||||
return 0
|
||||
}
|
||||
@@ -130,7 +123,7 @@ continue_to_exception \
|
||||
# - continue, the program exits.
|
||||
|
||||
with_test_prefix "scenario 2" {
|
||||
if ![mi_run_to_main] then {
|
||||
if {[mi_runto_main] < 0} {
|
||||
fail "cannot run to main, testcase aborted"
|
||||
return 0
|
||||
}
|
||||
|
||||
@@ -57,17 +57,14 @@ gdb_test_multiple "catch handlers" $msg {
|
||||
load_lib mi-support.exp
|
||||
set MIFLAGS "-i=mi"
|
||||
|
||||
gdb_exit
|
||||
if [mi_gdb_start] {
|
||||
continue
|
||||
}
|
||||
mi_clean_restart $binfile
|
||||
|
||||
#############################################
|
||||
# 1. Try catching all exceptions handlers. #
|
||||
#############################################
|
||||
|
||||
with_test_prefix "scenario 1" {
|
||||
if ![mi_run_to_main] then {
|
||||
if {[mi_runto_main] < 0} {
|
||||
fail "cannot run to main, testcase aborted"
|
||||
return 0
|
||||
}
|
||||
@@ -119,7 +116,7 @@ continue_to_exception_handler \
|
||||
# but exit instead.
|
||||
|
||||
with_test_prefix "scenario 2" {
|
||||
if ![mi_run_to_main] then {
|
||||
if {[mi_runto_main] < 0} {
|
||||
fail "cannot run to main, testcase aborted"
|
||||
return 0
|
||||
}
|
||||
|
||||
@@ -26,16 +26,9 @@ if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" }
|
||||
load_lib mi-support.exp
|
||||
set MIFLAGS "-i=mi"
|
||||
|
||||
gdb_exit
|
||||
if [mi_gdb_start] {
|
||||
continue
|
||||
}
|
||||
mi_clean_restart $binfile
|
||||
|
||||
mi_delete_breakpoints
|
||||
mi_gdb_reinitialize_dir $srcdir/$subdir
|
||||
mi_gdb_load ${binfile}
|
||||
|
||||
if ![mi_run_to_main] then {
|
||||
if {[mi_runto_main] < 0} {
|
||||
fail "cannot run to main, testcase aborted"
|
||||
return 0
|
||||
}
|
||||
|
||||
@@ -26,12 +26,9 @@ if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" }
|
||||
load_lib mi-support.exp
|
||||
set MIFLAGS "-i=mi"
|
||||
|
||||
gdb_exit
|
||||
if [mi_gdb_start] {
|
||||
continue
|
||||
}
|
||||
mi_clean_restart $binfile
|
||||
|
||||
if ![mi_run_to_main] then {
|
||||
if {[mi_runto_main] < 0} {
|
||||
fail "cannot run to main, testcase aborted"
|
||||
return 0
|
||||
}
|
||||
|
||||
@@ -26,17 +26,10 @@ if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug additional
|
||||
load_lib mi-support.exp
|
||||
set MIFLAGS "-i=mi"
|
||||
|
||||
gdb_exit
|
||||
if [mi_gdb_start] {
|
||||
continue
|
||||
}
|
||||
mi_clean_restart $binfile
|
||||
|
||||
mi_delete_breakpoints
|
||||
mi_gdb_reinitialize_dir $srcdir/$subdir
|
||||
mi_gdb_load ${binfile}
|
||||
|
||||
if ![mi_run_to_main] then {
|
||||
fail "cannot run to main, testcase aborted"
|
||||
if {[mi_runto_main] < 0} {
|
||||
fail "cannot run to main, testcase aborted"
|
||||
return 0
|
||||
}
|
||||
|
||||
|
||||
@@ -30,12 +30,9 @@ if {[gdb_compile_ada "${srcfile}" "${binfile}" executable \
|
||||
load_lib mi-support.exp
|
||||
set MIFLAGS "-i=mi"
|
||||
|
||||
gdb_exit
|
||||
if {[mi_gdb_start]} {
|
||||
continue
|
||||
}
|
||||
mi_clean_restart $binfile
|
||||
|
||||
if {![mi_run_to_main]} then {
|
||||
if {[mi_runto_main] < 0} {
|
||||
fail "cannot run to main, testcase aborted"
|
||||
return 0
|
||||
}
|
||||
|
||||
@@ -26,16 +26,9 @@ if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" }
|
||||
load_lib mi-support.exp
|
||||
set MIFLAGS "-i=mi"
|
||||
|
||||
gdb_exit
|
||||
if [mi_gdb_start] {
|
||||
continue
|
||||
}
|
||||
mi_clean_restart $binfile
|
||||
|
||||
mi_delete_breakpoints
|
||||
mi_gdb_reinitialize_dir $srcdir/$subdir
|
||||
mi_gdb_load ${binfile}
|
||||
|
||||
if ![mi_run_to_main] then {
|
||||
if {[mi_runto_main] < 0} {
|
||||
fail "cannot run to main, testcase aborted"
|
||||
return 0
|
||||
}
|
||||
|
||||
@@ -26,16 +26,9 @@ if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" }
|
||||
load_lib mi-support.exp
|
||||
set MIFLAGS "-i=mi"
|
||||
|
||||
gdb_exit
|
||||
if [mi_gdb_start] {
|
||||
continue
|
||||
}
|
||||
mi_clean_restart $binfile
|
||||
|
||||
mi_delete_breakpoints
|
||||
mi_gdb_reinitialize_dir $srcdir/$subdir
|
||||
mi_gdb_load ${binfile}
|
||||
|
||||
if ![mi_run_to_main] then {
|
||||
if {[mi_runto_main] < 0} {
|
||||
fail "cannot run to main, testcase aborted"
|
||||
return 0
|
||||
}
|
||||
|
||||
@@ -28,15 +28,9 @@ if {[gdb_compile_ada "${srcfile}" "${binfile}" executable debug] != "" } {
|
||||
return -1
|
||||
}
|
||||
|
||||
if {[mi_gdb_start]} {
|
||||
continue
|
||||
}
|
||||
mi_clean_restart $binfile
|
||||
|
||||
mi_delete_breakpoints
|
||||
mi_gdb_reinitialize_dir $srcdir/$subdir
|
||||
mi_gdb_load ${binfile}
|
||||
|
||||
if ![mi_run_to_main] then {
|
||||
if {[mi_runto_main] < 0} {
|
||||
fail "cannot run to main, testcase aborted"
|
||||
return 0
|
||||
}
|
||||
|
||||
@@ -32,16 +32,9 @@ foreach_with_prefix scenario {none all minimal} {
|
||||
return -1
|
||||
}
|
||||
|
||||
gdb_exit
|
||||
if [mi_gdb_start] {
|
||||
continue
|
||||
}
|
||||
mi_clean_restart $binfile
|
||||
|
||||
mi_delete_breakpoints
|
||||
mi_gdb_reinitialize_dir $srcdir/$subdir
|
||||
mi_gdb_load ${binfile}
|
||||
|
||||
if ![mi_run_to_main] then {
|
||||
if {[mi_runto_main] < 0} {
|
||||
fail "cannot run to main, testcase aborted"
|
||||
return 0
|
||||
}
|
||||
|
||||
@@ -34,16 +34,9 @@ foreach_with_prefix scenario {none all minimal} {
|
||||
return -1
|
||||
}
|
||||
|
||||
gdb_exit
|
||||
if [mi_gdb_start] {
|
||||
continue
|
||||
}
|
||||
mi_clean_restart $binfile
|
||||
|
||||
mi_delete_breakpoints
|
||||
mi_gdb_reinitialize_dir $srcdir/$subdir
|
||||
mi_gdb_load ${binfile}
|
||||
|
||||
if ![mi_run_to_main] then {
|
||||
if {[mi_runto_main] < 0} {
|
||||
fail "cannot run to main, testcase aborted"
|
||||
return 0
|
||||
}
|
||||
|
||||
@@ -33,16 +33,9 @@ foreach_with_prefix scenario {none all minimal} {
|
||||
return -1
|
||||
}
|
||||
|
||||
gdb_exit
|
||||
if [mi_gdb_start] {
|
||||
continue
|
||||
}
|
||||
mi_clean_restart $binfile
|
||||
|
||||
mi_delete_breakpoints
|
||||
mi_gdb_reinitialize_dir $srcdir/$subdir
|
||||
mi_gdb_load ${binfile}
|
||||
|
||||
if ![mi_run_to_main] then {
|
||||
if {[mi_runto_main] < 0} {
|
||||
fail "cannot run to main, testcase aborted"
|
||||
return 0
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug optimize=-
|
||||
|
||||
clean_restart ${testfile}
|
||||
|
||||
if ![runto main] then {
|
||||
if ![runto_main] then {
|
||||
perror "Couldn't run ${testfile}"
|
||||
return
|
||||
}
|
||||
|
||||
@@ -41,9 +41,9 @@ gdb_start
|
||||
gdb_reinitialize_dir $srcdir/$subdir
|
||||
gdb_load ${binfile}
|
||||
|
||||
gdb_test "b main" "Breakpoint 1.*" "set breakpoint at main"
|
||||
gdb_test "b sub1" "Breakpoint 2.*" "set breakpoint at sub1"
|
||||
gdb_test "b sub2" "Breakpoint 3.*" "set breakpoint at sub2"
|
||||
gdb_test "b -q main" "Breakpoint 1.*" "set breakpoint at main"
|
||||
gdb_test "b -q sub1" "Breakpoint 2.*" "set breakpoint at sub1"
|
||||
gdb_test "b -q sub2" "Breakpoint 3.*" "set breakpoint at sub2"
|
||||
|
||||
# We can't use "runto_main" because that is exactly the problem
|
||||
# we are trying to detect, stopping somewhere before main.
|
||||
|
||||
@@ -35,5 +35,5 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list
|
||||
|
||||
clean_restart ${binfile}
|
||||
|
||||
gdb_test "break main" "" "first permanent break"
|
||||
gdb_test "break main" "" "second permanent break"
|
||||
gdb_test "break -q main" "" "first permanent break"
|
||||
gdb_test "break -q main" "" "second permanent break"
|
||||
|
||||
@@ -48,7 +48,7 @@ gdb_assert {$main_addr != -1}
|
||||
set bp_addr -1
|
||||
|
||||
# Put breakpoint on main, get the address where the breakpoint was installed.
|
||||
gdb_test_multiple "break main" "break on main, get address" {
|
||||
gdb_test_multiple "break -q main" "break on main, get address" {
|
||||
-re -wrap "Breakpoint $decimal at ($hex).*" {
|
||||
set bp_addr $expect_out(1,string)
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ gdb_start
|
||||
gdb_reinitialize_dir $srcdir/$subdir
|
||||
gdb_load ${binfile}
|
||||
|
||||
if { ![runto main] } then {
|
||||
if { ![runto_main] } then {
|
||||
fail "run to main"
|
||||
return
|
||||
}
|
||||
|
||||
@@ -459,7 +459,7 @@ proc thread_test {} {
|
||||
gdb_start
|
||||
gdb_reinitialize_dir $srcdir/$subdir
|
||||
gdb_load ${binfile}
|
||||
if { ![runto main] } then {
|
||||
if { ![runto_main] } then {
|
||||
fail "run to main"
|
||||
return
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ if { [prepare_for_testing "failed to prepare" $testfile $srcfile {debug}] } {
|
||||
return -1
|
||||
}
|
||||
|
||||
if { ![runto main] } then {
|
||||
if { ![runto_main] } then {
|
||||
fail "run to main"
|
||||
return
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ gdb_expect {
|
||||
#
|
||||
# test break at function
|
||||
#
|
||||
gdb_test "break main" \
|
||||
gdb_test "break -q main" \
|
||||
"Breakpoint.*at.* file .*$srcfile, line.*" \
|
||||
"breakpoint function"
|
||||
|
||||
@@ -76,7 +76,7 @@ set bp_location1 [gdb_get_line_number "set breakpoint 1 here"]
|
||||
# it's wherever the processor was stopped when we connected to the
|
||||
# board. So, to be sure, we do a list command.
|
||||
#
|
||||
gdb_test "list main" \
|
||||
gdb_test "list -q main" \
|
||||
".*main \\(int argc, char \\*\\*argv, char \\*\\*envp\\).*" \
|
||||
"use `list' to establish default source file"
|
||||
gdb_test "break $bp_location1" \
|
||||
@@ -426,7 +426,7 @@ delete_breakpoints
|
||||
# test temporary breakpoint at function
|
||||
#
|
||||
|
||||
gdb_test "tbreak main" "Temporary breakpoint.*at.* file .*$srcfile, line.*" "temporary breakpoint function"
|
||||
gdb_test "tbreak -q main" "Temporary breakpoint.*at.* file .*$srcfile, line.*" "temporary breakpoint function"
|
||||
|
||||
#
|
||||
# test break at function in file
|
||||
@@ -759,7 +759,7 @@ if { [prepare_for_testing "failed to prepare" "breako2" {break.c break1.c} {debu
|
||||
#
|
||||
# test break at function
|
||||
#
|
||||
gdb_test "break main" \
|
||||
gdb_test "break -q main" \
|
||||
"Breakpoint.*at.* file .*, line.*" \
|
||||
"breakpoint function, optimized file"
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
|
||||
return -1
|
||||
}
|
||||
|
||||
if ![runto main] {
|
||||
if ![runto_main] {
|
||||
return -1
|
||||
}
|
||||
|
||||
|
||||
@@ -289,7 +289,7 @@ proc_with_prefix breakpoint_clear_command_test {} {
|
||||
delete_breakpoints
|
||||
gdb_test "break factorial" "Breakpoint.*at.*"
|
||||
gdb_test_no_output "set \$bpnumfactorial = \$bpnum"
|
||||
gdb_test "break main" "Breakpoint.*at.*"
|
||||
gdb_test "break -q main" "Breakpoint.*at.*"
|
||||
gdb_test_no_output "set \$bpnummain = \$bpnum"
|
||||
|
||||
gdb_test \
|
||||
@@ -873,7 +873,7 @@ proc_with_prefix if_commands_test {} {
|
||||
|
||||
set test "if_commands_test 1"
|
||||
gdb_test_no_prompt "if \$tem == 2" { >} $test
|
||||
gdb_test_no_prompt "break main" { >} $test
|
||||
gdb_test_no_prompt "break -q main" { >} $test
|
||||
gdb_test_no_prompt "else" { >} $test
|
||||
gdb_test_no_prompt "break factorial" { >} $test
|
||||
gdb_test_no_prompt "commands" { >} $test
|
||||
@@ -899,7 +899,7 @@ proc_with_prefix if_commands_test {} {
|
||||
|
||||
set test "if_commands_test 2"
|
||||
gdb_test_no_prompt "if \$tem == 1" { >} $test
|
||||
gdb_test_no_prompt "break main" { >} $test
|
||||
gdb_test_no_prompt "break -q main" { >} $test
|
||||
gdb_test_no_prompt "else" { >} $test
|
||||
gdb_test_no_prompt "break factorial" { >} $test
|
||||
gdb_test_no_prompt "commands" { >} $test
|
||||
|
||||
@@ -45,7 +45,7 @@ set bp_location17 [gdb_get_line_number "set breakpoint 17 here" $srcfile2]
|
||||
#
|
||||
# test break at function
|
||||
#
|
||||
gdb_test "break main" \
|
||||
gdb_test "break -q main" \
|
||||
"Breakpoint.*at.* file .*$srcfile, line.*" \
|
||||
"breakpoint function"
|
||||
|
||||
@@ -182,9 +182,9 @@ gdb_test_multiple "continue" "run until breakpoint at marker2" {
|
||||
}
|
||||
|
||||
# Test combinations of conditional and thread-specific breakpoints.
|
||||
gdb_test "break main if (1==1) thread 999" \
|
||||
gdb_test "break -q main if (1==1) thread 999" \
|
||||
"Unknown thread 999\\."
|
||||
gdb_test "break main thread 999 if (1==1)" \
|
||||
gdb_test "break -q main thread 999 if (1==1)" \
|
||||
"Unknown thread 999\\."
|
||||
|
||||
# Verify that both if and thread can be distinguished from a breakpoint
|
||||
|
||||
@@ -95,7 +95,7 @@ gdb_test "ptype enum colors" "type = enum colors \{yellow, purple, pink\}.*" "pt
|
||||
#
|
||||
gdb_test "ptype boolean" "type = enum (boolean |)\{FALSE, TRUE\}.*" "ptype unnamed typedef'd enumeration"
|
||||
|
||||
gdb_test "list main" ".*"
|
||||
gdb_test "list -q main" ".*"
|
||||
|
||||
# Same thing with struct and union.
|
||||
gdb_test "ptype t_struct3" "type = struct (t_struct3 |)\{.*
|
||||
|
||||
@@ -179,7 +179,7 @@ with_test_prefix "command abbreviations in define" {
|
||||
-re "Type commands for definition of \"breakmain\".\r\nEnd with a line saying just \"end\".\r\n>$" {
|
||||
pass "$test"
|
||||
set test "send body of breakmain"
|
||||
gdb_test_multiple "break main\ncommand\necho\nend\nend" "$test" {
|
||||
gdb_test_multiple "break -q main\ncommand\necho\nend\nend" "$test" {
|
||||
-re "$gdb_prompt $"\
|
||||
{pass "$test"}
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ proc test_delete_alias { alias } {
|
||||
# Now, insert a breakpoint at an easy location, and then remove it
|
||||
# using $alias. We verified that the removal worked by checking
|
||||
# the list of breakpoints.
|
||||
gdb_test "break main" \
|
||||
gdb_test "break -q main" \
|
||||
"Breakpoint.*at.* file .*$srcfile, line.*" \
|
||||
"breakpoint insertion ($alias)"
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ save_vars { GDBFLAGS } {
|
||||
clean_restart ${executable}
|
||||
}
|
||||
|
||||
if ![runto main] {
|
||||
if ![runto_main] {
|
||||
fail "can't run to main"
|
||||
return -1
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
|
||||
set bp_location1 [gdb_get_line_number "set breakpoint 1 here"]
|
||||
set dp_location1 [gdb_get_line_number "set dprintf 1 here"]
|
||||
|
||||
if ![runto main] {
|
||||
if ![runto_main] {
|
||||
return -1
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ proc restart {} {
|
||||
|
||||
clean_restart $binfile
|
||||
|
||||
if ![runto main] {
|
||||
if ![runto_main] {
|
||||
return -1
|
||||
}
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ if { [gdb_breakpoint [standard_output_file tmp-${srcfile}]:${line} {no-message}]
|
||||
fail $msg
|
||||
}
|
||||
|
||||
gdb_test "break main" \
|
||||
gdb_test "break -q main" \
|
||||
"Breakpoint.*at.*line.*" "set breakpoint at main - built absolute"
|
||||
|
||||
set msg "set breakpoint by full path after loading symbols - built absolute"
|
||||
@@ -86,7 +86,7 @@ if { [gdb_breakpoint [standard_output_file tmp-${srcfile}]:${line} {no-message}]
|
||||
fail $msg
|
||||
}
|
||||
|
||||
gdb_test "break main" \
|
||||
gdb_test "break -q main" \
|
||||
"Breakpoint.*at.*line.*" "set breakpoint at main - built relative"
|
||||
|
||||
set msg "set breakpoint by full path after loading symbols - built relative"
|
||||
@@ -119,7 +119,7 @@ if { [gdb_breakpoint [standard_output_file tmp-${srcfile}]:${line} {no-message}]
|
||||
fail $msg
|
||||
}
|
||||
|
||||
gdb_test "break main" \
|
||||
gdb_test "break -q main" \
|
||||
"Breakpoint.*at.*line.*" "set breakpoint at main - built other"
|
||||
|
||||
set msg "set breakpoint by full path after loading symbols - built other"
|
||||
|
||||
@@ -36,7 +36,7 @@ if { [prepare_for_testing "failed to prepare" $testfile $testfile.c {debug}] } {
|
||||
}
|
||||
|
||||
|
||||
if { ![runto main] } then {
|
||||
if { ![runto_main] } then {
|
||||
fail "run to main"
|
||||
return
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ if [target_info exists gdb,no_hardware_watchpoints] {
|
||||
gdb_test_no_output "set can-use-hw-watchpoints 0" ""
|
||||
}
|
||||
|
||||
if { ![runto main] } then {
|
||||
if { ![runto_main] } then {
|
||||
fail "run to main"
|
||||
return
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ if { [do_compile {-mcpu=native}] != ""
|
||||
|
||||
clean_restart ${binfile}
|
||||
|
||||
if { ![runto main] } {
|
||||
if { ![runto_main] } {
|
||||
fail "runto main"
|
||||
return -1
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ if {$is_target_remote} {
|
||||
set cant_insert_hbreak 0
|
||||
set supports_hbreak 0
|
||||
set test "probe hbreak support"
|
||||
gdb_test_multiple "hbreak main" $test {
|
||||
gdb_test_multiple "hbreak -q main" $test {
|
||||
-re "No hardware breakpoint support in the target.*$gdb_prompt $" {
|
||||
pass $test
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ delete_breakpoints
|
||||
|
||||
set supports_hbreak 0
|
||||
set test "probe hardware breakpoint support"
|
||||
gdb_test_multiple "hbreak main" $test {
|
||||
gdb_test_multiple "hbreak -q main" $test {
|
||||
-re "No hardware breakpoint support in the target.*$gdb_prompt $" {
|
||||
pass $test
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ delete_breakpoints
|
||||
#
|
||||
# Test whether the target supports hardware breakpoints at all.
|
||||
#
|
||||
gdb_test_multiple "hbreak main" "hardware breakpoint support" {
|
||||
gdb_test_multiple "hbreak -q main" "hardware breakpoint support" {
|
||||
-re "No hardware breakpoint support in the target.*$gdb_prompt $" {
|
||||
unsupported "hardware breakpoints"
|
||||
return
|
||||
@@ -63,7 +63,7 @@ delete_breakpoints
|
||||
#
|
||||
# Test break at function.
|
||||
#
|
||||
gdb_test "hbreak main" \
|
||||
gdb_test "hbreak -q main" \
|
||||
"Hardware assisted breakpoint.*at.* file .*$srcfile, line.*" \
|
||||
"hardware breakpoint function"
|
||||
delete_breakpoints
|
||||
@@ -95,7 +95,7 @@ set bp_location1 [gdb_get_line_number "set breakpoint 1 here"]
|
||||
# it's wherever the processor was stopped when we connected to the
|
||||
# board. So, to be sure, we do a list command.
|
||||
#
|
||||
gdb_test "list main" \
|
||||
gdb_test "list -q main" \
|
||||
".*main \\(int argc, char ..argv, char ..envp\\).*" \
|
||||
"use `list' to establish default source file"
|
||||
gdb_test "hbreak $bp_location1" \
|
||||
@@ -145,7 +145,7 @@ delete_breakpoints
|
||||
#
|
||||
# Run until the breakpoint at main is hit. For non-stubs-using targets.
|
||||
#
|
||||
gdb_test "hbreak main" \
|
||||
gdb_test "hbreak -q main" \
|
||||
"Hardware assisted breakpoint.*at.* file .*$srcfile, line.*" \
|
||||
"hardware breakpoint function (2)"
|
||||
gdb_run_cmd
|
||||
@@ -233,7 +233,7 @@ delete_breakpoints
|
||||
# Test temporary breakpoint at function.
|
||||
#
|
||||
|
||||
gdb_test "thbreak main" \
|
||||
gdb_test "thbreak -q main" \
|
||||
"Hardware assisted breakpoint.*at.* file .*$srcfile, line.*" \
|
||||
"temporary hardware breakpoint function"
|
||||
delete_breakpoints
|
||||
@@ -520,7 +520,7 @@ delete_breakpoints
|
||||
#
|
||||
# Test break at function.
|
||||
#
|
||||
gdb_test "hbreak main" \
|
||||
gdb_test "hbreak -q main" \
|
||||
"Hardware assisted breakpoint.*at.* file .*, line.*" \
|
||||
"hardware breakpoint function, optimized file"
|
||||
|
||||
|
||||
@@ -42,11 +42,11 @@ gdb_test_no_output "set confirm off"
|
||||
# Test inserting a hw breakpoint first, then a sw breakpoint at the
|
||||
# same address.
|
||||
with_test_prefix "hw-sw" {
|
||||
gdb_test "hbreak main" \
|
||||
gdb_test "hbreak -q main" \
|
||||
"Hardware assisted breakpoint .* at .*" \
|
||||
"hbreak"
|
||||
|
||||
gdb_test "break main" \
|
||||
gdb_test "break -q main" \
|
||||
"Note: breakpoint .* also set at .*\r\nBreakpoint .* at .*" \
|
||||
"break"
|
||||
|
||||
@@ -61,11 +61,11 @@ with_test_prefix "hw-sw" {
|
||||
# Now the opposite: test inserting a sw breakpoint first, then a hw
|
||||
# breakpoint at the same address.
|
||||
with_test_prefix "sw-hw" {
|
||||
gdb_test "break main" \
|
||||
gdb_test "break -q main" \
|
||||
"Breakpoint .* at .*" \
|
||||
"break"
|
||||
|
||||
gdb_test "hbreak main" \
|
||||
gdb_test "hbreak -q main" \
|
||||
"Note: breakpoint .* also set at .*\r\nHardware assisted breakpoint .* at .*" \
|
||||
"hbreak"
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
|
||||
|
||||
gdb_test_no_output "set listsize 1"
|
||||
|
||||
gdb_test "list main" ".*"
|
||||
gdb_test "list -q main" ".*"
|
||||
get_debug_format
|
||||
set non_dwarf [expr ! [test_debug_format "DWARF 2"]]
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ if [prepare_for_testing "failed to prepare for testing" \
|
||||
# Pretend there's no terminal.
|
||||
gdb_test_no_output "set interactive-mode off"
|
||||
|
||||
if ![runto main] {
|
||||
if ![runto_main] {
|
||||
fail "can't run to main"
|
||||
return -1
|
||||
}
|
||||
|
||||
@@ -29,11 +29,11 @@ if {![runto_main]} {
|
||||
return -1
|
||||
}
|
||||
|
||||
gdb_test "break here" \
|
||||
gdb_test "break -q here" \
|
||||
"Breakpoint.*at.*" \
|
||||
"breakpoint here"
|
||||
|
||||
gdb_test "break main:there" \
|
||||
gdb_test "break -q main:there" \
|
||||
"Breakpoint.*at.*" \
|
||||
"breakpoint there"
|
||||
|
||||
|
||||
@@ -90,7 +90,7 @@ clean_restart ${binfile}
|
||||
# Any command that causes GDB to read the debugging info for the
|
||||
# lineinc.c compilation unit will do here.
|
||||
set test_name "tolerate macro info with multiple #inclusions per line"
|
||||
gdb_test_multiple "break main" $test_name {
|
||||
gdb_test_multiple "break -q main" $test_name {
|
||||
-re "Breakpoint 1 at 0x.*: file .*lineinc.c.*\\.\r\n${gdb_prompt}" {
|
||||
pass $test_name
|
||||
}
|
||||
|
||||
@@ -195,16 +195,16 @@ proc test_list_function {} {
|
||||
# gcc appears to generate incorrect debugging information for code
|
||||
# in include files, which breaks this test.
|
||||
# SunPRO cc is the second case below, it's also correct.
|
||||
gdb_test "list main" "(5\[ \t\]+int x;.*8\[ \t\]+foo \[(\]+.*\[)\]+;|1\[ \t\]+#include .*7\[ \t\]+x = 0;)" "list function in source file 1"
|
||||
gdb_test "list -q main" "(5\[ \t\]+int x;.*8\[ \t\]+foo \[(\]+.*\[)\]+;|1\[ \t\]+#include .*7\[ \t\]+x = 0;)" "list function in source file 1"
|
||||
|
||||
# Ultrix gdb takes the second case below; it's also correct.
|
||||
# SunPRO cc is the third case.
|
||||
gdb_test "list bar" "(4\[ \t\]+void.*\[ \t\]*long_line.*;.*bar.*9\[ \t\]*.*|1\[ \t\]+void.*8\[ \t\]+\}|1\[ \t\]+void.*7\[ \t\]*long_line ..;|7\[ \t\]+void.*14\[ \t\]+\})" "list function in source file 2"
|
||||
gdb_test "list -q bar" "(4\[ \t\]+void.*\[ \t\]*long_line.*;.*bar.*9\[ \t\]*.*|1\[ \t\]+void.*8\[ \t\]+\}|1\[ \t\]+void.*7\[ \t\]*long_line ..;|7\[ \t\]+void.*14\[ \t\]+\})" "list function in source file 2"
|
||||
|
||||
# Test "list function" for C include file
|
||||
# Ultrix gdb is the second case, still correct.
|
||||
# SunPRO cc is the third case.
|
||||
gdb_test "list foo" "(3\[ \t\]+.*12\[ \t\]+bar \[(\]+.*\[)\]+;|2\[ \t\]+including file.*11\[ \t\]+bar \[(\]+.*\[)\]+;|1\[ \t\]+/. An include file.*10\[ \t\]+bar \[(\]+.*\[)\]+;)" "list function in include file"
|
||||
gdb_test "list -q foo" "(3\[ \t\]+.*12\[ \t\]+bar \[(\]+.*\[)\]+;|2\[ \t\]+including file.*11\[ \t\]+bar \[(\]+.*\[)\]+;|1\[ \t\]+/. An include file.*10\[ \t\]+bar \[(\]+.*\[)\]+;)" "list function in include file"
|
||||
}
|
||||
|
||||
proc test_list_forward {} {
|
||||
|
||||
@@ -193,7 +193,7 @@ proc list_and_check_macro {func macro expected} {
|
||||
return [check_macro $macro $expected "after `list $func'"]
|
||||
}
|
||||
|
||||
gdb_test "list main" ".*main.*" "list main for support check"
|
||||
gdb_test "list -q main" ".*main.*" "list main for support check"
|
||||
set macro_support "unknown"
|
||||
gdb_test_multiple "info source" "test macro information" {
|
||||
-re "Includes preprocessor macro info\..*$gdb_prompt $" {
|
||||
|
||||
@@ -23,7 +23,7 @@ if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
|
||||
return -1
|
||||
}
|
||||
|
||||
runto main
|
||||
runto_main
|
||||
|
||||
# Delete all target-supplied memory regions.
|
||||
delete_memory_regions
|
||||
|
||||
@@ -102,7 +102,7 @@ gdb_test "info break" \
|
||||
|
||||
set mainline [gdb_get_line_number "break main here"]
|
||||
|
||||
gdb_test "break main" \
|
||||
gdb_test "break -q main" \
|
||||
"Breakpoint.*at.* file .*$srcfile, line $mainline.*" \
|
||||
"breakpoint function"
|
||||
|
||||
|
||||
@@ -21,6 +21,6 @@ if { [prepare_for_testing "failed to prepare" ${testfile}] } {
|
||||
|
||||
set bp_main [gdb_get_line_number "break main" ${testfile}.h]
|
||||
|
||||
gdb_test "break main" \
|
||||
gdb_test "break -q main" \
|
||||
"Breakpoint.*at.* file .*$testfile.h, line $bp_main\\." \
|
||||
"breakpoint main"
|
||||
|
||||
@@ -116,7 +116,7 @@ if {!$gcc_compiled} {
|
||||
}
|
||||
|
||||
# For get_debug_format to do its job, we need to have a current source file.
|
||||
gdb_test "list main" ".*"
|
||||
gdb_test "list -q main" ".*"
|
||||
get_debug_format
|
||||
gdb_test "whatis v_boolean" "type = (enum |)boolean" \
|
||||
"whatis unnamed typedef'd enum (compiler bug in IBM's xlc)"
|
||||
|
||||
@@ -81,14 +81,14 @@ if { $gdb_file_cmd_debug_info != "debug" } then {
|
||||
#
|
||||
# test break at function
|
||||
#
|
||||
gdb_test "break main" \
|
||||
gdb_test "break -q main" \
|
||||
"Breakpoint.*at.* file .*$srcfile, line.*" \
|
||||
"breakpoint function"
|
||||
|
||||
#
|
||||
# test break at quoted function
|
||||
#
|
||||
gdb_test "break \"marker2\"" \
|
||||
gdb_test "break -q \"marker2\"" \
|
||||
"Breakpoint.*at.* file .*$srcfile, line.*" \
|
||||
"breakpoint quoted function"
|
||||
|
||||
@@ -110,7 +110,7 @@ set bp_location1 [gdb_get_line_number "set breakpoint 1 here"]
|
||||
# it's wherever the processor was stopped when we connected to the
|
||||
# board. So, to be sure, we do a list command.
|
||||
#
|
||||
gdb_test "list main" \
|
||||
gdb_test "list -q main" \
|
||||
".*main \\(int argc, char \\*\\*argv, char \\*\\*envp\\).*" \
|
||||
"use `list' to establish default source file"
|
||||
gdb_test "break $bp_location1" \
|
||||
@@ -227,7 +227,7 @@ delete_breakpoints
|
||||
# test temporary breakpoint at function
|
||||
#
|
||||
|
||||
gdb_test "tbreak main" "Temporary breakpoint.*at.* file .*$srcfile, line.*" "temporary breakpoint function"
|
||||
gdb_test "tbreak -q main" "Temporary breakpoint.*at.* file .*$srcfile, line.*" "temporary breakpoint function"
|
||||
|
||||
#
|
||||
# test break at function in file
|
||||
@@ -569,7 +569,7 @@ proc test_different_dir {type test_different_dir xfail} {
|
||||
if {$xfail} {
|
||||
setup_xfail "*-*-*"
|
||||
}
|
||||
gdb_test "break main" \
|
||||
gdb_test "break -q main" \
|
||||
"Breakpoint.*at.* file .*$srcfile, line.*" \
|
||||
"breakpoint function, optimized file"
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
|
||||
return -1
|
||||
}
|
||||
|
||||
gdb_test "break main" \
|
||||
gdb_test "break -q main" \
|
||||
"Breakpoint.*at.* file .*$srcfile, line .*"
|
||||
|
||||
# Try deleting all breakpoints, using the "server" command prefix.
|
||||
|
||||
@@ -76,7 +76,7 @@ proc setup { syscall } {
|
||||
|
||||
clean_restart $testfile
|
||||
|
||||
if { ![runto main] } then {
|
||||
if { ![runto_main] } then {
|
||||
fail "run to main ($syscall)"
|
||||
return -1
|
||||
}
|
||||
@@ -317,7 +317,7 @@ step_over_syscall "clone"
|
||||
|
||||
set testfile "step-over-fork"
|
||||
clean_restart $testfile
|
||||
if { ![runto main] } then {
|
||||
if { ![runto_main] } then {
|
||||
fail "run to main"
|
||||
return -1
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ save_vars { env(TERM) } {
|
||||
"frame without styling"
|
||||
gdb_test_no_output "set style sources on"
|
||||
|
||||
gdb_test "break main" "file $base_file_expr.*"
|
||||
gdb_test "break -q main" "file $base_file_expr.*"
|
||||
|
||||
gdb_test "print &main" " = .* [style $hex address] <$main_expr>"
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
# Exploit formerly failed assertion in scan_dyntag when it got called for
|
||||
# objfile having ".dynamic" section but without having data loaded in target.
|
||||
# Such file is ${binmainfile} through add-symbol-file here. Set context first
|
||||
# by "list main" to have some local BLOCK set in lookup_symbol_global.
|
||||
# by "list -q main" to have some local BLOCK set in lookup_symbol_global.
|
||||
|
||||
standard_testfile start.c .c
|
||||
set binlibfile ${testfile}.x
|
||||
@@ -35,5 +35,5 @@ gdb_test "add-symbol-file [standard_output_file ${testfile}] 0" \
|
||||
"Reading symbols from .*" \
|
||||
"add-symbol-file" \
|
||||
"add symbol table from file \".*\" at.*\\(y or n\\) " "y"
|
||||
gdb_test "list main"
|
||||
gdb_test "list -q main"
|
||||
gdb_test "print symbol_without_target_section"
|
||||
|
||||
@@ -47,7 +47,7 @@ gdb_breakpoint "foo"
|
||||
gdb_breakpoint "bar"
|
||||
|
||||
set cmds [multi_line_input \
|
||||
"break main" \
|
||||
"break -qualified main" \
|
||||
" commands" \
|
||||
" print 1" \
|
||||
" end" \
|
||||
|
||||
@@ -33,7 +33,7 @@ proc test_watchpoint { hw } {
|
||||
|
||||
clean_restart ${testfile}
|
||||
|
||||
if { ![runto main] } then {
|
||||
if { ![runto_main] } then {
|
||||
fail "run to main"
|
||||
return
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
|
||||
return -1
|
||||
}
|
||||
|
||||
if { ![runto main] } then {
|
||||
if { ![runto_main] } then {
|
||||
fail "run to main"
|
||||
return
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ proc test_watchpoint_across_vfork { hw teststr } {
|
||||
|
||||
clean_restart ${testfile}
|
||||
|
||||
if { ![runto main] } then {
|
||||
if { ![runto_main] } then {
|
||||
fail "run to main ($teststr)"
|
||||
return
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executab
|
||||
|
||||
clean_restart ${binfile}
|
||||
|
||||
if { ![runto main] } then {
|
||||
if { ![runto_main] } then {
|
||||
fail "run to main"
|
||||
return
|
||||
}
|
||||
|
||||
@@ -118,7 +118,7 @@ proc build_cmds_list {} {
|
||||
}
|
||||
|
||||
set test "hbreak"
|
||||
gdb_test_multiple "hbreak main" $test {
|
||||
gdb_test_multiple "hbreak -q main" $test {
|
||||
-re "You may have requested too many.*$gdb_prompt $" {
|
||||
unsupported $test
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
|
||||
return -1
|
||||
}
|
||||
|
||||
if { ![runto main] } then {
|
||||
if { ![runto_main] } then {
|
||||
fail "run to main"
|
||||
return
|
||||
}
|
||||
@@ -134,7 +134,7 @@ proc test {always_inserted} {
|
||||
|
||||
clean_restart $binfile
|
||||
|
||||
if { ![runto main] } then {
|
||||
if { ![runto_main] } then {
|
||||
fail "run to main"
|
||||
return
|
||||
}
|
||||
|
||||
@@ -73,7 +73,7 @@ gdb_test_multiple "info breakpoints" $name {
|
||||
}
|
||||
}
|
||||
|
||||
gdb_test "tbreak main" "Temporary breakpoint 4.*" \
|
||||
gdb_test "tbreak -q main" "Temporary breakpoint 4.*" \
|
||||
"Set temporary breakpoint at main"
|
||||
|
||||
set ok 0
|
||||
|
||||
@@ -45,4 +45,4 @@ gdb_test "file $binfile" \
|
||||
"file $testfile"
|
||||
|
||||
# Now check that we can still break given the minimal symbol.
|
||||
gdb_test "break main" "Breakpoint $decimal.*"
|
||||
gdb_test "break -q main" "Breakpoint $decimal.*"
|
||||
|
||||
@@ -37,7 +37,7 @@ if {[gdb_compile "$objfile $objfile2" $binfile executable {debug}] != "" } {
|
||||
|
||||
clean_restart $binfile
|
||||
|
||||
gdb_test "break main" "Breakpoint .*"
|
||||
gdb_test "break -q main" "Breakpoint .*"
|
||||
|
||||
# Bug 15691: gdb would crash here on an assert violation.
|
||||
# The debug info for the TU for "struct s" has already been read,
|
||||
|
||||
@@ -45,7 +45,7 @@ gdb_test_no_output "set debug-file-directory [file dirname $binfile]" \
|
||||
"set debug-file-directory"
|
||||
gdb_load $binfile
|
||||
|
||||
gdb_test "break main" "Breakpoint.*at.*"
|
||||
gdb_test "break -q main" "Breakpoint.*at.*"
|
||||
|
||||
gdb_test "ptype baz" "type = class foo {.*"
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \
|
||||
return -1
|
||||
}
|
||||
|
||||
gdb_test "break main" "Breakpoint.*at.*"
|
||||
gdb_test "break -q main" "Breakpoint.*at.*"
|
||||
|
||||
# If we get this far gdb didn't crash.
|
||||
pass $testfile
|
||||
|
||||
@@ -43,7 +43,7 @@ proc test_bkpt_basic { } {
|
||||
gdb_scm_test_silent_cmd "guile (define blist (breakpoints))" \
|
||||
"get breakpoint list 1"
|
||||
gdb_test "guile (print (car blist))" \
|
||||
"<gdb:breakpoint #1 BP_BREAKPOINT enabled noisy hit:1 ignore:0 @main>" \
|
||||
"<gdb:breakpoint #1 BP_BREAKPOINT enabled noisy hit:1 ignore:0 @-qualified main>" \
|
||||
"check main breakpoint"
|
||||
gdb_test "guile (print (breakpoint-location (car blist)))" \
|
||||
"main" "check main breakpoint location"
|
||||
|
||||
@@ -24,7 +24,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
|
||||
# Skip all tests if Guile scripting is not enabled.
|
||||
if { [skip_guile_tests] } { continue }
|
||||
|
||||
if ![runto main] {
|
||||
if ![runto_main] {
|
||||
fail "can't run to main"
|
||||
return
|
||||
}
|
||||
|
||||
@@ -584,7 +584,7 @@ namespace eval $testfile {
|
||||
gdb_load [standard_output_file $exefile]
|
||||
|
||||
set tst "condition_command overrides explicit linespec condition"
|
||||
if {![runto main]} {
|
||||
if {![runto_main]} {
|
||||
fail $tst
|
||||
} else {
|
||||
if {![gdb_breakpoint "-func myfunction if arg == 1"]} {
|
||||
@@ -611,15 +611,15 @@ namespace eval $testfile {
|
||||
|
||||
# Test explicit "ranges." Make sure that using explicit
|
||||
# locations doesn't alter the expected outcome.
|
||||
gdb_test "list main" ".*" "list main 1"
|
||||
gdb_test "list -q main" ".*" "list main 1"
|
||||
set list_result [capture_command_output "list -,+" ""]
|
||||
gdb_test "list main" ".*" "list main 2"
|
||||
gdb_test "list -q main" ".*" "list main 2"
|
||||
gdb_test "list -line -,-line +" [string_to_regexp $list_result]
|
||||
|
||||
# Ditto for the reverse (except that no output is expected).
|
||||
gdb_test "list myfunction" ".*" "list myfunction 1"
|
||||
gdb_test "list -q myfunction" ".*" "list myfunction 1"
|
||||
gdb_test_no_output "list +,-"
|
||||
gdb_test "list myfunction" ".*" "list myfunction 2"
|
||||
gdb_test "list -q myfunction" ".*" "list myfunction 2"
|
||||
gdb_test_no_output "list -line +, -line -"
|
||||
}
|
||||
|
||||
|
||||
@@ -213,6 +213,6 @@ gdb_test "file $binfile" \
|
||||
"Reading symbols from .*" \
|
||||
"set the new inferior file for linespec tests"
|
||||
|
||||
gdb_test "break main" \
|
||||
"Breakpoint \[0-9\]+ at $hex: main. .2 locations." \
|
||||
gdb_test "break -q main" \
|
||||
"Breakpoint \[0-9\]+ at $hex: -qualified main. .2 locations." \
|
||||
"set breakpoint at main in both inferiors"
|
||||
|
||||
@@ -25,11 +25,6 @@
|
||||
load_lib mi-support.exp
|
||||
set MIFLAGS "-i=mi"
|
||||
|
||||
gdb_exit
|
||||
if [mi_gdb_start] {
|
||||
continue
|
||||
}
|
||||
|
||||
standard_testfile basics.c
|
||||
|
||||
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
|
||||
@@ -103,8 +98,12 @@ proc register_tests { } {
|
||||
}
|
||||
}
|
||||
|
||||
mi_clean_restart $binfile
|
||||
|
||||
register_tests_no_exec
|
||||
mi_run_to_main
|
||||
|
||||
mi_runto_main
|
||||
|
||||
register_tests
|
||||
|
||||
mi_gdb_exit
|
||||
|
||||
@@ -20,11 +20,6 @@
|
||||
load_lib mi-support.exp
|
||||
set MIFLAGS "-i=mi"
|
||||
|
||||
gdb_exit
|
||||
if {[mi_gdb_start]} {
|
||||
continue
|
||||
}
|
||||
|
||||
#
|
||||
# Start here
|
||||
#
|
||||
@@ -35,7 +30,8 @@ if {[gdb_compile_pthreads "$srcdir/$subdir/$srcfile" $binfile executable $option
|
||||
return -1
|
||||
}
|
||||
|
||||
mi_run_to_main
|
||||
mi_clean_restart $binfile
|
||||
mi_runto_main
|
||||
check_mi_and_console_threads "at main"
|
||||
|
||||
for {set i 0} {$i < 4} {incr i} {
|
||||
|
||||
@@ -20,11 +20,6 @@
|
||||
load_lib mi-support.exp
|
||||
set MIFLAGS "-i=mi"
|
||||
|
||||
gdb_exit
|
||||
if [mi_gdb_start] {
|
||||
continue
|
||||
}
|
||||
|
||||
standard_testfile
|
||||
|
||||
if {[gdb_compile $srcdir/$subdir/$srcfile $binfile executable debug] != ""} {
|
||||
@@ -40,7 +35,8 @@ if {[gdb_compile $srcdir/$subdir/$srcfile $binfile executable debug] != ""} {
|
||||
# If it doesn't, Bad Things Happen(TM).
|
||||
|
||||
# Run to main
|
||||
mi_run_to_main
|
||||
mi_clean_restart $binfile
|
||||
mi_runto_main
|
||||
|
||||
# Step over "foo = 0"
|
||||
mi_next "step over \"foo = 0\""
|
||||
|
||||
@@ -13,20 +13,14 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#
|
||||
# test gdb/792
|
||||
#
|
||||
# Test that children of classes are properly reported. Regression
|
||||
# test for gdb/792.
|
||||
|
||||
if { [skip_cplus_tests] } { continue }
|
||||
|
||||
load_lib mi-support.exp
|
||||
set MIFLAGS "-i=mi"
|
||||
|
||||
gdb_exit
|
||||
if [mi_gdb_start] {
|
||||
continue
|
||||
}
|
||||
|
||||
standard_testfile .cc
|
||||
|
||||
if [get_compiler_info "c++"] {
|
||||
@@ -38,10 +32,9 @@ if {[gdb_compile $srcdir/$subdir/$srcfile $binfile executable {debug c++}] != ""
|
||||
return -1
|
||||
}
|
||||
|
||||
# Test that children of classes are properly reported
|
||||
mi_clean_restart $binfile
|
||||
|
||||
# Run to main
|
||||
mi_run_to_main
|
||||
mi_runto_main
|
||||
|
||||
mi_create_varobj "var1" "a" "create var for class A"
|
||||
|
||||
|
||||
@@ -272,7 +272,7 @@ proc test_breakpoint_commands {} {
|
||||
"\\^done,[mi_make_breakpoint_table [list $bp_no_script]]" \
|
||||
"breakpoint commands: check that commands are cleared"
|
||||
|
||||
mi_run_to_main
|
||||
mi_runto_main
|
||||
|
||||
mi_create_breakpoint "basics.c:callee2" \
|
||||
"breakpoint commands: insert breakpoint at basics.c:callee2, again" \
|
||||
|
||||
@@ -46,15 +46,13 @@ if { [gdb_compile $srcdir/$subdir/$srcfile $binfile executable $exec_opts] != ""
|
||||
proc test_insert_delete_modify { } {
|
||||
global mi_gdb_prompt
|
||||
global lib_sl1 lib_sl2
|
||||
global binfile
|
||||
|
||||
gdb_exit
|
||||
if [mi_gdb_start] {
|
||||
continue
|
||||
}
|
||||
mi_clean_restart $binfile
|
||||
|
||||
mi_load_shlibs $lib_sl1 $lib_sl2
|
||||
|
||||
mi_run_to_main
|
||||
mi_runto_main
|
||||
|
||||
mi_gdb_test "break marker" \
|
||||
{(&.*)*.*~"Breakpoint 2 at.*\\n".*=breakpoint-created,bkpt=\{number="2",type="breakpoint".*\}.*\n\^done}
|
||||
|
||||
@@ -53,15 +53,12 @@ proc make_breakpoints_pattern { expect_fixed_output bp_num loc1_en loc2_en } {
|
||||
proc do_test { mi_version use_fix_flag expect_fixed_output } {
|
||||
with_test_prefix "mi_version=${mi_version}" {
|
||||
with_test_prefix "use_fix_flag=${use_fix_flag}" {
|
||||
global MIFLAGS decimal
|
||||
global MIFLAGS decimal binfile
|
||||
set MIFLAGS "-i=mi${mi_version}"
|
||||
|
||||
gdb_exit
|
||||
if {[mi_gdb_start]} {
|
||||
return
|
||||
}
|
||||
mi_clean_restart $binfile
|
||||
|
||||
mi_run_to_main
|
||||
mi_runto_main
|
||||
|
||||
if $use_fix_flag {
|
||||
mi_gdb_test "-fix-multi-location-breakpoint-output" "\\^done" \
|
||||
|
||||
@@ -27,13 +27,8 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
|
||||
return -1
|
||||
}
|
||||
|
||||
if [mi_gdb_start] {
|
||||
continue
|
||||
}
|
||||
mi_delete_breakpoints
|
||||
mi_gdb_reinitialize_dir $srcdir/$subdir
|
||||
mi_gdb_load ${binfile}
|
||||
if {![mi_run_to_main]} {
|
||||
mi_clean_restart $binfile
|
||||
if {[mi_runto_main] < 0} {
|
||||
return -1
|
||||
}
|
||||
set libstdcxx_probe_tests_supported [expr ![mi_skip_libstdcxx_probe_tests]]
|
||||
@@ -59,7 +54,7 @@ proc restart_for_test {} {
|
||||
mi_gdb_reinitialize_dir $srcdir/$subdir
|
||||
mi_gdb_load ${binfile}
|
||||
|
||||
mi_runto main
|
||||
mi_runto_main
|
||||
|
||||
mi_create_breakpoint \
|
||||
"$srcfile:${main_lineno}" "break before exiting program" \
|
||||
|
||||
@@ -18,11 +18,6 @@ if {[skip_shlib_tests]} {
|
||||
return -1
|
||||
}
|
||||
|
||||
gdb_exit
|
||||
if [mi_gdb_start] {
|
||||
continue
|
||||
}
|
||||
|
||||
if {[get_compiler_info]} {
|
||||
warning "Could not get compiler info"
|
||||
untested "no compiler info"
|
||||
@@ -44,7 +39,9 @@ if { [gdb_compile_shlib "${srcdir}/${subdir}/${srcfile2}" ${binfile2} {debug}] !
|
||||
untested "failed to compile shared library"
|
||||
return -1
|
||||
}
|
||||
mi_run_to_main
|
||||
|
||||
mi_clean_restart $binfile
|
||||
mi_runto_main
|
||||
|
||||
# test -catch-load
|
||||
mi_gdb_test "111-gdb-set auto-solib-add on" "111\\^done" "catch-load: auto-solib-add on"
|
||||
@@ -66,13 +63,8 @@ gdb_expect {
|
||||
}
|
||||
}
|
||||
|
||||
mi_gdb_exit
|
||||
|
||||
|
||||
if [mi_gdb_start] {
|
||||
continue
|
||||
}
|
||||
mi_run_to_main
|
||||
mi_clean_restart $binfile
|
||||
mi_runto_main
|
||||
|
||||
# test -catch-unload
|
||||
mi_gdb_test "111-gdb-set auto-solib-add on" "111\\^done" "catch-unload: auto-solib-add on"
|
||||
|
||||
@@ -22,11 +22,6 @@
|
||||
load_lib mi-support.exp
|
||||
set MIFLAGS "-i=mi"
|
||||
|
||||
gdb_exit
|
||||
if [mi_gdb_start] {
|
||||
continue
|
||||
}
|
||||
|
||||
standard_testfile basics.c
|
||||
|
||||
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
|
||||
@@ -34,6 +29,8 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
|
||||
return -1
|
||||
}
|
||||
|
||||
mi_clean_restart $binfile
|
||||
|
||||
mi_gdb_test "-interpreter-exec" \
|
||||
{\^error,msg="-interpreter-exec: Usage: -interpreter-exec interp command"} \
|
||||
"-interpreter-exec with no arguments"
|
||||
@@ -59,7 +56,7 @@ mi_gdb_test "-interpreter-exec console \"file $binfile\"" \
|
||||
{~"Reading symbols from .*mi-cli...\\n".*} \
|
||||
"-interpreter-exec console \"file \$binfile\""
|
||||
|
||||
mi_run_to_main
|
||||
mi_runto_main
|
||||
|
||||
set line_main_head [gdb_get_line_number "main ("]
|
||||
set line_main_body [expr $line_main_head + 2]
|
||||
|
||||
@@ -28,12 +28,11 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
|
||||
|
||||
proc test_command_param_changed { } {
|
||||
global scheduler_locking_supported
|
||||
global binfile
|
||||
|
||||
with_test_prefix "cmd param" {
|
||||
if [mi_gdb_start] {
|
||||
return
|
||||
}
|
||||
mi_run_to_main
|
||||
mi_clean_restart $binfile
|
||||
mi_runto_main
|
||||
|
||||
if { $scheduler_locking_supported } {
|
||||
foreach opt { "on" "off" "step" } {
|
||||
|
||||
@@ -19,11 +19,6 @@
|
||||
load_lib mi-support.exp
|
||||
set MIFLAGS "-i=mi"
|
||||
|
||||
gdb_exit
|
||||
if [mi_gdb_start] {
|
||||
continue
|
||||
}
|
||||
|
||||
standard_testfile .cc
|
||||
|
||||
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug c++}] != "" } {
|
||||
@@ -31,7 +26,9 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debu
|
||||
return -1
|
||||
}
|
||||
|
||||
mi_run_to_main
|
||||
mi_clean_restart $binfile
|
||||
|
||||
mi_runto_main
|
||||
|
||||
mi_gdb_test "1-complete br" \
|
||||
"1\\^done,completion=\"break\",matches=\\\[.*\"break\",.*\"break-range\".*\\\],max_completions_reached=\"0\"" \
|
||||
|
||||
@@ -58,7 +58,9 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
|
||||
return -1
|
||||
}
|
||||
|
||||
mi_run_to_main
|
||||
mi_gdb_reinitialize_dir $srcdir/$subdir
|
||||
mi_gdb_load ${binfile}
|
||||
mi_runto_main
|
||||
|
||||
# The output we get from the target depends on how it is hosted. If
|
||||
# we are semihosted (e.g., the sim or a remote target that supports
|
||||
|
||||
@@ -18,11 +18,6 @@
|
||||
load_lib mi-support.exp
|
||||
set MIFLAGS "-i=mi"
|
||||
|
||||
gdb_exit
|
||||
if [mi_gdb_start] {
|
||||
continue
|
||||
}
|
||||
|
||||
standard_testfile basics.c
|
||||
|
||||
if {[build_executable $testfile.exp $testfile $srcfile {debug}] == -1} {
|
||||
@@ -30,6 +25,7 @@ if {[build_executable $testfile.exp $testfile $srcfile {debug}] == -1} {
|
||||
return -1
|
||||
}
|
||||
|
||||
mi_run_to_main
|
||||
mi_clean_restart $binfile
|
||||
mi_runto_main
|
||||
|
||||
mi_gdb_test "-target-detach" "=thread-exited,id=\"1\".*=thread-group-exited,id=\"i1\".*" "detach"
|
||||
|
||||
@@ -23,11 +23,6 @@
|
||||
load_lib mi-support.exp
|
||||
set MIFLAGS "-i=mi"
|
||||
|
||||
gdb_exit
|
||||
if [mi_gdb_start] {
|
||||
continue
|
||||
}
|
||||
|
||||
standard_testfile basics.c
|
||||
|
||||
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
|
||||
@@ -244,7 +239,8 @@ proc test_disassembly_bogus_args {} {
|
||||
|
||||
}
|
||||
|
||||
mi_run_to_main
|
||||
mi_clean_restart $binfile
|
||||
mi_runto_main
|
||||
test_disassembly_only
|
||||
test_disassembly_with_opcodes
|
||||
test_disassembly_mixed
|
||||
|
||||
@@ -17,11 +17,6 @@
|
||||
load_lib mi-support.exp
|
||||
set MIFLAGS "-i=mi"
|
||||
|
||||
gdb_exit
|
||||
if [mi_gdb_start] {
|
||||
continue
|
||||
}
|
||||
|
||||
standard_testfile
|
||||
|
||||
if {[build_executable $testfile.exp $testfile $srcfile {debug}] == -1} {
|
||||
@@ -29,12 +24,11 @@ if {[build_executable $testfile.exp $testfile $srcfile {debug}] == -1} {
|
||||
return -1
|
||||
}
|
||||
|
||||
mi_delete_breakpoints
|
||||
|
||||
set bp_location1 [gdb_get_line_number "set breakpoint 1 here"]
|
||||
set dp_location1 [gdb_get_line_number "set dprintf 1 here"]
|
||||
|
||||
mi_run_to_main
|
||||
mi_clean_restart $binfile
|
||||
mi_runto_main
|
||||
|
||||
set i 0
|
||||
mi_gdb_test "[incr i]-dprintf-insert" \
|
||||
|
||||
@@ -16,11 +16,6 @@
|
||||
load_lib mi-support.exp
|
||||
set MIFLAGS "-i=mi"
|
||||
|
||||
gdb_exit
|
||||
if [mi_gdb_start] {
|
||||
continue
|
||||
}
|
||||
|
||||
standard_testfile
|
||||
|
||||
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
|
||||
@@ -31,6 +26,9 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debu
|
||||
proc test_list_thread_groups { } {
|
||||
global hex
|
||||
global decimal
|
||||
global binfile
|
||||
|
||||
mi_clean_restart
|
||||
|
||||
# Before any run, exit-code should not be present.
|
||||
mi_gdb_test \
|
||||
@@ -38,8 +36,10 @@ proc test_list_thread_groups { } {
|
||||
"122\\^done,groups=\\\[\{id=\"i1\",type=\"process\"\}\]" \
|
||||
"-list-thread-groups before run shows no exit-code"
|
||||
|
||||
mi_clean_restart $binfile
|
||||
|
||||
with_test_prefix "first run" {
|
||||
mi_run_to_main
|
||||
mi_runto_main
|
||||
|
||||
# During the run, exit-code should not be present.
|
||||
mi_gdb_test \
|
||||
@@ -59,7 +59,7 @@ proc test_list_thread_groups { } {
|
||||
}
|
||||
|
||||
with_test_prefix "second run" {
|
||||
mi_run_to_main
|
||||
mi_runto_main
|
||||
|
||||
# Write the exit code we want in the global var
|
||||
mi_gdb_test "set var exit_code = 8" ".*\\^done" "write exit code"
|
||||
|
||||
@@ -20,11 +20,6 @@
|
||||
load_lib mi-support.exp
|
||||
set MIFLAGS "-i=mi"
|
||||
|
||||
gdb_exit
|
||||
if [mi_gdb_start] {
|
||||
continue
|
||||
}
|
||||
|
||||
standard_testfile "mi-read-memory"
|
||||
|
||||
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}.c" "${binfile}" executable {debug}] != "" } {
|
||||
@@ -32,7 +27,8 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}.c" "${binfile}" executable {d
|
||||
return -1
|
||||
}
|
||||
|
||||
mi_run_to_main
|
||||
mi_clean_restart $binfile
|
||||
mi_runto_main
|
||||
mi_next_to "main" "" "mi-read-memory.c" "20" "next at main"
|
||||
|
||||
mi_gdb_test "1-data-write-memory-bytes"\
|
||||
|
||||
@@ -26,12 +26,9 @@ if {[prepare_for_testing "failed to prepare" ${testfile} \
|
||||
return -1
|
||||
}
|
||||
|
||||
gdb_exit
|
||||
if {[mi_gdb_start]} {
|
||||
continue
|
||||
}
|
||||
mi_clean_restart $binfile
|
||||
|
||||
mi_run_to_main
|
||||
mi_runto_main
|
||||
|
||||
|
||||
# Patterns to skip optional system modules that appear with later versions of GFortran.
|
||||
|
||||
@@ -58,17 +58,16 @@ proc breakpoint_address {bpnum} {
|
||||
# breakpoints in different functions.
|
||||
|
||||
proc_with_prefix do_floating_varobj_test {} {
|
||||
global srcfile
|
||||
global srcfile binfile
|
||||
global hex
|
||||
global expect_out
|
||||
|
||||
gdb_exit
|
||||
if {[mi_gdb_start]} then {
|
||||
if {[mi_clean_restart $binfile]} {
|
||||
fail "couldn't start gdb"
|
||||
return
|
||||
}
|
||||
|
||||
mi_run_to_main
|
||||
mi_runto_main
|
||||
|
||||
# Create a floating varobj for $pc.
|
||||
mi_gdb_test "-var-create --thread 1 --frame 0 - @ \$pc" \
|
||||
@@ -111,16 +110,15 @@ proc_with_prefix do_floating_varobj_test {} {
|
||||
# counter changes (without substantially changing the stack).
|
||||
|
||||
proc_with_prefix do_fixed_varobj_test {} {
|
||||
global srcfile
|
||||
global srcfile binfile
|
||||
global hex
|
||||
|
||||
gdb_exit
|
||||
if {[mi_gdb_start]} then {
|
||||
if {[mi_clean_restart $binfile] != 0} {
|
||||
fail "couldn't start gdb"
|
||||
return
|
||||
}
|
||||
|
||||
mi_run_to_main
|
||||
mi_runto_main
|
||||
|
||||
# Run to the function 'callee3' so we have several frames.
|
||||
mi_create_breakpoint "basics.c:callee3" \
|
||||
|
||||
@@ -45,7 +45,7 @@ if {[mi_gdb_load $binfile] < 0} {
|
||||
# When testing a cross configuration, we need to be sure to first
|
||||
# connect to the target. If we didn't do that, GDB would try running
|
||||
# the command against the default run target. The usual way to do
|
||||
# that and cover all targets is to run to main, with mi_run_to_main.
|
||||
# that and cover all targets is to run to main, with mi_runto_main.
|
||||
# However, with native configurations, -info-os should work before
|
||||
# running any program, so we want to avoid "run". Using
|
||||
# mi_gdb_target_load directly instead achieves this.
|
||||
|
||||
@@ -31,17 +31,14 @@ if {[prepare_for_testing "failed to prepare" $exefile $srcfile {debug c++}]} {
|
||||
return -1
|
||||
}
|
||||
|
||||
gdb_exit
|
||||
if {[mi_gdb_start]} {
|
||||
continue
|
||||
}
|
||||
mi_clean_restart $binfile
|
||||
|
||||
# Turn off the pending breakpoint queries.
|
||||
mi_gdb_test "-interpreter-exec console \"set breakpoint pending off\"" \
|
||||
{=cmd-param-changed,param=\"breakpoint pending\",.*\^done} \
|
||||
"-interpreter-exec console \"set breakpoint pending off\""
|
||||
|
||||
mi_run_to_main
|
||||
mi_runto_main
|
||||
|
||||
# Run to a location in the file.
|
||||
set bp_location [gdb_get_line_number "set breakpoint here"]
|
||||
|
||||
@@ -16,11 +16,6 @@
|
||||
load_lib mi-support.exp
|
||||
set MIFLAGS "-i=mi"
|
||||
|
||||
gdb_exit
|
||||
if [mi_gdb_start] {
|
||||
continue
|
||||
}
|
||||
|
||||
standard_testfile basics.c
|
||||
set opts {debug}
|
||||
|
||||
@@ -29,7 +24,9 @@ if [build_executable $testfile.exp $testfile $srcfile $opts] {
|
||||
return -1
|
||||
}
|
||||
|
||||
if {[mi_run_to_main] < 0} {
|
||||
mi_clean_restart $binfile
|
||||
|
||||
if {[mi_runto_main] < 0} {
|
||||
return -1
|
||||
}
|
||||
|
||||
|
||||
@@ -21,11 +21,6 @@ if { ![support_displaced_stepping] } {
|
||||
load_lib mi-support.exp
|
||||
set MIFLAGS "-i=mi"
|
||||
|
||||
gdb_exit
|
||||
if {[mi_gdb_start]} {
|
||||
continue
|
||||
}
|
||||
|
||||
#
|
||||
# Start here
|
||||
#
|
||||
@@ -36,14 +31,13 @@ if {[gdb_compile_pthreads "$srcdir/$subdir/$srcfile" $binfile executable $option
|
||||
return -1
|
||||
}
|
||||
|
||||
mi_gdb_reinitialize_dir $srcdir/$subdir
|
||||
mi_gdb_load $binfile
|
||||
mi_clean_restart $binfile
|
||||
|
||||
mi_gdb_test "-gdb-set non-stop 1" ".*"
|
||||
mi_gdb_test "-gdb-set mi-async 1" ".*"
|
||||
mi_detect_async
|
||||
|
||||
if { [mi_run_to_main] < 0 } {
|
||||
if { [mi_runto_main] < 0 } {
|
||||
continue
|
||||
}
|
||||
|
||||
@@ -53,7 +47,9 @@ mi_expect_stop "exited-normally" "" "" "" "" "" "finished exec continue"
|
||||
|
||||
# Run the program again.
|
||||
|
||||
if { [mi_run_to_main] < 0 } {
|
||||
mi_delete_breakpoints
|
||||
|
||||
if { [mi_runto_main] < 0 } {
|
||||
continue
|
||||
}
|
||||
|
||||
|
||||
@@ -22,15 +22,6 @@ if { ![support_displaced_stepping] } {
|
||||
load_lib mi-support.exp
|
||||
set MIFLAGS "-i=mi"
|
||||
|
||||
gdb_exit
|
||||
|
||||
save_vars { GDBFLAGS } {
|
||||
append GDBFLAGS " -ex \"set non-stop on\""
|
||||
if {[mi_gdb_start]} {
|
||||
continue
|
||||
}
|
||||
}
|
||||
|
||||
proc mi_nonstop_resume { command test } {
|
||||
if { [mi_send_resuming_command $command $test] != 0 } {
|
||||
# If a resume fails, assume non-stop is broken or unsupported
|
||||
@@ -50,13 +41,16 @@ if {[gdb_compile_pthreads "$srcdir/$subdir/$srcfile" $binfile executable $option
|
||||
return -1
|
||||
}
|
||||
|
||||
mi_gdb_reinitialize_dir $srcdir/$subdir
|
||||
mi_gdb_load $binfile
|
||||
|
||||
save_vars { GDBFLAGS } {
|
||||
append GDBFLAGS " -ex \"set non-stop on\""
|
||||
mi_clean_restart $binfile
|
||||
}
|
||||
|
||||
mi_gdb_test "-gdb-set mi-async 1" ".*"
|
||||
mi_detect_async
|
||||
|
||||
if { [mi_run_to_main] < 0 } {
|
||||
if { [mi_runto_main] < 0 } {
|
||||
continue
|
||||
}
|
||||
|
||||
|
||||
@@ -24,11 +24,6 @@ if { ![support_displaced_stepping] } {
|
||||
load_lib mi-support.exp
|
||||
set MIFLAGS "-i=mi"
|
||||
|
||||
gdb_exit
|
||||
if {[mi_gdb_start]} {
|
||||
continue
|
||||
}
|
||||
|
||||
proc mi_nonstop_resume { command test } {
|
||||
if { [mi_send_resuming_command $command $test] != 0 } {
|
||||
# If a resume fails, assume non-stop is broken or unsupported
|
||||
@@ -49,14 +44,13 @@ if {[gdb_compile "$srcdir/$subdir/$srcfile" \
|
||||
return -1
|
||||
}
|
||||
|
||||
mi_gdb_reinitialize_dir $srcdir/$subdir
|
||||
mi_gdb_load $binfile
|
||||
mi_clean_restart $binfile
|
||||
|
||||
mi_gdb_test "-gdb-set non-stop 1" ".*"
|
||||
mi_gdb_test "-gdb-set mi-async 1" ".*"
|
||||
mi_detect_async
|
||||
|
||||
if { [mi_run_to_main] < 0 } {
|
||||
if { [mi_runto_main] < 0 } {
|
||||
continue
|
||||
}
|
||||
|
||||
|
||||
@@ -21,11 +21,6 @@ if { ![support_displaced_stepping] } {
|
||||
load_lib mi-support.exp
|
||||
set MIFLAGS "-i=mi"
|
||||
|
||||
gdb_exit
|
||||
if {[mi_gdb_start]} {
|
||||
continue
|
||||
}
|
||||
|
||||
#
|
||||
# Start here
|
||||
#
|
||||
@@ -36,14 +31,13 @@ if {[gdb_compile_pthreads "$srcdir/$subdir/$srcfile" $binfile executable $option
|
||||
return -1
|
||||
}
|
||||
|
||||
mi_gdb_reinitialize_dir $srcdir/$subdir
|
||||
mi_gdb_load $binfile
|
||||
mi_clean_restart $binfile
|
||||
|
||||
mi_gdb_test "-gdb-set non-stop 1" ".*"
|
||||
mi_gdb_test "-gdb-set mi-async 1" ".*"
|
||||
mi_detect_async
|
||||
|
||||
if { [mi_run_to_main] < 0 } {
|
||||
if { [mi_runto_main] < 0 } {
|
||||
continue
|
||||
}
|
||||
|
||||
|
||||
@@ -21,11 +21,6 @@ if { ![support_displaced_stepping] } {
|
||||
load_lib mi-support.exp
|
||||
set MIFLAGS "-i=mi"
|
||||
|
||||
gdb_exit
|
||||
if {[mi_gdb_start]} {
|
||||
continue
|
||||
}
|
||||
|
||||
#
|
||||
# Start here
|
||||
#
|
||||
@@ -36,14 +31,13 @@ if {[gdb_compile_pthreads "$srcdir/$subdir/$srcfile" $binfile executable $option
|
||||
return -1
|
||||
}
|
||||
|
||||
mi_gdb_reinitialize_dir $srcdir/$subdir
|
||||
mi_gdb_load $binfile
|
||||
mi_clean_restart $binfile
|
||||
|
||||
mi_gdb_test "-gdb-set non-stop 1" ".*"
|
||||
mi_gdb_test "-gdb-set mi-async 1" ".*"
|
||||
mi_detect_async
|
||||
|
||||
if { [mi_run_to_main] < 0 } {
|
||||
if { [mi_runto_main] < 0 } {
|
||||
continue
|
||||
}
|
||||
|
||||
|
||||
@@ -26,11 +26,6 @@ if { ![support_displaced_stepping] } {
|
||||
load_lib mi-support.exp
|
||||
set MIFLAGS "-i=mi"
|
||||
|
||||
gdb_exit
|
||||
if {[mi_gdb_start]} {
|
||||
continue
|
||||
}
|
||||
|
||||
#
|
||||
# Start here
|
||||
#
|
||||
@@ -41,14 +36,13 @@ if {[gdb_compile_pthreads "$srcdir/$subdir/$srcfile" $binfile executable $option
|
||||
return -1
|
||||
}
|
||||
|
||||
mi_gdb_reinitialize_dir $srcdir/$subdir
|
||||
mi_gdb_load $binfile
|
||||
mi_clean_restart $binfile
|
||||
|
||||
mi_gdb_test "-gdb-set non-stop 1" ".*"
|
||||
mi_gdb_test "-gdb-set mi-async 1" ".*"
|
||||
mi_detect_async
|
||||
|
||||
if { [mi_run_to_main] < 0 } {
|
||||
if { [mi_runto_main] < 0 } {
|
||||
continue
|
||||
}
|
||||
|
||||
|
||||
@@ -18,11 +18,6 @@
|
||||
load_lib mi-support.exp
|
||||
set MIFLAGS "-i=mi"
|
||||
|
||||
gdb_exit
|
||||
if [mi_gdb_start] {
|
||||
continue
|
||||
}
|
||||
|
||||
standard_testfile
|
||||
|
||||
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
|
||||
@@ -30,8 +25,9 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
|
||||
return -1
|
||||
}
|
||||
|
||||
mi_clean_restart $binfile
|
||||
mi_runto_main
|
||||
|
||||
mi_run_to_main
|
||||
mi_next_to "main" "" "mi-read-memory.c" "20" "next at main"
|
||||
|
||||
mi_gdb_test "1-data-read-memory" \
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user