mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-07-15 05:01:13 +08:00
* 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.
This commit is contained in:
@ -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)
|
Fri Mar 24 06:11:05 1995 Jim Kingdon (kingdon@lioth.cygnus.com)
|
||||||
|
|
||||||
* gdb.base/break.exp (test_next_with_recursion): Accept any line
|
* gdb.base/break.exp (test_next_with_recursion): Accept any line
|
||||||
|
@ -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
|
# 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
|
# 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
|
# gcc appears to generate incorrect debugging information for code
|
||||||
# in include files, which breaks this test.
|
# in include files, which breaks this test.
|
||||||
|
# SunPRO cc is the second case below, it's also correct.
|
||||||
setup_xfail "rs6000-*-*" 1804
|
setup_xfail "rs6000-*-*" 1804
|
||||||
setup_xfail "a29k-*-udi"
|
setup_xfail "a29k-*-udi"
|
||||||
send "list main\n"
|
send "list main\n"
|
||||||
@ -503,11 +504,15 @@ proc test_list_function {} {
|
|||||||
-re "1\[ \t\]+#include .*8\[ \t\]+foo \[(\]+.*\[)\]+;\r\n$prompt $" {
|
-re "1\[ \t\]+#include .*8\[ \t\]+foo \[(\]+.*\[)\]+;\r\n$prompt $" {
|
||||||
pass "list function in source file 1"
|
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 }
|
-re ".*$prompt $" { fail "list main" ; return }
|
||||||
timeout { fail "list main" ; return }
|
timeout { fail "list main" ; return }
|
||||||
}
|
}
|
||||||
|
|
||||||
# Ultrix gdb takes the second case below; it's also correct.
|
# Ultrix gdb takes the second case below; it's also correct.
|
||||||
|
# SunPRO cc is the third case.
|
||||||
send "list bar\n"
|
send "list bar\n"
|
||||||
expect {
|
expect {
|
||||||
-re "1\[ \t\]+void.*8\[ \t\]+\}\r\n$prompt $" {
|
-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 $" {
|
-re "1\[ \t\]+void.*7\[ \t\]*long_line ..;\r\n$prompt $" {
|
||||||
pass "list function in source file 2"
|
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 }
|
-re ".*$prompt $" { fail "list bar" ; return }
|
||||||
timeout { fail "list bar" ; return }
|
timeout { fail "list bar" ; return }
|
||||||
}
|
}
|
||||||
|
|
||||||
# Test "list function" for C include file
|
# Test "list function" for C include file
|
||||||
# Ultrix gdb is the second case, still correct.
|
# Ultrix gdb is the second case, still correct.
|
||||||
|
# SunPRO cc is the third case.
|
||||||
# FIXME This fails on DWARF
|
# FIXME This fails on DWARF
|
||||||
setup_xfail "*-*-sysv4*"
|
setup_xfail "*-*-sysv4*"
|
||||||
send "list foo\n"
|
send "list foo\n"
|
||||||
@ -532,6 +541,9 @@ proc test_list_function {} {
|
|||||||
-re "1\[ \t\]+/. An include file.*10\[ \t\]+bar \[(\]+.*\[)\]+;\r\n$prompt $" {
|
-re "1\[ \t\]+/. An include file.*10\[ \t\]+bar \[(\]+.*\[)\]+;\r\n$prompt $" {
|
||||||
pass "list function in include file"
|
pass "list function in include file"
|
||||||
}
|
}
|
||||||
|
-re "3\[ \t\]+.*12\[ \t\]+bar \[(\]+.*\[)\]+;\r\n$prompt $" {
|
||||||
|
pass "list function in include file"
|
||||||
|
}
|
||||||
-re ".*main \[)(\]+.*$prompt $" {
|
-re ".*main \[)(\]+.*$prompt $" {
|
||||||
fail "list function in include file"
|
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
|
# gcc appears to generate incorrect debugging information for code
|
||||||
# in include files, which breaks this test.
|
# in include files, which breaks this test.
|
||||||
|
# SunPRO cc is the second case below, it's also correct.
|
||||||
setup_xfail "rs6000-*-*" 1804
|
setup_xfail "rs6000-*-*" 1804
|
||||||
setup_xfail "a29k-*-udi"
|
setup_xfail "a29k-*-udi"
|
||||||
send "list list0.c:main\n"
|
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 $" {
|
-re "1\[ \t\]+#include .*8\[ \t\]+foo \[(\]+.*\[)\]+;\r\n$prompt $" {
|
||||||
incr testcnt
|
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" }
|
-re ".*$prompt $" { fail "list list0.c:main" }
|
||||||
timeout { fail "list list0.c:main (timeout)" }
|
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
|
# gcc appears to generate incorrect debugging information for code
|
||||||
# in include files, which breaks this test.
|
# in include files, which breaks this test.
|
||||||
# Ultrix gdb is the second case, one line different but still correct.
|
# Ultrix gdb is the second case, one line different but still correct.
|
||||||
|
# SunPRO cc is the third case.
|
||||||
# FIXME This fails on DWARF
|
# FIXME This fails on DWARF
|
||||||
setup_xfail "rs6000-*-*" 1804
|
setup_xfail "rs6000-*-*" 1804
|
||||||
setup_xfail "*-*-sysv4*"
|
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 $" {
|
-re "1\[ \t\]+/. An include file.*10\[ \t\]+bar \[(\]+.*\[)\]+;\r\n$prompt $" {
|
||||||
incr testcnt
|
incr testcnt
|
||||||
}
|
}
|
||||||
|
-re "3\[ \t\]+.*12\[ \t\]+bar \[(\]+.*\[)\]+;\r\n$prompt $" {
|
||||||
|
incr testcnt
|
||||||
|
}
|
||||||
-re "No source file named list0.h.\r\n$prompt $" {
|
-re "No source file named list0.h.\r\n$prompt $" {
|
||||||
fail "list list0.h:foo"
|
fail "list list0.h:foo"
|
||||||
}
|
}
|
||||||
@ -849,19 +869,28 @@ proc test_list_filename_and_function {} {
|
|||||||
}
|
}
|
||||||
|
|
||||||
proc test_forward_search {} {
|
proc test_forward_search {} {
|
||||||
gdb_test "set listsize 2" ""
|
global timeout
|
||||||
gdb_test "list long_line" "20\[ \t\]+long_line "
|
|
||||||
|
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 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
|
# We could look at the result of this, but dejagnu seems to
|
||||||
# fail, perhaps because expect's buffers are too small.
|
# fail, perhaps because expect's buffers are too small.
|
||||||
# In any case, we just want GDB to not crash if the line
|
# In any case, we just want GDB to not crash if the line
|
||||||
# being searched is extremely long.
|
# being searched is extremely long.
|
||||||
|
|
||||||
|
set oldtimeout $timeout
|
||||||
|
set timeout 30
|
||||||
gdb_test "search 1234" ""
|
gdb_test "search 1234" ""
|
||||||
|
set timeout $oldtimeout
|
||||||
}
|
}
|
||||||
|
|
||||||
# Start with a fresh gdb.
|
# Start with a fresh gdb.
|
||||||
|
Reference in New Issue
Block a user