-# 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}
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 } {
#
proc test_listsize {} {
- global gdb_prompt
+ global gdb_prompt use_gdb_stub
global hp_cc_compiler
global hp_aCC_compiler
# 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 {
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.
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
gdb_step_for_stub;
}
-gdb_test "set width 0" "" "set width 0"
+gdb_test_no_output "set width 0"
test_listsize
get_debug_format