mirror of
https://github.com/darlinghq/darling-gdb.git
synced 2025-01-31 14:04:12 +00:00
2010-02-24 Phil Muldoon <pmuldoon@redhat.com>
PR python/11314 * lib/gdb.exp (skip_python_tests): New function. * gdb.python/py-cmd.exp: Use skip_python_tests. * gdb.python/py-frame.exp: Likewise. * gdb.python/py-function.exp: Likewise. * gdb.python/py-prettyprint.exp: Likewise. * gdb.python/py-template.exp: Likewise. * gdb.python/py-type.exp: Likewise. * gdb.python/py-value.exp: Likewise.
This commit is contained in:
parent
a79b8f6ea8
commit
f6bbabf054
@ -1,3 +1,15 @@
|
|||||||
|
2010-02-24 Phil Muldoon <pmuldoon@redhat.com>
|
||||||
|
|
||||||
|
PR python/11314
|
||||||
|
* lib/gdb.exp (skip_python_tests): New function.
|
||||||
|
* gdb.python/py-cmd.exp: Use skip_python_tests.
|
||||||
|
* gdb.python/py-frame.exp: Likewise.
|
||||||
|
* gdb.python/py-function.exp: Likewise.
|
||||||
|
* gdb.python/py-prettyprint.exp: Likewise.
|
||||||
|
* gdb.python/py-template.exp: Likewise.
|
||||||
|
* gdb.python/py-type.exp: Likewise.
|
||||||
|
* gdb.python/py-value.exp: Likewise.
|
||||||
|
|
||||||
2010-02-22 Pedro Alves <pedro@codesourcery.com>
|
2010-02-22 Pedro Alves <pedro@codesourcery.com>
|
||||||
|
|
||||||
PR9605
|
PR9605
|
||||||
|
@ -44,13 +44,8 @@ gdb_exit
|
|||||||
gdb_start
|
gdb_start
|
||||||
gdb_reinitialize_dir $srcdir/$subdir
|
gdb_reinitialize_dir $srcdir/$subdir
|
||||||
|
|
||||||
gdb_test_multiple "python print 'hello, world!'" "verify python support" {
|
# Skip all tests if Python scripting is not enabled.
|
||||||
-re "not supported.*$gdb_prompt $" {
|
if { [skip_python_tests] } { continue }
|
||||||
unsupported "python support is disabled"
|
|
||||||
return -1
|
|
||||||
}
|
|
||||||
-re "$gdb_prompt $" {}
|
|
||||||
}
|
|
||||||
|
|
||||||
# Test a simple command.
|
# Test a simple command.
|
||||||
|
|
||||||
|
@ -46,13 +46,8 @@ gdb_start
|
|||||||
gdb_reinitialize_dir $srcdir/$subdir
|
gdb_reinitialize_dir $srcdir/$subdir
|
||||||
gdb_load ${binfile}
|
gdb_load ${binfile}
|
||||||
|
|
||||||
gdb_test_multiple "python print 'hello, world!'" "verify python support" {
|
# Skip all tests if Python scripting is not enabled.
|
||||||
-re "not supported.*$gdb_prompt $" {
|
if { [skip_python_tests] } { continue }
|
||||||
unsupported "python support is disabled"
|
|
||||||
return -1
|
|
||||||
}
|
|
||||||
-re "$gdb_prompt $" {}
|
|
||||||
}
|
|
||||||
|
|
||||||
# The following tests require execution.
|
# The following tests require execution.
|
||||||
|
|
||||||
|
@ -44,13 +44,8 @@ gdb_exit
|
|||||||
gdb_start
|
gdb_start
|
||||||
gdb_reinitialize_dir $srcdir/$subdir
|
gdb_reinitialize_dir $srcdir/$subdir
|
||||||
|
|
||||||
gdb_test_multiple "python print 'hello, world!'" "verify python support" {
|
# Skip all tests if Python scripting is not enabled.
|
||||||
-re "not supported.*$gdb_prompt $" {
|
if { [skip_python_tests] } { continue }
|
||||||
unsupported "python support is disabled"
|
|
||||||
return -1
|
|
||||||
}
|
|
||||||
-re "$gdb_prompt $" {}
|
|
||||||
}
|
|
||||||
|
|
||||||
gdb_py_test_multiple "input convenience function" \
|
gdb_py_test_multiple "input convenience function" \
|
||||||
"python" "" \
|
"python" "" \
|
||||||
|
@ -27,13 +27,9 @@ set binfile ${objdir}/${subdir}/${testfile}
|
|||||||
# Start with a fresh gdb.
|
# Start with a fresh gdb.
|
||||||
gdb_exit
|
gdb_exit
|
||||||
gdb_start
|
gdb_start
|
||||||
gdb_test_multiple "python print 'hello, world!'" "verify python support" {
|
|
||||||
-re "not supported.*$gdb_prompt $" {
|
# Skip all tests if Python scripting is not enabled.
|
||||||
unsupported "python support is disabled"
|
if { [skip_python_tests] } { continue }
|
||||||
return -1
|
|
||||||
}
|
|
||||||
-re "$gdb_prompt $" {}
|
|
||||||
}
|
|
||||||
|
|
||||||
# Run a command in GDB, and report a failure if a Python exception is thrown.
|
# 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.
|
# If report_pass is true, report a pass if no exception is thrown.
|
||||||
|
@ -35,13 +35,8 @@ gdb_exit
|
|||||||
gdb_start
|
gdb_start
|
||||||
gdb_reinitialize_dir $srcdir/$subdir
|
gdb_reinitialize_dir $srcdir/$subdir
|
||||||
|
|
||||||
gdb_test_multiple "python print 23" "verify python support" {
|
# Skip all tests if Python scripting is not enabled.
|
||||||
-re "not supported.*$gdb_prompt $" {
|
if { [skip_python_tests] } { continue }
|
||||||
unsupported "python support is disabled"
|
|
||||||
return -1
|
|
||||||
}
|
|
||||||
-re "$gdb_prompt $" {}
|
|
||||||
}
|
|
||||||
|
|
||||||
proc test_template_arg {type} {
|
proc test_template_arg {type} {
|
||||||
global testfile srcdir subdir srcfile binfile
|
global testfile srcdir subdir srcfile binfile
|
||||||
|
@ -34,8 +34,8 @@ proc build_inferior {lang} {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Restart GDB, set breakpoint and run to that breakpoint.
|
# Restart GDB.
|
||||||
proc restart_gdb {bp} {
|
proc restart_gdb {} {
|
||||||
global srcdir subdir srcfile binfile testfile hex
|
global srcdir subdir srcfile binfile testfile hex
|
||||||
|
|
||||||
gdb_exit
|
gdb_exit
|
||||||
@ -47,12 +47,14 @@ proc restart_gdb {bp} {
|
|||||||
perror "couldn't run to breakpoint"
|
perror "couldn't run to breakpoint"
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# Set breakpoint and run to that breakpoint.
|
||||||
|
proc runto_bp {bp} {
|
||||||
gdb_breakpoint [gdb_get_line_number $bp]
|
gdb_breakpoint [gdb_get_line_number $bp]
|
||||||
gdb_continue_to_breakpoint $bp
|
gdb_continue_to_breakpoint $bp
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
# Run a command in GDB, and report a failure if a Python exception is thrown.
|
# 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.
|
# If report_pass is true, report a pass if no exception is thrown.
|
||||||
proc gdb_py_test_silent_cmd {cmd name report_pass} {
|
proc gdb_py_test_silent_cmd {cmd name report_pass} {
|
||||||
@ -127,21 +129,18 @@ proc test_range {} {
|
|||||||
|
|
||||||
# Perform C Tests.
|
# Perform C Tests.
|
||||||
build_inferior "c"
|
build_inferior "c"
|
||||||
restart_gdb "break to inspect struct and array."
|
restart_gdb
|
||||||
|
|
||||||
gdb_test_multiple "python print 'hello, world!'" "verify python support" {
|
# Skip all tests if Python scripting is not enabled.
|
||||||
-re "not supported.*$gdb_prompt $" {
|
if { [skip_python_tests] } { continue }
|
||||||
unsupported "python support is disabled"
|
|
||||||
return -1
|
|
||||||
}
|
|
||||||
-re "$gdb_prompt $" {}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
runto_bp "break to inspect struct and array."
|
||||||
test_fields "c"
|
test_fields "c"
|
||||||
|
|
||||||
# Perform C++ Tests.
|
# Perform C++ Tests.
|
||||||
build_inferior "c++"
|
build_inferior "c++"
|
||||||
restart_gdb "break to inspect struct and array."
|
restart_gdb
|
||||||
|
runto_bp "break to inspect struct and array."
|
||||||
test_fields "c++"
|
test_fields "c++"
|
||||||
test_base_class
|
test_base_class
|
||||||
test_range
|
test_range
|
||||||
|
@ -394,13 +394,8 @@ gdb_start
|
|||||||
gdb_reinitialize_dir $srcdir/$subdir
|
gdb_reinitialize_dir $srcdir/$subdir
|
||||||
gdb_load ${binfile}
|
gdb_load ${binfile}
|
||||||
|
|
||||||
gdb_test_multiple "python print 'hello, world!'" "verify python support" {
|
# Skip all tests if Python scripting is not enabled.
|
||||||
-re "not supported.*$gdb_prompt $" {
|
if { [skip_python_tests] } { continue }
|
||||||
unsupported "python support is disabled"
|
|
||||||
return -1
|
|
||||||
}
|
|
||||||
-re "$gdb_prompt $" {}
|
|
||||||
}
|
|
||||||
|
|
||||||
test_value_creation
|
test_value_creation
|
||||||
test_value_numeric_ops
|
test_value_numeric_ops
|
||||||
|
@ -1299,6 +1299,21 @@ proc skip_java_tests {} {
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Return a 1 for configurations that do not support Python scripting.
|
||||||
|
|
||||||
|
proc skip_python_tests {} {
|
||||||
|
global gdb_prompt
|
||||||
|
gdb_test_multiple "python print 'test'" "verify python support" {
|
||||||
|
-re "not supported.*$gdb_prompt $" {
|
||||||
|
unsupported "Python support is disabled."
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
-re "$gdb_prompt $" {}
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
# Return a 1 if we should skip shared library tests.
|
# Return a 1 if we should skip shared library tests.
|
||||||
|
|
||||||
proc skip_shlib_tests {} {
|
proc skip_shlib_tests {} {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user