OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [insight/] [gdb/] [testsuite/] [gdb.hp/] [gdb.threads-hp/] [usrthfork.exp] - Blame information for rev 1767

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 578 markom
# user_th_basic.exp -- Expect script to test gdb with user threads
2
# Copyright (C) 1992 Free Software Foundation, Inc.
3
 
4
# This program is free software; you can redistribute it and/or modify
5
# it under the terms of the GNU General Public License as published by
6
# the Free Software Foundation; either version 2 of the License, or
7
# (at your option) any later version.
8
#
9
# This program is distributed in the hope that it will be useful,
10
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
# GNU General Public License for more details.
13
#
14
# You should have received a copy of the GNU General Public License
15
# along with this program; if not, write to the Free Software
16
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
17
 
18
# Please email any bugs, comments, and/or additions to this file to:
19
# bug-gdb@prep.ai.mit.edu
20
 
21
if $tracelevel {
22
    strace $tracelevel
23
}
24
 
25
if { ![istarget "hppa*-*-hpux*"] || [istarget "hppa2.0w-*-*"] } {
26
    verbose "HPUX thread test ignored for non-hppa or PA64 targets."
27
    return 0
28
}
29
 
30
set testfile usrthfork
31
set srcfile ${srcdir}/${subdir}/${testfile}.c
32
set binfile ${srcdir}/${subdir}/${testfile}
33
 
34
# To build the executable we need to link against the thread library.
35
#
36
#       /opt/ansic/bin/cc -Ae -g -o usrthfork -lcma usrthfork.c
37
#
38
## we have trouble building it on 11.0, so we use the prebuilt
39
## executable instead.
40
##
41
##if { [gdb_compile "${srcdir}/${subdir}/${testfile}.c" "${binfile}" executable {debug additional_flags=-Ae ldflags=-lcma}] != "" } {
42
##    gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
43
##}
44
 
45
#=========================
46
#
47
# Test looking at threads.
48
#
49
gdb_exit
50
gdb_start
51
gdb_reinitialize_dir $srcdir/$subdir
52
gdb_load ${binfile}
53
 
54
gdb_test "set follow-fork-mode parent" ".*" "set follow-fork-mode parent"
55
gdb_test "b main" "Breakpoint 1.*" "b main"
56
gdb_test "run" "Breakpoint 1, main.*:8.*" "run to main"
57
##gdb_test "next" \
58
##    ".*New process.*Detaching after fork from process.*13.*parent.*" \
59
##    "next on CMA fork"
60
send_gdb "next\n"
61
gdb_expect {
62
    -re ".*Detaching after fork from.*$gdb_prompt $" {
63
        pass "next on CMA fork"
64
    }
65
    -re ".*$gdb_prompt $" { fail "next on CMA fork" }
66
    timeout { fail "(timeout) next on CMA fork" }
67
}
68
exec sleep 1
69
 
70
gdb_exit
71
 
72
return 0

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.