diff options
author | Yao Qi <yao@codesourcery.com> | 2011-05-30 02:51:58 +0000 |
---|---|---|
committer | Yao Qi <yao@codesourcery.com> | 2011-05-30 02:51:58 +0000 |
commit | 0578b8d157cfe24f77424f9920e1c57497fd3635 (patch) | |
tree | 6ca1e20311807c0d6a44886fddc2d5e90a526e2f /gdb/testsuite/gdb.base/callfuncs.exp | |
parent | ff4d2c6018b2de77d43ed3badb19e87de54d1a04 (diff) | |
download | gdb-0578b8d157cfe24f77424f9920e1c57497fd3635.zip gdb-0578b8d157cfe24f77424f9920e1c57497fd3635.tar.gz gdb-0578b8d157cfe24f77424f9920e1c57497fd3635.tar.bz2 |
2011-05-30 Yao Qi <yao@codesourcery.com>
* gdb.base/callfuncs.c (t_structs_fc): New.
(t_structs_dc, t_structs_ldc): New.
(t_double_many_args):
(DEF_FUNC_MANY_ARGS_1, DEF_FUNC_MANY_ARGS_2): Define.
(DEF_FUNC_MANY_ARGS_3, DEF_FUNC_VALUES_1): Define.
(DEF_FUNC_VALUES_2, DEF_FUNC_VALUES_3): Define.
* gdb.base/callfuncs.exp: Call new functions.
Diffstat (limited to 'gdb/testsuite/gdb.base/callfuncs.exp')
-rw-r--r-- | gdb/testsuite/gdb.base/callfuncs.exp | 50 |
1 files changed, 49 insertions, 1 deletions
diff --git a/gdb/testsuite/gdb.base/callfuncs.exp b/gdb/testsuite/gdb.base/callfuncs.exp index 5294a2d..78e6dd2 100644 --- a/gdb/testsuite/gdb.base/callfuncs.exp +++ b/gdb/testsuite/gdb.base/callfuncs.exp @@ -25,7 +25,12 @@ set testfile "callfuncs" set srcfile ${testfile}.c set binfile ${objdir}/${subdir}/${testfile} -if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { +set compile_flags {debug} +if [support_complex_tests] { + lappend compile_flags "additional_flags=-DTEST_COMPLEX" +} + +if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable $compile_flags] != "" } { untested callfuncs.exp return -1 } @@ -144,6 +149,29 @@ proc do_function_calls {} { gdb_test "p t_int_double(99, 99.0)" " = 1" } + if [support_complex_tests] { + setup_kfail_for_target gdb/12798 "x86_64-*-*" + gdb_test "p t_float_complex_values(fc1, fc2)" " = 1" + gdb_test "p t_float_complex_values(fc3, fc4)" " = 0" + + setup_kfail_for_target gdb/12800 "x86_64-*-*" + gdb_test "p t_float_complex_many_args(fc1, fc2, fc3, fc4, fc1, fc2, fc3, fc4, fc1, fc2, fc3, fc4, fc1, fc2, fc3, fc4)" " = 1" + gdb_test "p t_float_complex_many_args(fc1, fc1, fc1, fc1, fc1, fc1, fc1, fc1, fc1, fc1, fc1, fc1, fc1, fc1, fc1, fc1)" " = 0" + + setup_kfail_for_target gdb/12798 "x86_64-*-*" + gdb_test "p t_double_complex_values(dc1, dc2)" " = 1" + gdb_test "p t_double_complex_values(dc3, dc4)" " = 0" + + setup_kfail_for_target gdb/12800 "x86_64-*-*" + gdb_test "p t_double_complex_many_args(dc1, dc2, dc3, dc4, dc1, dc2, dc3, dc4, dc1, dc2, dc3, dc4, dc1, dc2, dc3, dc4)" " = 1" + gdb_test "p t_double_complex_many_args(dc1, dc1, dc1, dc1, dc1, dc1, dc1, dc1, dc1, dc1, dc1, dc1, dc1, dc1, dc1, dc1)" " = 0" + + gdb_test "p t_long_double_complex_values(ldc1, ldc2)" " = 1" + gdb_test "p t_long_double_complex_values(ldc3, ldc4)" " = 0" + gdb_test "p t_long_double_complex_many_args(ldc1, ldc2, ldc3, ldc4, ldc1, ldc2, ldc3, ldc4, ldc1, ldc2, ldc3, ldc4, ldc1, ldc2, ldc3, ldc4)" " = 1" + gdb_test "p t_long_double_complex_many_args(ldc1, ldc1, ldc1, ldc1, ldc1, ldc1, ldc1,ldc1, ldc1, ldc1, ldc1, ldc1, ldc1, ldc1, ldc1, ldc1)" " = 0" + } + gdb_test "p t_string_values(string_val2,string_val1)" " = 0" gdb_test "p t_string_values(string_val1,string_val2)" " = 1" gdb_test "p t_string_values(\"string 1\",\"string 2\")" " = 1" @@ -217,6 +245,26 @@ proc do_function_calls {} { "call inferior func with struct - returns double" } + if [support_complex_tests] { + + setup_kfail_for_target gdb/12796 "x86_64-*-*" + setup_kfail_for_target gdb/12797 "arm*-*-*" + gdb_test "p t_structs_fc(struct_val1)" ".*= 3 \\+ 3 \\* I" \ + "call inferior func with struct - returns float _Complex" + + setup_kfail_for_target gdb/12783 "i?86-*-*" + setup_kfail_for_target gdb/12796 "x86_64-*-*" + setup_kfail_for_target gdb/12797 "arm*-*-*" + gdb_test "p t_structs_dc(struct_val1)" ".*= 4 \\+ 4 \\* I" \ + "call inferior func with struct - returns double _Complex" + + setup_kfail_for_target gdb/12783 "i?86-*-*" + setup_kfail_for_target gdb/12796 "x86_64-*-*" + setup_kfail_for_target gdb/12797 "arm*-*-*" + gdb_test "p t_structs_ldc(struct_val1)" "= 5 \\+ 5 \\* I" \ + "call inferior func with struct - returns long double _Complex" + } + gdb_test "p t_structs_a(struct_val1)" "= (.unsigned char .. )?\"foo\"" \ "call inferior func with struct - returns char *" } |