diff options
author | Peter Schauer <Peter.Schauer@mytum.de> | 1995-03-25 09:26:16 +0000 |
---|---|---|
committer | Peter Schauer <Peter.Schauer@mytum.de> | 1995-03-25 09:26:16 +0000 |
commit | 766de354a88c47321e39facce5c1b37e88e68f40 (patch) | |
tree | e9e178496dbabf152aecbb85af8e70565c770192 /gdb/testsuite | |
parent | 736268e5fa1634b14976892d29856670f2acec70 (diff) | |
download | gdb-766de354a88c47321e39facce5c1b37e88e68f40.zip gdb-766de354a88c47321e39facce5c1b37e88e68f40.tar.gz gdb-766de354a88c47321e39facce5c1b37e88e68f40.tar.bz2 |
* gdb.base/list.exp: Add expect patterns for output from
SunPRO compiled executables.
* gdb.base/whatis.exp: Allow leading `signed' for all v_signed_*
types.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r-- | gdb/testsuite/ChangeLog | 7 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/list.exp | 37 |
2 files changed, 40 insertions, 4 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 0e5f845..b255187 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,10 @@ +Sat Mar 25 01:16:10 1995 Peter Schauer (pes@regent.e-technik.tu-muenchen.de) + + * gdb.base/list.exp: Add expect patterns for output from + SunPRO compiled executables. + * gdb.base/whatis.exp: Allow leading `signed' for all v_signed_* + types. + Fri Mar 24 06:11:05 1995 Jim Kingdon (kingdon@lioth.cygnus.com) * gdb.base/break.exp (test_next_with_recursion): Accept any line diff --git a/gdb/testsuite/gdb.base/list.exp b/gdb/testsuite/gdb.base/list.exp index e7fe615..25c30c4 100644 --- a/gdb/testsuite/gdb.base/list.exp +++ b/gdb/testsuite/gdb.base/list.exp @@ -1,4 +1,4 @@ -# Copyright (C) 1992, 1994 Free Software Foundation, Inc. +# Copyright (C) 1992, 1994, 1995 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -496,6 +496,7 @@ proc test_list_function {} { # gcc appears to generate incorrect debugging information for code # in include files, which breaks this test. + # SunPRO cc is the second case below, it's also correct. setup_xfail "rs6000-*-*" 1804 setup_xfail "a29k-*-udi" send "list main\n" @@ -503,11 +504,15 @@ proc test_list_function {} { -re "1\[ \t\]+#include .*8\[ \t\]+foo \[(\]+.*\[)\]+;\r\n$prompt $" { pass "list function in source file 1" } + -re "2\[ \t\]+.*11\[ \t\]+foo \[(\]+.*\[)\]+;\r\n$prompt $" { + pass "list function in source file 1" + } -re ".*$prompt $" { fail "list main" ; return } timeout { fail "list main" ; return } } # Ultrix gdb takes the second case below; it's also correct. + # SunPRO cc is the third case. send "list bar\n" expect { -re "1\[ \t\]+void.*8\[ \t\]+\}\r\n$prompt $" { @@ -516,12 +521,16 @@ proc test_list_function {} { -re "1\[ \t\]+void.*7\[ \t\]*long_line ..;\r\n$prompt $" { pass "list function in source file 2" } + -re "1\[ \t\]+void.*7\[ \t\]*long_line ..;.*9\[ \t\]*\r\n$prompt $" { + pass "list function in source file 2" + } -re ".*$prompt $" { fail "list bar" ; return } timeout { fail "list bar" ; return } } # Test "list function" for C include file # Ultrix gdb is the second case, still correct. + # SunPRO cc is the third case. # FIXME This fails on DWARF setup_xfail "*-*-sysv4*" send "list foo\n" @@ -532,6 +541,9 @@ proc test_list_function {} { -re "1\[ \t\]+/. An include file.*10\[ \t\]+bar \[(\]+.*\[)\]+;\r\n$prompt $" { pass "list function in include file" } + -re "3\[ \t\]+.*12\[ \t\]+bar \[(\]+.*\[)\]+;\r\n$prompt $" { + pass "list function in include file" + } -re ".*main \[)(\]+.*$prompt $" { fail "list function in include file" } @@ -694,6 +706,7 @@ proc test_list_filename_and_function {} { # gcc appears to generate incorrect debugging information for code # in include files, which breaks this test. + # SunPRO cc is the second case below, it's also correct. setup_xfail "rs6000-*-*" 1804 setup_xfail "a29k-*-udi" send "list list0.c:main\n" @@ -701,6 +714,9 @@ proc test_list_filename_and_function {} { -re "1\[ \t\]+#include .*8\[ \t\]+foo \[(\]+.*\[)\]+;\r\n$prompt $" { incr testcnt } + -re "2\[ \t\]+.*11\[ \t\]+foo \[(\]+.*\[)\]+;\r\n$prompt $" { + pass "list function in source file 1" + } -re ".*$prompt $" { fail "list list0.c:main" } timeout { fail "list list0.c:main (timeout)" } } @@ -726,6 +742,7 @@ proc test_list_filename_and_function {} { # gcc appears to generate incorrect debugging information for code # in include files, which breaks this test. # Ultrix gdb is the second case, one line different but still correct. + # SunPRO cc is the third case. # FIXME This fails on DWARF setup_xfail "rs6000-*-*" 1804 setup_xfail "*-*-sysv4*" @@ -739,6 +756,9 @@ proc test_list_filename_and_function {} { -re "1\[ \t\]+/. An include file.*10\[ \t\]+bar \[(\]+.*\[)\]+;\r\n$prompt $" { incr testcnt } + -re "3\[ \t\]+.*12\[ \t\]+bar \[(\]+.*\[)\]+;\r\n$prompt $" { + incr testcnt + } -re "No source file named list0.h.\r\n$prompt $" { fail "list list0.h:foo" } @@ -849,19 +869,28 @@ proc test_list_filename_and_function {} { } proc test_forward_search {} { - gdb_test "set listsize 2" "" - gdb_test "list long_line" "20\[ \t\]+long_line " + global timeout + + gdb_test "set listsize 4" "" + # On SunOS4, this gives us lines 19-22. On AIX, it gives us + # lines 20-23. This depends on whether the line number of a function + # is considered to be the openbrace or the first statement--either one + # is acceptable. + gdb_test "list long_line" "20\[ \t\]+long_line .*" gdb_test "search 4321" " not found" - gdb_test "search 6789" "22\[ \t\]+oof .6789.;" + gdb_test "search 6789" "24\[ \t\]+oof .6789.;" # We could look at the result of this, but dejagnu seems to # fail, perhaps because expect's buffers are too small. # In any case, we just want GDB to not crash if the line # being searched is extremely long. + set oldtimeout $timeout + set timeout 30 gdb_test "search 1234" "" + set timeout $oldtimeout } # Start with a fresh gdb. |