mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-22 11:00:01 +08:00
* lib/gdb-python.exp: New file.
* gdb.python/py-block.exp: Use it. * gdb.python/py-breakpoint.exp: Ditto. * gdb.python/py-frame.exp: Ditto. * gdb.python/py-inferior.exp: Ditto. * gdb.python/py-param.exp: Ditto. * gdb.python/py-prettyprint.exp: Ditto. * gdb.python/py-shared.exp: Ditto. * gdb.python/py-symbol.exp: Ditto. * gdb.python/py-symtab.exp: Ditto. * gdb.python/py-type.exp: Ditto. * gdb.python/py-value.exp: Ditto. * gdb.python/python.exp: Ditto.
This commit is contained in:
@ -20,6 +20,8 @@ if $tracelevel then {
|
||||
strace $tracelevel
|
||||
}
|
||||
|
||||
load_lib gdb-python.exp
|
||||
|
||||
set testfile "python"
|
||||
set srcfile ${testfile}.c
|
||||
set srcfile1 ${testfile}-1.c
|
||||
@ -39,17 +41,6 @@ gdb_reinitialize_dir $srcdir/$subdir
|
||||
# Skip all tests if Python scripting is not enabled.
|
||||
if { [skip_python_tests] } { continue }
|
||||
|
||||
# Run a command in GDB, and report a failure if a Python exception is thrown.
|
||||
# If report_pass is true, report a pass if no exception is thrown.
|
||||
proc gdb_py_test_silent_cmd {cmd name report_pass} {
|
||||
global gdb_prompt
|
||||
|
||||
gdb_test_multiple $cmd $name {
|
||||
-re "Traceback.*$gdb_prompt $" { fail $name }
|
||||
-re "$gdb_prompt $" { if $report_pass { pass $name } }
|
||||
}
|
||||
}
|
||||
|
||||
gdb_test_multiple "python print 23" "verify python support" {
|
||||
-re "not supported.*$gdb_prompt $" {
|
||||
unsupported "python support is disabled"
|
||||
|
Reference in New Issue
Block a user