OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [gdb-7.2/] [gdb-7.2-or32-1.0rc1/] [gdb/] [testsuite/] [gdb.multi/] [base.exp] - Blame information for rev 341

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 330 jeremybenn
# Copyright 2009, 2010 Free Software Foundation, Inc.
2
 
3
# This program is free software; you can redistribute it and/or modify
4
# it under the terms of the GNU General Public License as published by
5
# the Free Software Foundation; either version 3 of the License, or
6
# (at your option) any later version.
7
#
8
# This program is distributed in the hope that it will be useful,
9
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11
# GNU General Public License for more details.
12
#
13
# You should have received a copy of the GNU General Public License
14
# along with this program.  If not, see .
15
 
16
# Test multi-exec / multi-process features that work for all configurations,
17
# even ones that cannot run multiple processes simultaneously.
18
 
19
set testfile "base"
20
 
21
set exec1 "hello"
22
set srcfile1 ${exec1}.c
23
set binfile1 ${objdir}/${subdir}/${exec1}
24
 
25
set exec2 "hangout"
26
set srcfile2 ${exec2}.c
27
set binfile2 ${objdir}/${subdir}/${exec2}
28
 
29
set exec3 "goodbye"
30
set srcfile3 ${exec3}.c
31
set binfile3 ${objdir}/${subdir}/${exec3}
32
 
33
if { [prepare_for_testing ${testfile}.exp ${exec1} "${srcfile1}" {debug nowarnings}] } {
34
    return -1
35
}
36
 
37
if { [prepare_for_testing ${testfile}.exp ${exec2} "${srcfile2}" {debug nowarnings}] } {
38
    return -1
39
}
40
 
41
if { [prepare_for_testing ${testfile}.exp ${exec3} "${srcfile3}" {debug nowarnings}] } {
42
    return -1
43
}
44
 
45
clean_restart ${exec1}
46
 
47
# Add an empty inferior space, switch to it, and load a main
48
# executable into it.
49
gdb_test "add-inferior" "Added inferior 2.*" "add empty inferior 2"
50
gdb_test "inferior 2" "Switching to inferior 2.*" "switch to inferior 2"
51
gdb_test "file ${binfile2}" ".*" "load ${exec2} file in inferior 2"
52
 
53
# Add a new inferior space and load a main executable into it in one
54
# command.
55
gdb_test "add-inferior -exec ${binfile3}" \
56
    "Added inferior 3.*" \
57
    "add inferior 3 with -exec ${exec3}"
58
 
59
# Check that we have multiple spaces.
60
 
61
gdb_test "info inferiors" \
62
    "Executable.*${exec3}.*${exec2}.*${exec1}.*"
63
 
64
# Test that we have multiple symbol tables.
65
 
66
gdb_test "inferior 1" ".*" "switch to inferior 1"
67
gdb_test "info functions commonfun" \
68
    "${srcfile1}.*" \
69
    "'info functions commonfun' in inferior 1"
70
 
71
gdb_test "inferior 3" ".*" "switch to inferior 3"
72
gdb_test "info functions commonfun" \
73
    "${srcfile3}.*" \
74
    "'info functions commonfun' in inferior 3"
75
 
76
gdb_test "inferior 1" ".*" "switch back to inferior 1"
77
 
78
gdb_test_no_output "set listsize 1"
79
 
80
gdb_test "list commonfun" "from hello.*" "list commonfun in hello"
81
 
82
gdb_test "print hglob" "1"
83
 
84
gdb_test "print glob" "92" "print glob (${exec1})"
85
 
86
 
87
gdb_test "inferior 3" ".*" "switch to inferior 3 to print globals"
88
 
89
gdb_test "print gglob" "2"
90
 
91
gdb_test "print glob" "45" "print glob (${exec3})"
92
 
93
gdb_test "list commonfun" "from goodbye.*" "list commonfun in goodbye"
94
 
95
 
96
# Let's run the hello program.
97
gdb_test "inferior 1" ".*" "switch to inferior 1 to run it"
98
 
99
if { ![runto_main] } then {
100
    return -1
101
}
102
 
103
gdb_test "break hello" ".*"
104
gdb_test "continue" "Breakpoint \[0-9\].*, hello.*"

powered by: WebSVN 2.1.0

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