mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-27 22:48:57 +08:00
(set_lang_c): Delete.
(runto_main): If it fails, call fail instead of gdb_suppress_tests.
This commit is contained in:
@ -37,35 +37,6 @@ if [target_info exists gdb,cannot_call_functions] {
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
# Set the current language to C. This counts as a test. If it
|
|
||||||
# fails, then we skip the other tests.
|
|
||||||
|
|
||||||
proc set_lang_c {} {
|
|
||||||
global gdb_prompt
|
|
||||||
|
|
||||||
send_gdb "set language c\n"
|
|
||||||
gdb_expect {
|
|
||||||
-re ".*$gdb_prompt $" {}
|
|
||||||
timeout { fail "set language c (timeout)" ; return 0; }
|
|
||||||
}
|
|
||||||
|
|
||||||
send_gdb "show language\n"
|
|
||||||
gdb_expect {
|
|
||||||
-re ".* source language is \"c\".*$gdb_prompt $" {
|
|
||||||
pass "set language to \"c\""
|
|
||||||
return 1
|
|
||||||
}
|
|
||||||
-re ".*$gdb_prompt $" {
|
|
||||||
fail "setting language to \"c\""
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
timeout {
|
|
||||||
fail "can't show language (timeout)"
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# Start with a fresh gdb.
|
# Start with a fresh gdb.
|
||||||
|
|
||||||
gdb_exit
|
gdb_exit
|
||||||
@ -73,12 +44,9 @@ gdb_start
|
|||||||
gdb_reinitialize_dir $srcdir/$subdir
|
gdb_reinitialize_dir $srcdir/$subdir
|
||||||
gdb_load ${binfile}
|
gdb_load ${binfile}
|
||||||
|
|
||||||
if { ![set_lang_c] } {
|
if { ![runto_main] } {
|
||||||
gdb_suppress_tests;
|
fail "Can't run to main"
|
||||||
} else {
|
return 0
|
||||||
if { ![runto_main] } {
|
|
||||||
gdb_suppress_tests;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Call function (causing the program to exit), and see if gdb handles
|
# Call function (causing the program to exit), and see if gdb handles
|
||||||
|
Reference in New Issue
Block a user