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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gdb-7.2/] [gdb/] [testsuite/] [gdb.base/] [info-proc.exp] - Blame information for rev 394

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

Line No. Rev Author Line
1 330 jeremybenn
# Copyright 2002, 2003, 2004, 2007, 2008, 2009, 2010
2
# 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 3 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, see .
16
 
17
# This file was written by Michael Snyder (msnyder@redhat.com)
18
# This is a test for the gdb command "info proc"
19
 
20
if $tracelevel then {
21
        strace $tracelevel
22
}
23
 
24
if { [is_remote target] } then {
25
  continue
26
}
27
 
28
 
29
set ws "\[ \t\]+"
30
 
31
set testfile "break"
32
set srcfile ${testfile}.c
33
set srcfile1 ${testfile}1.c
34
set binfile ${objdir}/${subdir}/${testfile}
35
 
36
if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}0.o" object {debug nowarnings}] != "" } {
37
     untested info-proc.exp
38
     return -1
39
}
40
 
41
if  { [gdb_compile "${srcdir}/${subdir}/${srcfile1}" "${binfile}1.o" object {debug nowarnings}] != "" } {
42
     untested info-proc.exp
43
     return -1
44
}
45
 
46
if  { [gdb_compile "${binfile}0.o ${binfile}1.o" "${binfile}" executable {debug nowarnings}] != "" } {
47
     untested info-proc.exp
48
     return -1
49
}
50
 
51
# Start with a fresh gdb.
52
 
53
gdb_exit
54
gdb_start
55
gdb_reinitialize_dir $srcdir/$subdir
56
gdb_load ${binfile}
57
 
58
# Does this gdb support info proc?
59
gdb_test_multiple "help info proc" "help info proc" {
60
    -re "Undefined info command: .proc..  Try .help info.*$gdb_prompt $" {
61
        # info proc command not supported -- nothing to test here.
62
        unsupported "gdb does not support info proc on this target"
63
        return -1;
64
    }
65
    -re "Show /proc process information about .*$gdb_prompt $" {
66
        pass "help info proc"
67
    }
68
}
69
 
70
gdb_test "info proc" "No current process.*" "info proc without a process"
71
 
72
if { ! [ runto_main ] } then {
73
    untested info-proc.exp
74
    return -1
75
}
76
 
77
gdb_test "info proc" "process ${decimal}.*" "info proc with process"
78
 
79
gdb_test "info proc mapping" \
80
        ".*Mapped address spaces:.*${hex}${ws}${hex}${ws}${hex}${ws}${hex}.*" \
81
        "info proc mapping"

powered by: WebSVN 2.1.0

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