1 # Copyright
2002, 2003, 2004 Free Software Foundation
, Inc.
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
2 of the License
, or
6 #
(at your option
) any later version.
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.
13 # You should have received a copy of the GNU General Public License
14 # along with this
program; if not
, write to the Free Software
15 # Foundation
, Inc.
, 59 Temple Place
- Suite
330, Boston
, MA
02111-1307, USA.
17 # Please email
any bugs
, comments
, and
/or additions to this file to
:
18 # bug
-gdb@prep.ai.mit.edu
20 # This file was written by Michael Snyder
(msnyder@redhat.com
)
21 # This is a test
for the gdb command
"info proc"
33 set srcfile $
{testfile
}.c
34 set srcfile1 $
{testfile
}1.c
35 set binfile $
{objdir
}/$
{subdir
}/$
{testfile
}
37 if { [gdb_compile
"${srcdir}/${subdir}/${srcfile}" "${binfile}0.o" object {debug nowarnings}] != "" } {
38 gdb_suppress_entire_file
"Testcase compile failed, so all tests in this file will automatically fail."
41 if { [gdb_compile
"${srcdir}/${subdir}/${srcfile1}" "${binfile}1.o" object {debug nowarnings}] != "" } {
42 gdb_suppress_entire_file
"Testcase compile failed, so all tests in this file will automatically fail."
45 if { [gdb_compile
"${binfile}0.o ${binfile}1.o" "${binfile}" executable {debug nowarnings}] != "" } {
46 gdb_suppress_entire_file
"Testcase compile failed, so all tests in this file will automatically fail."
49 # Start with a fresh gdb.
53 gdb_reinitialize_dir $srcdir
/$subdir
56 # Does this gdb support
info proc?
57 send_gdb
"help info proc\n"
59 -re
"Undefined info command: .proc.. Try .help info.*$gdb_prompt $" {
60 #
info proc command not supported
-- nothing to test here.
61 unsupported
"gdb does not support info proc on this target"
64 -re
"Show /proc process information about .*$gdb_prompt $" {
67 -re
".*$gdb_prompt $" {
71 fail
"help info proc (timeout)"
75 gdb_test
"info proc" "No current process.*" "info proc without a process"
77 if { ! [ runto_main
] } then {
78 gdb_suppress_entire_file
"Run to main failed, so all tests in this file will automatically fail."
81 gdb_test
"info proc" "process ${decimal}.*" "info proc with process"
83 gdb_test
"info proc mapping" \
84 ".*Mapped address spaces:.*${hex}${ws}${hex}${ws}${hex}${ws}${hex}.*" \