Centralize printing "<optimized out>".
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.base / interp.exp
1 # Copyright 2004, 2005, 2007, 2008, 2009, 2010, 2011
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 <http://www.gnu.org/licenses/>.
16
17 # interp.exp Test interpreter-exec command
18
19 if $tracelevel then {
20 strace $tracelevel
21 }
22
23 gdb_start
24
25 # Do not use gdb_test for this test, since it has two prompts.
26 set cmd "interpreter-exec mi \"-var-update *\""
27 gdb_test_multiple $cmd $cmd {
28 -re "\\^done,changelist=\\\[\\\]\r\n$gdb_prompt " {
29 pass "$cmd"
30 gdb_expect 1 {
31 -re "\r\n$gdb_prompt $" { }
32 }
33 }
34 }
35 gdb_test "interpreter-exec console \"show version\"" "GNU gdb .*"
36
37 # Regression test for crash when an exception occurs in mi_parse.
38 gdb_test_multiple "interpreter-exec mi \"-break-insert --thread a\"" \
39 "regression test for mi_parse crash" {
40 -re ".error,msg=.Invalid value for the '--thread' option.\r\n$gdb_prompt " {
41 pass "$cmd"
42 gdb_expect 1 {
43 -re "\r\n$gdb_prompt $" { }
44 }
45 }
46 }
47
48 gdb_exit
This page took 0.059282 seconds and 4 git commands to generate.