GDB perf test on disassemble

This patch adds a test case to test the performance of GDB doing
disassembly.

gdb/testsuite/

2013-11-28  Yao Qi  <yao@codesourcery.com>

	* lib/gdb.exp (with_gdb_prompt): New proc.
	* gdb.perf/disassemble.exp: New.
	* gdb.perf/disassemble.py: New.
This commit is contained in:
Yao Qi
2013-08-26 22:09:12 +08:00
parent a6c8f227fe
commit 8b5e6dc217
4 changed files with 127 additions and 0 deletions

View File

@ -1716,6 +1716,32 @@ proc with_test_prefix { prefix body } {
}
}
# Run tests in BODY with GDB prompt and variable $gdb_prompt set to
# PROMPT. When BODY is finished, restore GDB prompt and variable
# $gdb_prompt.
# Returns the result of BODY.
proc with_gdb_prompt { prompt body } {
global gdb_prompt
set saved $gdb_prompt
set gdb_prompt $prompt
gdb_test_no_output "set prompt $prompt " ""
set code [catch {uplevel 1 $body} result]
set gdb_prompt $saved
gdb_test_no_output "set prompt $saved " ""
if {$code == 1} {
global errorInfo errorCode
return -code $code -errorinfo $errorInfo -errorcode $errorCode $result
} else {
return -code $code $result
}
}
# Return 1 if _Complex types are supported, otherwise, return 0.
gdb_caching_proc support_complex_tests {