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

Subversion Repositories openrisc_me

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

Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

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