ChangeLog:
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.base / info-proc.exp
CommitLineData
0b302171 1# Copyright 2002-2004, 2007-2012 Free Software Foundation, Inc.
ca4976a6
MS
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
e22f8b7c 5# the Free Software Foundation; either version 3 of the License, or
ca4976a6 6# (at your option) any later version.
e22f8b7c 7#
ca4976a6
MS
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.
e22f8b7c 12#
ca4976a6 13# You should have received a copy of the GNU General Public License
e22f8b7c 14# along with this program. If not, see <http://www.gnu.org/licenses/>.
ca4976a6 15
ca4976a6
MS
16# This file was written by Michael Snyder (msnyder@redhat.com)
17# This is a test for the gdb command "info proc"
18
069ed931
UW
19if { [is_remote target] } then {
20 continue
21}
22
ca4976a6 23
ca4976a6
MS
24set ws "\[ \t\]+"
25
a1dea79a
FF
26set testfile "break"
27set srcfile ${testfile}.c
28set srcfile1 ${testfile}1.c
29set binfile ${objdir}/${subdir}/${testfile}
30
fc91c6c2 31if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}0.o" object {debug nowarnings}] != "" } {
b60f0898
JB
32 untested info-proc.exp
33 return -1
a1dea79a
FF
34}
35
fc91c6c2 36if { [gdb_compile "${srcdir}/${subdir}/${srcfile1}" "${binfile}1.o" object {debug nowarnings}] != "" } {
b60f0898
JB
37 untested info-proc.exp
38 return -1
a1dea79a
FF
39}
40
fc91c6c2 41if { [gdb_compile "${binfile}0.o ${binfile}1.o" "${binfile}" executable {debug nowarnings}] != "" } {
b60f0898
JB
42 untested info-proc.exp
43 return -1
ca4976a6
MS
44}
45
46# Start with a fresh gdb.
47
48gdb_exit
49gdb_start
50gdb_reinitialize_dir $srcdir/$subdir
51gdb_load ${binfile}
52
53# Does this gdb support info proc?
a76e022a 54gdb_test_multiple "help info proc" "help info proc" {
ca4976a6
MS
55 -re "Undefined info command: .proc.. Try .help info.*$gdb_prompt $" {
56 # info proc command not supported -- nothing to test here.
57 unsupported "gdb does not support info proc on this target"
58 return -1;
59 }
60 -re "Show /proc process information about .*$gdb_prompt $" {
61 pass "help info proc"
62 }
ca4976a6
MS
63}
64
65gdb_test "info proc" "No current process.*" "info proc without a process"
66
3ad13771 67if { ! [ runto_main ] } then {
b60f0898
JB
68 untested info-proc.exp
69 return -1
ca4976a6
MS
70}
71
72gdb_test "info proc" "process ${decimal}.*" "info proc with process"
73
74gdb_test "info proc mapping" \
75 ".*Mapped address spaces:.*${hex}${ws}${hex}${ws}${hex}${ws}${hex}.*" \
76 "info proc mapping"
This page took 0.98253 seconds and 4 git commands to generate.