gdb/testsuite/
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.base / list.exp
index 931f08b0ba06c297ec955a4e11ba45867c3e88f9..d967dd2384d4a507a11dfc74b9c89771432fdd78 100644 (file)
@@ -1,5 +1,5 @@
-# Copyright 1992, 1994, 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2007, 2008
-# Free Software Foundation, Inc.
+# Copyright 1992, 1994, 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2007, 2008,
+# 2009, 2010, 2011 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
 # This file was written by Fred Fish. (fnf@cygnus.com)
 
 if $tracelevel then {
        strace $tracelevel
 }
 
-set prms_id 0
-set bug_id 0
 
 set testfile "list"
 set binfile ${objdir}/${subdir}/${testfile}
@@ -68,7 +63,7 @@ proc set_listsize { arg } {
     global set_listsize_count;
 
     incr set_listsize_count;
-    if [gdb_test "set listsize $arg" "" "setting listsize to $arg #$set_listsize_count"] {
+    if [gdb_test "set listsize $arg" ".*" "setting listsize to $arg #$set_listsize_count"] {
        return 0;
     }
     if { $arg <= 0 } {
@@ -86,7 +81,7 @@ proc set_listsize { arg } {
 #
 
 proc test_listsize {} {
-    global gdb_prompt
+    global gdb_prompt use_gdb_stub
     global hp_cc_compiler
     global hp_aCC_compiler
 
@@ -99,7 +94,7 @@ proc test_listsize {} {
     # list the lines there instead of main, so we skip this test for remote targets.
     # The second case is for optimized code, it is still correct.
     
-    if [is_remote target] {
+    if $use_gdb_stub {
        runto_main;
        unsupported "list default lines around main";
     } else {
@@ -476,6 +471,9 @@ proc test_list_filename_and_function {} {
 
     pass "list filename:function ($testcnt tests)"
 
+    # Test with quoting.
+    gdb_test "list 'list0.c:main'" "int main.*"
+
     # Test some invalid specs
     # The following test takes the FIXME result on most systems using
     # DWARF.  It fails to notice that main() is not in the file requested.
@@ -498,7 +496,7 @@ proc test_list_filename_and_function {} {
 proc test_forward_search {} {
        global timeout
 
-       gdb_test "set listsize 4" ""
+       gdb_test_no_output "set listsize 4"
        # On SunOS4, this gives us lines 19-22.  On AIX, it gives us
        # lines 20-23.  This depends on whether the line number of a function
        # is considered to be the openbrace or the first statement--either one
@@ -530,7 +528,7 @@ if [target_info exists gdb_stub] {
     gdb_step_for_stub;
 }
 
-gdb_test "set width 0" "" "set width 0"
+gdb_test_no_output "set width 0"
 
 test_listsize
 get_debug_format
This page took 0.029792 seconds and 4 git commands to generate.