gdb/testsuite/ChangeLog:
authorJim Blandy <jimb@codesourcery.com>
Mon, 13 Feb 2006 18:11:38 +0000 (18:11 +0000)
committerJim Blandy <jimb@codesourcery.com>
Mon, 13 Feb 2006 18:11:38 +0000 (18:11 +0000)
2006-02-13  Jim Blandy  <jimb@redhat.com>

* gdb.base/scope.exp (test_at_main): Remove logic to handle the
case where it takes two "next" commands to skip past the init
call.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/scope.exp

index 2747510..ee17900 100644 (file)
@@ -1,3 +1,9 @@
+2006-02-13  Jim Blandy  <jimb@redhat.com>
+
+       * gdb.base/scope.exp (test_at_main): Remove logic to handle the
+       case where it takes two "next" commands to skip past the init
+       call.
+
 2006-02-12  Fred Fish  <fnf@specifix.com>
 
        * gdb.base/scope.exp (test_at_main): Use gdb_test_multiple
index 49386d2..a9f8dea 100644 (file)
@@ -61,22 +61,12 @@ proc test_at_main {} {
     global subdir
     global hp_cc_compiler
 
-    # skip past init.  There may be a call to __main at the start of
-    # main, so the first next may only get us to the init0 call.
-    gdb_test_multiple "next" "next over init0() in main" {
-       -re "$decimal.*foo \\(\\).*$gdb_prompt $" {
-           pass "next over init0() in main"
-       }
-       -re "$decimal.*init0 \\(\\).*$gdb_prompt $" {
-           send_gdb "next\n"
-           exp_continue
-       }
-       -re ".*$gdb_prompt $" {
-           fail "next over init0() in main"
-           gdb_suppress_tests
-       }
-    }
-
+    # skip past init0.
+    # This used to do an extra "next" if the first one didn't get us
+    # over the call to init0, to handle calls to __main in the
+    # prologue, etc.  But if a breakpoint at main doesn't leave us on
+    # the first line of real code in the function, that's a GDB bug.
+    gdb_test "next" "$decimal.*foo \\(\\);" "next over init0() in main"
 
     # Print scope0.c::filelocal, which is 1