From: Michael Snyder Date: Mon, 24 Apr 2000 21:32:51 +0000 (+0000) Subject: 2000-04-24 Michael Snyder X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b84b7669fb731a8b47f1f95860c1cf121de5c0e1;p=binutils-gdb.git 2000-04-24 Michael Snyder * gdb.base/miscexprs.exp: make sizeof long array test portable. * gdb.base/ending-run.exp: After connecting to a remote target, but before running, the target will appear to be in a random location. Specify both a file and a line for breakpoints. Also, the function that calls main may be called 'init' rather than 'start'. --- diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 85052b93a74..8218c235732 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,13 @@ +2000-04-24 Michael Snyder + + * gdb.base/miscexprs.exp: make sizeof long array test portable. + + * gdb.base/ending-run.exp: After connecting to a remote target, + but before running, the target will appear to be in a random + location. Specify both a file and a line for breakpoints. + Also, the function that calls main may be called 'init' + rather than 'start'. + 2000-04-17 Elena Zannoni * gdb.base/help.exp: Update output for add-symbol-file command. diff --git a/gdb/testsuite/gdb.base/ending-run.exp b/gdb/testsuite/gdb.base/ending-run.exp index ec0ea644e9d..089a8a51058 100644 --- a/gdb/testsuite/gdb.base/ending-run.exp +++ b/gdb/testsuite/gdb.base/ending-run.exp @@ -51,12 +51,16 @@ gdb_load ${binfile} # first line in the routine, which turns out to correspond # to the prolog--that's another bug...) # -gdb_test "b 1" ".*Breakpoint.*line 1.*" "bpt at line before routine" -gdb_test "b 13" ".*Note.*also.*Breakpoint.*2.*" + +gdb_test "b ending-run.c:1" ".*Breakpoint.*ending-run.c, line 1.*" \ + "bpt at line before routine" + +gdb_test "b ending-run.c:13" \ + ".*Note.*also.*Breakpoint 2.*ending-run.c, line 13.*" # Set up to go to the next-to-last line of the program # -gdb_test "b 31" ".*Breakpoint.*3.*" +gdb_test "b ending-run.c:31" ".*Breakpoint 3.*ending-run.c, line 31.*" # Expect to hit the bp at line "1", but symbolize this # as line "13". Then try to clear it--this should work. @@ -76,11 +80,12 @@ gdb_expect { # Test some other "clear" combinations # -gdb_test "b 1" ".*Breakpoint.*4.*" -gdb_test "b 13" ".*Note.*also.*Breakpoint.*5.*" -gdb_test "cle 13" ".*Deleted breakpoint 5.*" "Only cleared 1 by line" +gdb_test "b ending-run.c:1" ".*Breakpoint.*4.*" +gdb_test "b ending-run.c:13" ".*Note.*also.*Breakpoint.*5.*" +gdb_test "cle ending-run.c:13" \ + ".*Deleted breakpoint 5.*" "Only cleared 1 by line" -send_gdb "inf line 13\n" +send_gdb "inf line ending-run.c:13\n" gdb_expect { -re ".*address (0x\[0-9a-fA-F]*).*$gdb_prompt $" { set line_eight $expect_out(1,string) @@ -92,12 +97,12 @@ gdb_expect { } } -send_gdb "inf line 14\n" +send_gdb "inf line ending-run.c:14\n" gdb_expect { -re ".*address (0x\[0-9a-fA-F]*).*$gdb_prompt $" { set line_nine $expect_out(1,string) - gdb_test "b 14" ".*Breakpoint.*7.*" - gdb_test "b *$line_nine" ".*Note.*also.*Breakpoint.*8.*" + gdb_test "b ending-run.c:14" ".*Breakpoint 7.*ending-run.c, line 14.*" + gdb_test "b *$line_nine" ".*Note.*also.*Breakpoint 8.*" gdb_test "c" ".*Breakpoint.*7.*callee.*14.*" gdb_test "cle" ".*Deleted breakpoints 8 7.*" "Clear 2 by default" } @@ -141,6 +146,10 @@ gdb_expect { -re ".*in.*start.*$gdb_prompt $" { pass "step out of main" } + -re ".*in.*init.*$gdb_prompt $" { + # This is what happens on sparc64-elf ultra. + pass "step out of main" + } -re ".*in .nope ().*$gdb_prompt $" { # This is what happens on Solaris currently -sts 1999-08-25 pass "step out of main on Solaris" diff --git a/gdb/testsuite/gdb.base/miscexprs.exp b/gdb/testsuite/gdb.base/miscexprs.exp index 97784232c4d..f7a5fd26a6e 100644 --- a/gdb/testsuite/gdb.base/miscexprs.exp +++ b/gdb/testsuite/gdb.base/miscexprs.exp @@ -258,27 +258,14 @@ gdb_expect { } -if [istarget "hppa2.0w*-*-*"] then { -send_gdb "print sizeof(lbig)\n" +send_gdb "print sizeof(lbig)/sizeof(long)\n" gdb_expect { - -re ".\[0-9\]* = 7200.*$gdb_prompt $" { - pass "print value of sizeof(lbig)" + -re ".\[0-9\]* = 900.*$gdb_prompt $" { + pass "print value of sizeof(lbig)/sizeof(long)" } - -re ".*$gdb_prompt $" { fail "print value of sizeof(lbig)" } - timeout { fail "(timeout) print value of sizeof(lbig)" } + -re ".*$gdb_prompt $" { fail "print value of sizeof(lbig)/sizeof(long)" } + timeout { fail "(timeout) print value of sizeof(lbig)/sizeof(long)" } } -} - -if ![istarget "hppa2.0w*-*-*"] then { -send_gdb "print sizeof(lbig)\n" -gdb_expect { - -re ".\[0-9\]* = 3600.*$gdb_prompt $" { - pass "print value of sizeof(lbig)" - } - -re ".*$gdb_prompt $" { fail "print value of sizeof(lbig)" } - timeout { fail "(timeout) print value of sizeof(lbig)" } - } -} send_gdb "print ibig.i\[100\] << 2\n" gdb_expect {