2004-01-09 Elena Zannoni <ezannoni@redhat.com>
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.mi / mi1-symbol.exp
1 # Copyright 2003 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 2 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, write to the Free Software
15 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
16
17 # Please email any bugs, comments, and/or additions to this file to:
18 # bug-gdb@prep.ai.mit.edu
19
20 #
21 # The goal is not to test gdb functionality, which is done by other tests,
22 # but to verify the correct output response to MI operations.
23 #
24
25 load_lib mi-support.exp
26 set MIFLAGS "-i=mi1"
27
28 gdb_exit
29 if [mi_gdb_start] {
30 continue
31 }
32
33 set testfile "basics"
34 set srcfile ${testfile}.c
35 set binfile ${objdir}/${subdir}/${testfile}
36 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-DFAKEARGV}] != "" } {
37 gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
38 }
39
40 mi_run_to_main
41
42 proc test_list_lines {} {
43 global mi_gdb_prompt
44 global hex
45 global decimal
46 global srcfile
47
48 # Test list-lines.
49 # Tests:
50 # -symbol-list-lines ${srcfile}
51
52 mi_gdb_test "-symbol-list-lines ${srcfile}" \
53 "\\^done,lines=\[\{pc=\"$hex\",line=\"$decimal\"\}.*\]" \
54 "symbol-list-lines for source file ${srcfile}"
55
56 }
57
58 test_list_lines
59
60 mi_gdb_exit
61 return 0
This page took 0.05802 seconds and 4 git commands to generate.