| # OBSOLETE # usrthcore.exp -- Expect script to test gdb with user threads |
| # OBSOLETE # Copyright (C) 1992 Free Software Foundation, Inc. |
| # OBSOLETE |
| # OBSOLETE # This program is free software; you can redistribute it and/or modify |
| # OBSOLETE # it under the terms of the GNU General Public License as published by |
| # OBSOLETE # the Free Software Foundation; either version 2 of the License, or |
| # OBSOLETE # (at your option) any later version. |
| # OBSOLETE # |
| # OBSOLETE # This program is distributed in the hope that it will be useful, |
| # OBSOLETE # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| # OBSOLETE # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| # OBSOLETE # GNU General Public License for more details. |
| # OBSOLETE # |
| # OBSOLETE # You should have received a copy of the GNU General Public License |
| # OBSOLETE # along with this program; if not, write to the Free Software |
| # OBSOLETE # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ |
| # OBSOLETE |
| # OBSOLETE # Please email any bugs, comments, and/or additions to this file to: |
| # OBSOLETE # bug-gdb@prep.ai.mit.edu |
| # OBSOLETE |
| # OBSOLETE # use this to debug: |
| # OBSOLETE # |
| # OBSOLETE #log_user 1 |
| # OBSOLETE |
| verbose "HP's thread tests are broken beyond repair right now." |
| return 0 |
| # OBSOLETE |
| # OBSOLETE if $tracelevel { |
| # OBSOLETE strace $tracelevel |
| # OBSOLETE } |
| # OBSOLETE |
| # OBSOLETE if { [skip_hp_tests] } { continue } |
| # OBSOLETE |
| # OBSOLETE if { ![istarget "hppa*-*-hpux*"] || [istarget "hppa64-*-*"] } { |
| # OBSOLETE verbose "HPUX thread test ignored for non-hppa or PA64 targets." |
| # OBSOLETE return 0 |
| # OBSOLETE } |
| # OBSOLETE |
| # OBSOLETE set testfile usrthcore |
| # OBSOLETE set srcfile ${srcdir}/${subdir}/${testfile}.c |
| # OBSOLETE set binfile ${srcdir}/${subdir}/${testfile} |
| # OBSOLETE |
| # OBSOLETE # To build the executable we need to link against the thread library. |
| # OBSOLETE # |
| # OBSOLETE # /opt/ansic/bin/cc -Ae +DAportable -g -o usrthcore -lcma usrthcore.c |
| # OBSOLETE # |
| # OBSOLETE ## we have trouble building it on 11.0, so we use the prebuilt |
| # OBSOLETE ## executable instead. |
| # OBSOLETE ## |
| # OBSOLETE ##if { [gdb_compile "${srcdir}/${subdir}/${testfile}.c -lcma" "${binfile}" executable {debug additional_flags=-Ae ldflags=-lcma}] != "" } { |
| # OBSOLETE ## gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail." |
| # OBSOLETE ##} |
| # OBSOLETE |
| # OBSOLETE #========================= |
| # OBSOLETE # |
| # OBSOLETE # Test looking at threads in a core file |
| # OBSOLETE # |
| # OBSOLETE |
| # OBSOLETE remote_exec build "rm -f core" |
| # OBSOLETE remote_exec build "${binfile}" |
| # OBSOLETE |
| # OBSOLETE gdb_exit |
| # OBSOLETE gdb_start |
| # OBSOLETE gdb_reinitialize_dir $srcdir/$subdir |
| # OBSOLETE gdb_load ${binfile} |
| # OBSOLETE gdb_test "core-file core" \ |
| # OBSOLETE ".*Core was generated by `usrthcore'.*in main.*usrthcore.c:170.*" \ |
| # OBSOLETE "load corefile" |
| # OBSOLETE |
| # OBSOLETE gdb_test "info thread" \ |
| # OBSOLETE " 4 .*cma__dispatch.*\\* 1 .*in main.*usrthcore.c:170.*" \ |
| # OBSOLETE "info thread on core file" |
| # OBSOLETE gdb_test "bt" "#0.*in main.*usrthcore.c:170" "backtrace on active thread" |
| # OBSOLETE gdb_test "thread 4" ".*Switching to thread 4.*cma__dispatch.*" \ |
| # OBSOLETE "switch to thread 4 (thread2 procedure)" |
| # OBSOLETE gdb_test "bt" "#0.*cma__dispatch.*thread2.*usrthcore.c:99.*" \ |
| # OBSOLETE "Backtrace on inactive thread (thread2 procedure)" |
| # OBSOLETE gdb_test "b thread1" "Breakpoint 1.*usrthcore.c, line 75.*" \ |
| # OBSOLETE "break on thread1" |
| # OBSOLETE gdb_test "run" "Starting program.*Breakpoint 1, thread1.*usrthcore.c:75.*" \ |
| # OBSOLETE "run program, get to thread1 procedure" |
| # OBSOLETE gdb_test "info threads" "\\* \[23\] .*thread1.* 1 .*cma__dispatch.*" \ |
| # OBSOLETE "info threads after running core" |
| # OBSOLETE |
| # OBSOLETE |
| # OBSOLETE # Done! |
| # OBSOLETE # |
| # OBSOLETE gdb_exit |
| # OBSOLETE |
| # OBSOLETE remote_exec build "rm -f core" |
| # OBSOLETE |
| # OBSOLETE return 0 |