* gdb.base/gdb1555.exp: Make expected output immune to formatting

changes inside gdb1555.c.
        * gdb.base/pending.exp: Likewise.
This commit is contained in:
Joel Brobecker 2007-08-18 01:21:42 +00:00
parent f91162e199
commit b9c34f673c
3 changed files with 21 additions and 13 deletions

View file

@ -1,3 +1,9 @@
2007-08-17 Joel Brobecker <brobecker@adacore.com>
* gdb.base/gdb1555.exp: Make expected output immune to formatting
changes inside gdb1555.c.
* gdb.base/pending.exp: Likewise.
2007-08-13 Daniel Jacobowitz <dan@codesourcery.com>
* config/default.exp: New file.

View file

@ -66,7 +66,7 @@ if ![runto_main] then {
set name "Step into shared lib function"
gdb_test_multiple "s" $name \
{
-re "hithere2 \\(\\) at.*${libfile}.c:25\r\n25.*a = 21;.*$gdb_prompt $" {
-re "hithere2 \\(\\) at.*${libfile}.c:\[0-9\]+\r\n\[0-9\]+.*a = 21;.*$gdb_prompt $" {
pass $name
}
-re "0x\[0-9a-f\]+ in .* \\(\\) from /lib/ld.so.1.*$gdb_prompt $" {
@ -78,7 +78,7 @@ gdb_test_multiple "s" $name \
set name "Next while in a shared lib function"
gdb_test_multiple "n" $name \
{
-re "26.*return a;.*$gdb_prompt $" {
-re "\[0-9\]+.*return a;.*$gdb_prompt $" {
pass $name
}
-re "Single stepping until exit from function .*, \r\nwhich has no line number information.\r\n\r\nProgram exited normally.*$gdb_prompt $" {

View file

@ -146,9 +146,10 @@ gdb_test "info break" \
# Try a pending break for a line in a source file with a condition
#
gdb_test_multiple "break pendshr.c:26 if x > 3" "Set pending breakpoint 2" {
set bp2_loc [gdb_get_line_number "y = x + 4" ${libfile}.c]
gdb_test_multiple "break pendshr.c:$bp2_loc if x > 3" "Set pending breakpoint 2" {
-re ".*Make breakpoint pending.*y or \\\[n\\\]. $" {
gdb_test "y" "Breakpoint.*pendshr.c:26.*pending." \
gdb_test "y" "Breakpoint.*pendshr.c:$bp2_loc.*pending." \
"Set pending breakpoint 2"
}
}
@ -159,7 +160,7 @@ gdb_test "info break" \
\[\t \]+stop only if k == 1.*
\[\t \]+print k.*
\[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:$mainline.*
\[0-9\]+\[\t \]+breakpoint keep y.*PENDING.*pendshr.c:26 if x > 3.*" \
\[0-9\]+\[\t \]+breakpoint keep y.*PENDING.*pendshr.c:$bp2_loc if x > 3.*" \
"multiple pending breakpoints"
@ -167,9 +168,10 @@ gdb_test "info break" \
# Try a pending break for a line in a source file with ignore count:
#
gdb_test_multiple "break pendshr.c:27" "Set pending breakpoint 3" {
set bp3_loc [gdb_get_line_number "printf" ${libfile}.c]
gdb_test_multiple "break pendshr.c:$bp3_loc" "Set pending breakpoint 3" {
-re ".*Make breakpoint pending.*y or \\\[n\\\]. $" {
gdb_test "y" "Breakpoint.*pendshr.c:27.*pending." \
gdb_test "y" "Breakpoint.*pendshr.c:$bp3_loc.*pending." \
"Set pending breakpoint 3"
}
}
@ -183,8 +185,8 @@ gdb_test "info break" \
\[\t \]+stop only if k == 1.*
\[\t \]+print k.*
\[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:$mainline.*
\[0-9\]+\[\t \]+breakpoint keep y.*PENDING.*pendshr.c:26 if x > 3.*
\[0-9\]+\[\t \]+breakpoint keep y.*PENDING.*pendshr.c:27.*ignore next 2 hits.*" \
\[0-9\]+\[\t \]+breakpoint keep y.*PENDING.*pendshr.c:$bp2_loc if x > 3.*
\[0-9\]+\[\t \]+breakpoint keep y.*PENDING.*pendshr.c:$bp3_loc.*ignore next 2 hits.*" \
"multiple pending breakpoints 2"
#
@ -194,7 +196,7 @@ gdb_test "info break" \
gdb_run_cmd
gdb_test "" \
"Breakpoint.*at.*
Pending breakpoint \"pendshr.c:26 if x > 3\" resolved.*
Pending breakpoint \"pendshr.c:$bp2_loc if x > 3\" resolved.*
Breakpoint.*, main.*$mainline.*" \
"running to main"
@ -212,11 +214,11 @@ Pending breakpoint \"pendfunc1.* resolved.*" \
#
gdb_test "continue" \
".*Breakpoint.*pendfunc1.*at.*pendshr.c:26.*4;" \
".*Breakpoint.*pendfunc1.*at.*pendshr.c:$bp2_loc.*4;" \
"continue to resolved breakpoint 2"
gdb_test "continue" \
".*Breakpoint.*pendfunc1.*at.*pendshr.c:26.*
".*Breakpoint.*pendfunc1.*at.*pendshr.c:$bp2_loc.*
\[$\]1 = 1." \
"continue to resolved breakpoint 1"
@ -230,7 +232,7 @@ gdb_test "disable 7" "" "Disable other breakpoints"
gdb_test "disable 5" "" "Disable other breakpoints"
gdb_test "continue" \
{.*Breakpoint.*pendfunc1.*\(x=3\) at.*pendshr.c:27.*printf.*;} \
".*Breakpoint.*pendfunc1.*\\\(x=3\\\) at.*pendshr.c:$bp3_loc.*printf.*;" \
"continue to resolved breakpoint 3"
delete_breakpoints