gdb/doc/
[external/binutils.git] / gdb / testsuite / gdb.base / list.exp
index 6a4153c..c392924 100644 (file)
@@ -98,7 +98,7 @@ proc test_listsize {} {
        runto_main;
        unsupported "list default lines around main";
     } else {
-       gdb_test "list" "(1\[ \t\]+#include \"list0.h\".*10\[ \t\]+x = 0;|2.*11\[ \t\]+foo .x\[+)\]+;)" "list default lines around main"
+       gdb_test "list" "(1\[ \t\]+#include \"list0.h\".*7\[ \t\]+x = 0;\r\n.*10\[ \t\]+foo .x\[+)\]+;)" "list default lines around main"
     }
 
     # Ensure we can limit printouts to one line
@@ -179,7 +179,7 @@ proc test_list_filename_and_number {} {
 
     send_gdb "list list0.c:1\n"
     gdb_expect {
-       -re "1\[ \t\]+#include \"list0.h\".*10\[ \t]+x = 0;\r\n$gdb_prompt $" {
+       -re "1\[ \t\]+#include \"list0.h\".*10\[ \t\]+foo .x\[+)\]+;\r\n$gdb_prompt $" {
            incr testcnt 
        }
        -re ".*$gdb_prompt $" { fail "list list0.c:1" ; gdb_suppress_tests }
@@ -223,7 +223,7 @@ proc test_list_function {} {
     # gcc appears to generate incorrect debugging information for code
     # in include files, which breaks this test.
     # SunPRO cc is the second case below, it's also correct.
-    gdb_test "list main" "(5\[ \t\]+int x;.*14\[ \t\]+foo \[(\]+.*\[)\]+;|1\[ \t\]+#include .*10\[ \t\]+x = 0;)" "list function in source file 1"
+    gdb_test "list main" "(5\[ \t\]+int x;.*8\[ \t\]+foo \[(\]+.*\[)\]+;|1\[ \t\]+#include .*7\[ \t\]+x = 0;)" "list function in source file 1"
 
     # Ultrix gdb takes the second case below; it's also correct.
     # SunPRO cc is the third case.
@@ -335,14 +335,14 @@ proc test_list_backwards {} {
 
     send_gdb "list -\n"
     gdb_expect {
-       -re "8\[ \t\]+breakpoint\[(\]\[)\];.*17\[ \t\]+foo \[(\]+.*\[)\]+;\r\n$gdb_prompt $" { incr testcnt }
+       -re "8\[ \t\]+foo \[(\]+.*\[)\]+;.*17\[ \t\]+foo \[(\]+.*\[)\]+;\r\n$gdb_prompt $" { incr testcnt }
        -re ".*$gdb_prompt $" { fail "list 8-17" ; gdb_suppress_tests }
        timeout { fail "list 8-17 (timeout)" ; gdb_suppress_tests }
     }
 
     send_gdb "list -\n"
     gdb_expect {
-       -re "1\[ \t\]+#include .*7\[ \t\]+set_debug_traps\[(\]\[)\]+;\r\n$gdb_prompt $" { incr testcnt }
+       -re "1\[ \t\]+#include .*7\[ \t\]+x = 0;\r\n$gdb_prompt $" { incr testcnt }
        -re ".*$gdb_prompt $" { fail "list 1-7" ; gdb_suppress_tests }
        timeout { fail "list 1-7 (timeout)" ; gdb_suppress_tests }
     }
@@ -387,7 +387,7 @@ proc test_list_filename_and_function {} {
     # SunPRO cc is the second case below, it's also correct.
     send_gdb "list list0.c:main\n"
     gdb_expect {
-       -re "1\[ \t\]+#include .*10\[ \t\]+x = 0;\r\n$gdb_prompt $" {
+       -re "1\[ \t\]+#include .*10\[ \t\]+foo \[(\]+.*\[)\]+;\r\n$gdb_prompt $" {
            incr testcnt
        }
        -re "5\[ \t\]+int x;.*14\[ \t\]+foo \[(\]+.*\[)\]+;\r\n$gdb_prompt $" {
@@ -524,10 +524,6 @@ gdb_start
 gdb_reinitialize_dir $srcdir/$subdir
 gdb_load ${binfile}
 
-if [target_info exists gdb_stub] {
-    gdb_step_for_stub;
-}
-
 gdb_test_no_output "set width 0"
 
 test_listsize