old-cross-binutils/gdb/testsuite/gdb.reverse/sigall-reverse.exp
Pedro Alves 32a8097ba5 Delete Tru64 support
This commit does most of the mechanical removal.  IOW, the easy part.

procfs.c isn't touched beyond removing a couple obvious bits that are
guarded by a couple macros defined in config/alpha/nm-osf3.h.  Going
beyond that for procfs.c & co would be a harder excision that
potentially affects Solaris.

Some comments in the generic alpha code ABIs that may still be
relevant and I wouldn't know what to do with them.  That can always be
done on a separate pass, preferably by someone who can test on alpha.

A couple other spots have references to OSF/Tru64 and related files
being removed, but it felt like removing them would make things worse,
not better.  We can revisit those when we next need to touch that
code.

I didn't remove a reference to osf in testsuite/lib/future.exp, as I
believe that code is imported from DejaGNU.

Built and tested on x86_64 Fedora 20, with --enable-targets=all.

Tested that building for --target=alpha-osf3 on x86_64 Fedora 20
fails with:

 checking for default auto-load directory... $debugdir:$datadir/auto-load
 checking for default auto-load safe-path... $debugdir:$datadir/auto-load
 *** Configuration alpha-unknown-osf3 is obsolete.
 *** Support has been REMOVED.
 make[1]: *** [configure-gdb] Error 1
 make[1]: Leaving directory `build-osf'
 make: *** [all] Error 2

gdb/
2014-10-17  Pedro Alves  <palves@redhat.com>

	* Makefile.in (ALL_64_TARGET_OBS): Remove alpha-osf1-tdep.o.
	(HFILES_NO_SRCDIR): Remove config/alpha/nm-osf3.h.
	(ALLDEPFILES): Remove alpha-nat.c, alpha-osf1-tdep.c and
	solib-osf.c.
	* NEWS: Mention that support for alpha*-*-osf* has been removed.
	* ada-lang.h [__alpha__ && __osf__]
	(ADA_KNOWN_RUNTIME_FILE_NAME_PATTERNS): Delete.
	* alpha-nat.c, alpha-osf1-tdep.c: Delete files.
	* alpha-tdep.c (alpha_gdbarch_init): Remove reference to
	GDB_OSABI_OSF1.
	* config/alpha/alpha-osf3.mh, config/alpha/nm-osf3.h: Delete
	files.
	* config/djgpp/fnchange.lst (config/alpha/alpha-osf1.mh)
	(config/alpha/alpha-osf2.mh, config/alpha/alpha-osf3.mh): Delete.
	* configure: Regenerate.
	* configure.ac: Remove references to osf.
	* configure.host: Handle alpha*-*-osf* in the obsolete hosts
	section.  Remove all other references to osf.
	* configure.tgt: Add alpha*-*-osf* to the obsolete targets section.
	Remove all other references to osf.
	* dec-thread.c: Delete file.
	* defs.h (GDB_OSABI_OSF1): Delete.
	* inferior.h (START_INFERIOR_TRAPS_EXPECTED): New unconditionally
	defined.
	* osabi.c (gdb_osabi_names): Delete "OSF/1".
	* procfs.c (procfs_debug_inferior) [PROCFS_DONT_TRACE_FAULTS]:
	Delete code.
	(unconditionally_kill_inferior)
	[PROCFS_NEED_CLEAR_CURSIG_FOR_KILL]: Delete code.
	* solib-osf.c: Delete file.

gdb/testsuite/
2014-10-17  Pedro Alves  <palves@redhat.com>

	* gdb.base/callfuncs.exp: emove references to osf.
	* gdb.base/sigall.exp: Likewise.
	* gdb.gdb/selftest.exp: Likewise.
	* gdb.hp/gdb.base-hp/callfwmall.exp: Likewise.
	* gdb.mi/non-stop.c: Likewise.
	* gdb.mi/pthreads.c: Likewise.
	* gdb.reverse/sigall-precsave.exp: Likewise.
	* gdb.reverse/sigall-reverse.exp: Likewise.
	* gdb.threads/pthreads.c: Likewise.
	* gdb.threads/pthreads.exp: Likewise.

gdb/doc/
2014-10-17  Pedro Alves  <palves@redhat.com>

	* gdb.texinfo (Ada Tasks and Core Files): Delete mention of Tru64.
	(SVR4 Process Information): Delete mention of OSF/1.
2014-10-17 11:18:59 +01:00

277 lines
6 KiB
Text

# Copyright 2009-2014 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
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
if [target_info exists gdb,nosignals] {
verbose "Skipping sigall-reverse.exp because of nosignals."
return
}
if ![supports_reverse] {
return
}
gdb_exit
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
standard_testfile
if {[build_executable $testfile.exp $testfile $srcfile debug] == -1} {
return -1
}
proc test_one_sig {nextsig} {
global sig_supported
global gdb_prompt
global thissig
set this_sig_supported $sig_supported
gdb_test "handle SIG$thissig stop print" \
"SIG$thissig\[ \t\]*Yes\[ \t\]*Yes\[ \t\]*Yes.*"
gdb_test "b handle_$thissig" "Breakpoint \[0-9\]+ .*"
gdb_test "b gen_$nextsig" "Breakpoint \[0-9\]+ .*"
set need_another_continue 1
set missed_handler 0
if $this_sig_supported then {
if { $thissig == "IO" } {
setup_xfail "i*86-pc-linuxoldld-gnu" "i*86-pc-linuxaout-gnu"
}
set testmsg "get signal $thissig"
gdb_test_multiple "continue" $testmsg {
-re "Program received signal SIG$thissig.*handle_$thissig.*$gdb_prompt $" {
fail "$testmsg (wrong location)"
}
-re "Program received signal SIG$thissig.*$gdb_prompt $" {
pass $testmsg
}
-re "Breakpoint.* handle_$thissig.*$gdb_prompt $" {
xfail $testmsg
set need_another_continue 0
}
}
}
if $need_another_continue then {
if { $thissig == "URG" } {
setup_xfail "i*86-pc-linuxoldld-gnu" "i*86-pc-linuxaout-gnu"
}
# Either Lynx or GDB screws up on SIGPRIO
if { $thissig == "PRIO" } {
setup_xfail "*-*-*lynx*"
}
set testmsg "send signal $thissig"
gdb_test_multiple "continue" $testmsg {
-re "Breakpoint.*handle_$thissig.*$gdb_prompt $" {
pass $testmsg
}
-re "Breakpoint.*gen_$nextsig.*kill.*$gdb_prompt $" {
fail "missed breakpoint at handle_$thissig"
set missed_handler 1
}
}
}
if { $missed_handler == "0" } then {
set testmsg "advance to $nextsig"
gdb_test_multiple "signal 0" $testmsg {
-re "Breakpoint.*gen_$nextsig.*kill.*$gdb_prompt $" {
pass $testmsg
set sig_supported 1
}
-re "Breakpoint.*gen_$nextsig.*handle.*$gdb_prompt $" {
pass $testmsg
set sig_supported 0
}
}
}
set thissig $nextsig
}
proc test_one_sig_reverse {prevsig} {
global gdb_prompt
gdb_test "reverse-continue" "Breakpoint .* handle_$prevsig.*" \
"reverse to handler of $prevsig"
set saw_signal 0
set testmsg "reverse to gen_$prevsig"
gdb_test_multiple "reverse-continue" $testmsg {
-re "Breakpoint.*handle_.*$gdb_prompt " {
pass "$testmsg (un-handled)"
}
-re "Program received signal SIG$prevsig.*$gdb_prompt " {
pass "reverse to signal event, $prevsig"
set nested_testmsg "reverse signal delivered"
gdb_test_multiple "frame" $nested_testmsg {
-re ".*handle_$prevsig.*$gdb_prompt " {
fail "$nested_testmsg (wrong location)"
}
-re ".*$gdb_prompt " {
pass $nested_testmsg
}
}
set saw_signal 1
send_gdb "reverse-continue\n"
exp_continue
}
-re "Breakpoint.*kill.*$gdb_prompt " {
if { $saw_signal } then {
pass "$testmsg (handled)"
} else {
xfail "$testmsg (handled)"
}
}
-re "No more reverse-execution history.*kill.*$gdb_prompt " {
if { $saw_signal } then {
pass "$testmsg (handled)"
} else {
xfail "$testmsg (handled)"
}
}
}
}
gdb_load $binfile
runto gen_ABRT
if [supports_process_record] {
# Activate process record/replay
gdb_test_no_output "record" "Turn on process record"
}
# The list of signals that the program generates, in the order they
# are generated.
set signals {
ABRT
HUP
QUIT
ILL
EMT
FPE
BUS
SEGV
SYS
PIPE
ALRM
URG
TSTP
CONT
CHLD
TTIN
TTOU
IO
XCPU
XFSZ
VTALRM
PROF
WINCH
LOST
USR1
USR2
PWR
POLL
WIND
PHONE
WAITING
LWP
DANGER
GRANT
RETRACT
MSG
SOUND
SAK
PRIO
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
TERM
}
# Make the first signal SIGABRT because it is always supported.
set sig_supported 1
set thissig "ABRT"
# test signal handling
foreach sig [lrange $signals 1 end] {
test_one_sig $sig
}
# The last signal (SIGTERM) gets handled slightly differently because
# we are not setting up for another test.
gdb_test "handle SIGTERM stop print" \
"SIGTERM\[ \t\]*Yes\[ \t\]*Yes\[ \t\]*Yes.*"
gdb_test "b handle_TERM" "Breakpoint \[0-9\]+ .*"
gdb_test "continue" \
"Continuing.*Program received signal SIGTERM.*" \
"get signal TERM"
gdb_test "continue" "Breakpoint.*handle_TERM.*" "send signal TERM"
set savedtimeout $timeout
if { [target_info exists gdb,timeout]
&& $timeout < [target_info gdb,timeout] } {
set oldtimeout [target_info gdb,timeout]
} else {
set oldtimeout $timeout
}
set timeout [expr $oldtimeout * 2]
gdb_test "continue" "\[process \[0-9\]+ .*" "continue to signal exit" \
"The next instruction is syscall exit_group.* program...y. or n. " \
"yes"
set timeout $savedtimeout
foreach sig [lreverse $signals] {
test_one_sig_reverse $sig
}
# Make the first signal SIGABRT because it is always supported.
set sig_supported 1
set thissig "ABRT"
foreach sig [lrange $signals 1 end] {
test_one_sig $sig
}