* elf64-ppc.c (dec_dynrel_count): Don't error when elf_gc_sweep_symbol
[external/binutils.git] / gdb / testsuite / gdb.base / consecutive.exp
index 0a81297..dd29431 100644 (file)
@@ -1,4 +1,4 @@
-#   Copyright 2001, 2007 Free Software Foundation, Inc.
+#   Copyright 2001-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
 # 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 Michael Snyder. (msnyder@redhat.com)
 
-if $tracelevel then {
-    strace $tracelevel
-}
-
 #
 # Test breakpoints at consecutive instruction addresses.
 #
 
-set prms_id 0
-set bug_id 0
 
 set testfile "consecutive"
 set srcfile ${testfile}.c
@@ -38,7 +29,7 @@ if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
     return -1
 }
 
-if [get_compiler_info ${binfile}] {
+if [get_compiler_info] {
     return -1
 }
 
@@ -47,10 +38,6 @@ gdb_start
 gdb_reinitialize_dir $srcdir/$subdir
 gdb_load ${binfile}
 
-if [target_info exists gdb_stub] {
-    gdb_step_for_stub;
-}
-
 if ![runto_main] then {
     perror "couldn't run to breakpoint"
     continue
@@ -65,32 +52,17 @@ gdb_test "continue" "Breakpoint $decimal, foo .*" \
 set bp_addr 0
 set stop_addr 0
 
-send_gdb "x /2i \$pc\n"
-gdb_expect {
-    global hex
-    global nl
-    global bp_addr
-    global gdb_prompt
-
-    -re "$hex.*${nl}($hex).*$gdb_prompt $" {
+gdb_test_multiple "x /2i \$pc" "get breakpoint address for foo" {
+    -re "=> $hex.*${nl}   ($hex).*$gdb_prompt $" {
        set bp_addr $expect_out(1,string)
        pass "get breakpoint address for foo"
     }
-    -re ".*$gdb_prompt $" {
-       fail "get breakpoint address for foo"
-       return 0;
-    }
-    timeout {
-       fail "get breakpoint address for foo (timeout)"
-       return 0;
-    }
 }
 
 gdb_test "break \*$bp_addr" "Breakpoint $decimal at $bp_addr: file .*" \
        "set bp, 2nd instr"
 
-send_gdb "step\n"
-gdb_expect {
+gdb_test_multiple "step" "stopped at bp, 2nd instr" {
     -re "Breakpoint $decimal, ($hex) in foo.*$gdb_prompt $" {
        set stop_addr $expect_out(1,string)
        if [eval expr "$bp_addr == $stop_addr"] then {
@@ -99,12 +71,5 @@ gdb_expect {
            fail "stopped at bp, 2nd instr (wrong address)"
        }
     }
-    -re ".*$gdb_prompt $" {
-       fail "stopped at bp, 2nd instr"
-    }
-    timeout {
-       fail "stopped at bp, 2nd instr (timeout)"
-
-    }
 }