Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(106)

Side by Side Diff: gdb/testsuite/gdb.base/info-proc.exp

Issue 11969036: Merge GDB 7.5.1 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@master
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « gdb/testsuite/gdb.base/info-os.exp ('k') | gdb/testsuite/gdb.base/info-target.exp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2002-2004, 2007-2012 Free Software Foundation, Inc. 1 # Copyright 2002-2004, 2007-2012 Free Software Foundation, Inc.
2 2
3 # This program is free software; you can redistribute it and/or modify 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 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 5 # the Free Software Foundation; either version 3 of the License, or
6 # (at your option) any later version. 6 # (at your option) any later version.
7 # 7 #
8 # This program is distributed in the hope that it will be useful, 8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of 9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details. 11 # GNU General Public License for more details.
12 # 12 #
13 # You should have received a copy of the GNU General Public License 13 # You should have received a copy of the GNU General Public License
14 # along with this program. If not, see <http://www.gnu.org/licenses/>. 14 # along with this program. If not, see <http://www.gnu.org/licenses/>.
15 15
16 # This file was written by Michael Snyder (msnyder@redhat.com) 16 # This file was written by Michael Snyder (msnyder@redhat.com)
17 # This is a test for the gdb command "info proc" 17 # This is a test for the gdb command "info proc"
18 18
19 if $tracelevel then {
20 strace $tracelevel
21 }
22
23 if { [is_remote target] } then {
24 continue
25 }
26
27
28 set ws "\[ \t\]+" 19 set ws "\[ \t\]+"
29 20
30 set testfile "break" 21 set testfile "break"
31 set srcfile ${testfile}.c 22 set srcfile ${testfile}.c
32 set srcfile1 ${testfile}1.c 23 set srcfile1 ${testfile}1.c
33 set binfile ${objdir}/${subdir}/${testfile} 24 set binfile ${objdir}/${subdir}/${testfile}
34 25
35 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}0.o" object {debu g nowarnings}] != "" } { 26 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}0.o" object {debu g nowarnings}] != "" } {
36 untested info-proc.exp 27 untested info-proc.exp
37 return -1 28 return -1
38 } 29 }
39 30
40 if { [gdb_compile "${srcdir}/${subdir}/${srcfile1}" "${binfile}1.o" object {deb ug nowarnings}] != "" } { 31 if { [gdb_compile "${srcdir}/${subdir}/${srcfile1}" "${binfile}1.o" object {deb ug nowarnings}] != "" } {
41 untested info-proc.exp 32 untested info-proc.exp
42 return -1 33 return -1
43 } 34 }
44 35
45 if { [gdb_compile "${binfile}0.o ${binfile}1.o" "${binfile}" executable {debug nowarnings}] != "" } { 36 if { [gdb_compile "${binfile}0.o ${binfile}1.o" "${binfile}" executable {debug nowarnings}] != "" } {
46 untested info-proc.exp 37 untested info-proc.exp
47 return -1 38 return -1
48 } 39 }
49 40
50 # Start with a fresh gdb. 41 # Start with a fresh gdb.
51 42
52 gdb_exit 43 gdb_exit
53 gdb_start 44 gdb_start
54 gdb_reinitialize_dir $srcdir/$subdir 45 gdb_reinitialize_dir $srcdir/$subdir
55 gdb_load ${binfile} 46 gdb_load ${binfile}
56 47
57 # Does this gdb support info proc? 48 gdb_test "help info proc" "Show /proc process information about .*"
58 gdb_test_multiple "help info proc" "help info proc" { 49
59 -re "Undefined info command: .proc.. Try .help info.*$gdb_prompt $" { 50 gdb_test_multiple "info proc" "info proc without a process" {
51 -re "No current process.*$gdb_prompt $" {
52 » pass "info proc without a process"
53 }
54 -re "Not supported on this target.*$gdb_prompt $" {
60 # info proc command not supported -- nothing to test here. 55 # info proc command not supported -- nothing to test here.
61 unsupported "gdb does not support info proc on this target" 56 unsupported "gdb does not support info proc on this target"
62 return -1; 57 return -1;
63 } 58 }
64 -re "Show /proc process information about .*$gdb_prompt $" {
65 pass "help info proc"
66 }
67 } 59 }
68 60
69 gdb_test "info proc" "No current process.*" "info proc without a process"
70
71 if { ! [ runto_main ] } then { 61 if { ! [ runto_main ] } then {
72 untested info-proc.exp 62 untested info-proc.exp
73 return -1 63 return -1
74 } 64 }
75 65
76 gdb_test "info proc" "process ${decimal}.*" "info proc with process" 66 gdb_test "info proc" "process ${decimal}.*" "info proc with process"
77 67
78 gdb_test "info proc mapping" \ 68 gdb_test "info proc mapping" \
79 ".*Mapped address spaces:.*${hex}${ws}${hex}${ws}${hex}${ws}${hex}.*" \ 69 ".*Mapped address spaces:.*${hex}${ws}${hex}${ws}${hex}${ws}${hex}.*" \
80 "info proc mapping" 70 "info proc mapping"
OLDNEW
« no previous file with comments | « gdb/testsuite/gdb.base/info-os.exp ('k') | gdb/testsuite/gdb.base/info-target.exp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698