Index: gdb/testsuite/gdb.base/annota1.exp |
diff --git a/gdb/testsuite/gdb.base/annota1.exp b/gdb/testsuite/gdb.base/annota1.exp |
index 98b4650a1af619292424d4a67e78f88d7726ee15..541108ac7fc15e717894e0d4b7e38b92453830bb 100644 |
--- a/gdb/testsuite/gdb.base/annota1.exp |
+++ b/gdb/testsuite/gdb.base/annota1.exp |
@@ -1,4 +1,4 @@ |
-# Copyright 1999-2012 Free Software Foundation, Inc. |
+# Copyright 1999-2013 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 |
@@ -25,14 +25,13 @@ if [is_remote target] then { |
return 0 |
} |
+set breakpoints_invalid "\r\n\032\032breakpoints-invalid\r\n" |
# |
# test running programs |
# |
-set testfile "annota1" |
-set srcfile ${testfile}.c |
-set binfile ${objdir}/${subdir}/${testfile} |
+standard_testfile .c |
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug nowarnings}] != "" } { |
untested annota1.exp |
@@ -40,10 +39,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb |
} |
-gdb_exit |
-gdb_start |
-gdb_reinitialize_dir $srcdir/$subdir |
-gdb_load ${binfile} |
+clean_restart ${binfile} |
# The commands we test here produce many lines of output; disable "press |
# <return> to continue" prompts. |
@@ -190,7 +186,7 @@ gdb_test_multiple "print non_existent_value" "print non_existent_value" { |
# we can test annotate-signal-handler-caller |
# |
gdb_test_multiple "break handle_USR1" "break handle_USR1" { |
- -re "\r\n\032\032post-prompt\r\n\r\n\032\032breakpoints-invalid\r\nBreakpoint.*at $hex: file.*$srcfile, line.*\r\n$gdb_prompt$" { |
+ -re "\r\n\032\032post-prompt\r\nBreakpoint.*at $hex: file.*$srcfile, line.*\r\n\032\032breakpoints-invalid\r\n.*$gdb_prompt$" { |
pass "break handle_USR1" |
} |
} |
@@ -199,7 +195,7 @@ gdb_test_multiple "break handle_USR1" "break handle_USR1" { |
# break at printf. When we are stopped at printf, we can test |
# |
gdb_test_multiple "break printf" "break printf" { |
- -re "\r\n\032\032post-prompt\r\n\r\n\032\032breakpoints-invalid\r\nBreakpoint.*at $hex.*$gdb_prompt$" { |
+ -re "\r\n\032\032post-prompt\r\nBreakpoint.*at $hex.*\032\032breakpoints-invalid\r\n.*$gdb_prompt$" { |
pass "break printf" |
} |
-re "\r\n\032\032post-prompt\r\nwarning: Breakpoint address adjusted from $hex to $hex.\r\n\r\n\032\032breakpoints-invalid\r\nBreakpoint.*at $hex.*$gdb_prompt$" { |
@@ -210,7 +206,7 @@ gdb_test_multiple "break printf" "break printf" { |
# |
# get to printf |
# |
-set pat_begin "\r\n\032\032post-prompt\r\nContinuing.\r\n\r\n\032\032starting\(\r\n\r\n\032\032frames-invalid\)+\r\n" |
+set pat_begin "\r\n\032\032post-prompt\r\nContinuing.\r\n\r\n\032\032starting\r\n\r\n\032\032frames-invalid\r\n${breakpoints_invalid}" |
set pat_adjust "warning: Breakpoint 3 address previously adjusted from $hex to $hex.\r\n" |
set pat_end "\r\n\032\032breakpoint 3\r\n\r\nBreakpoint 3, \r\n\032\032frame-begin 0 $hex\r\n\r\n(\032\032frame-address\r\n$hex\r\n\032\032frame-address-end\r\n in \r\n)*.*\032\032frame-function-name\r\n.*printf(@.*)?\r\n\032\032frame-args\r\n.*\032\032frame-end\r\n\r\n\032\032stopped\r\n$gdb_prompt$" |
@@ -279,19 +275,19 @@ if [target_info exists gdb,nosignals] { |
# delete all the breakpoints |
# |
gdb_test_multiple "delete 1" "delete bp 1" { |
- -re "\r\n\032\032post-prompt\r\n$gdb_prompt$" { |
+ -re "\r\n\032\032post-prompt\r\n${breakpoints_invalid}$gdb_prompt$" { |
pass "delete bp 1" |
} |
} |
gdb_test_multiple "delete 2" "delete bp 2" { |
- -re "\r\n\032\032post-prompt\r\n$gdb_prompt$" { |
+ -re "\r\n\032\032post-prompt\r\n${breakpoints_invalid}$gdb_prompt$" { |
pass "delete bp 2" |
} |
} |
gdb_test_multiple "delete 3" "delete bp 3" { |
- -re "\r\n\032\032post-prompt\r\n$gdb_prompt$" { |
+ -re "\r\n\032\032post-prompt\r\n${breakpoints_invalid}$gdb_prompt$" { |
pass "delete bp 3" |
} |
} |
@@ -301,10 +297,10 @@ gdb_test_multiple "delete 3" "delete bp 3" { |
# to test the annotate output for the display command. |
# |
gdb_test_multiple "break main" "break at main" { |
- -re "post-prompt.*\032\032breakpoints-invalid.*Breakpoint 4 at $hex: file ${escapedsrcfile}, line $main_line.*$gdb_prompt$" { |
+ -re "post-prompt.*Breakpoint 4 at $hex: file ${escapedsrcfile}, line $main_line.*\032\032breakpoints-invalid.*$gdb_prompt$" { |
pass "break at main" |
} |
- -re "post-prompt.*\032\032breakpoints-invalid.*Breakpoint 4 at $hex: file .*${srcfile}, line $main_line.*$gdb_prompt$" { |
+ -re "post-prompt.*Breakpoint 4 at $hex: file .*${srcfile}, line $main_line.*\032\032breakpoints-invalid.*$gdb_prompt$" { |
setup_xfail "*-*-*" 1270 |
fail "break at main" |
} |
@@ -365,7 +361,10 @@ gdb_test_multiple "ignore 5 4" "ignore 5 4" { |
} |
gdb_test_multiple "continue" "annotate ignore count change" { |
- -re ".*$srcfile:$value_inc_line:.*\032\032stopped\r\n\r\n\032\032breakpoints-invalid\r\n$gdb_prompt$" { |
+ -re ".*breakpoints-invalid.*breakpoints-invalid.*$gdb_prompt$" { |
+ fail "annotate ignore count change" |
+ } |
+ -re ".*$srcfile:$value_inc_line:.*\032\032stopped\r\n$gdb_prompt$" { |
pass "annotate ignore count change" |
} |
} |
@@ -441,10 +440,10 @@ if { [remote_file host exists core] } { |
} |
proc thread_test {} { |
- global objdir subdir srcdir testfile |
+ global subdir srcdir testfile |
global gdb_prompt old_gdb_prompt |
set srcfile watch_thread_num.c |
- set binfile ${objdir}/${subdir}/${testfile}-watch_thread_num |
+ set binfile [standard_output_file ${testfile}-watch_thread_num] |
set gdb_prompt $old_gdb_prompt |
if { ![get_compiler_info] && [gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug nowarnings}] == "" } { |