mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-19 09:14:14 +08:00
fix up gdb.mi
This fixes gdb.mi to be parallel-safe. 2013-11-04 Tom Tromey <tromey@redhat.com> * gdb.mi/mi-cmd-param-changed.exp (test_command_param_changed): Use "dwarf2 always-disassemble" for the "maint set" test. * gdb.mi/mi-file-transfer.exp (test_file_transfer): Use standard_output_file. * gdb.mi/mi-logging.exp: Use standard_output_file.
This commit is contained in:
@ -1,3 +1,11 @@
|
|||||||
|
2013-11-04 Tom Tromey <tromey@redhat.com>
|
||||||
|
|
||||||
|
* gdb.mi/mi-cmd-param-changed.exp (test_command_param_changed):
|
||||||
|
Use "dwarf2 always-disassemble" for the "maint set" test.
|
||||||
|
* gdb.mi/mi-file-transfer.exp (test_file_transfer): Use
|
||||||
|
standard_output_file.
|
||||||
|
* gdb.mi/mi-logging.exp: Use standard_output_file.
|
||||||
|
|
||||||
2013-11-04 Tom Tromey <tromey@redhat.com>
|
2013-11-04 Tom Tromey <tromey@redhat.com>
|
||||||
|
|
||||||
* gdb.xml/tdesc-arch.exp: Use standard_output_file. Make
|
* gdb.xml/tdesc-arch.exp: Use standard_output_file. Make
|
||||||
|
@ -85,9 +85,9 @@ proc test_command_param_changed { } {
|
|||||||
|
|
||||||
# No notification is emitted for 'maint set' commands.
|
# No notification is emitted for 'maint set' commands.
|
||||||
foreach boolean_opt { "on" "off" } {
|
foreach boolean_opt { "on" "off" } {
|
||||||
mi_gdb_test "maint set profile ${boolean_opt}" \
|
mi_gdb_test "maint set dwarf2 always-disassemble ${boolean_opt}" \
|
||||||
"\\&\"maint set profile ${boolean_opt}\\\\n\"\r\n\\^done" \
|
"\\&\"maint set dwarf2 always-disassemble ${boolean_opt}\\\\n\"\r\n\\^done" \
|
||||||
"\"maint set profile ${boolean_opt}\""
|
"\"maint dwarf2 always-disassemble ${boolean_opt}\""
|
||||||
}
|
}
|
||||||
|
|
||||||
# Full command parameters are included in the notification when a
|
# Full command parameters are included in the notification when a
|
||||||
|
@ -54,15 +54,27 @@ proc mi_gdbserver_run { } {
|
|||||||
}
|
}
|
||||||
|
|
||||||
proc test_file_transfer { filename description } {
|
proc test_file_transfer { filename description } {
|
||||||
mi_gdb_test "-target-file-put \"$filename\" \"down-server\"" \
|
# If we are running everything locally, then we want to be sure to
|
||||||
|
# put the files into the test's standard output location. On the
|
||||||
|
# other hand, if the host or target is remote, then we need to
|
||||||
|
# continue with the "old-style" directory-less approach.
|
||||||
|
if {![is_remote host] && ![is_remote target]} {
|
||||||
|
set up_server [standard_output_file up-server]
|
||||||
|
set down_server [standard_output_file down-server]
|
||||||
|
} else {
|
||||||
|
set up_server up-server
|
||||||
|
set down_server down-server
|
||||||
|
}
|
||||||
|
|
||||||
|
mi_gdb_test "-target-file-put \"$filename\" \"${down_server}\"" \
|
||||||
"\\^done" "put $description"
|
"\\^done" "put $description"
|
||||||
mi_gdb_test "-target-file-get \"down-server\" \"up-server\"" \
|
mi_gdb_test "-target-file-get \"${down_server}\" \"${up_server}\"" \
|
||||||
"\\^done" "get $description"
|
"\\^done" "get $description"
|
||||||
|
|
||||||
if { ![is_remote target] } {
|
if { ![is_remote target] } {
|
||||||
# If we can check the target copy of the file, do that too.
|
# If we can check the target copy of the file, do that too.
|
||||||
# This should catch symmetric errors in upload and download.
|
# This should catch symmetric errors in upload and download.
|
||||||
set result [remote_exec host "cmp -s $filename down-server"]
|
set result [remote_exec host "cmp -s $filename ${down_server}"]
|
||||||
if { [lindex $result 0] == 0 } {
|
if { [lindex $result 0] == 0 } {
|
||||||
pass "compare intermediate $description"
|
pass "compare intermediate $description"
|
||||||
} else {
|
} else {
|
||||||
@ -70,25 +82,25 @@ proc test_file_transfer { filename description } {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
set result [remote_exec host "cmp -s $filename up-server"]
|
set result [remote_exec host "cmp -s $filename ${up_server}"]
|
||||||
if { [lindex $result 0] == 0 } {
|
if { [lindex $result 0] == 0 } {
|
||||||
pass "compare $description"
|
pass "compare $description"
|
||||||
} else {
|
} else {
|
||||||
fail "compare $description"
|
fail "compare $description"
|
||||||
}
|
}
|
||||||
|
|
||||||
mi_gdb_test "-target-file-delete \"down-server\"" \
|
mi_gdb_test "-target-file-delete \"${down_server}\"" \
|
||||||
"\\^done" "deleted $description"
|
"\\^done" "deleted $description"
|
||||||
|
|
||||||
if { ![is_remote target] } {
|
if { ![is_remote target] } {
|
||||||
if { ! [remote_file target exists down-server] } {
|
if { ! [remote_file target exists ${down_server}] } {
|
||||||
pass "verified deleted $description"
|
pass "verified deleted $description"
|
||||||
} else {
|
} else {
|
||||||
fail "verified deleted $description"
|
fail "verified deleted $description"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
catch { file delete up-server }
|
catch { file delete ${up_server} }
|
||||||
}
|
}
|
||||||
|
|
||||||
mi_gdbserver_run
|
mi_gdbserver_run
|
||||||
|
@ -33,7 +33,7 @@ if {[mi_run_to_main] < 0} {
|
|||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
|
||||||
set milogfile "milog.txt"
|
set milogfile [standard_output_file "milog.txt"]
|
||||||
|
|
||||||
mi_gdb_test "-gdb-set logging file $milogfile" ".*"
|
mi_gdb_test "-gdb-set logging file $milogfile" ".*"
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user