This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Avoid timeouts in call-sc.exp


On Thursday 26 August 2004 09:26, Michael Chastain wrote:
> Paul Gilliam <pgilliam@us.ibm.com> wrote:
> > Not to be a pain, but I am a CVS virgin.  Could you check it in inside of
> > a 'script' and send me (or post) the transcript?
>
> Sure, I can do that.
>
> Just fix the syncHronize and "gdb.base/call-sc.exp" bits and send me a
> fresh patch, and I'll commit it and send you a script.  Also I'll dig
> up some CVS references for you.

Thanks a lot.

Here is the new patch..  synchronized and 'exp'idited.  I also updated the 
date.

-=# Paul #=-


2004-08-26  Paul Gilliam  <pgilliam@us.ibm.com>

        * gdb.base/call-sc.exp: Make sure PC is syncronized after the 
"return".


diff -Naur old/call-sc.exp new/call-sc.exp
--- old/call-sc.exp     2004-08-24 01:11:59.000000000 +0000
+++ new/call-sc.exp     2004-08-25 22:27:04.089926216 +0000
@@ -281,6 +281,30 @@
        }
     }

+    # If the previous test did not work, the program counter might
+    # still be inside foo() rather than main().  Make sure the program
+    # counter is is main().
+    #
+    # This happens on ppc64 GNU/Linux with gcc 3.4.1 and a buggy GDB
+
+    set test "return foo; synchronize pc to main()"
+    for {set loop_count 0} {$loop_count < 2} {incr loop_count} {
+      gdb_test_multiple "backtrace 1" $test {
+        -re "#0.*main \\(\\).*${gdb_prompt} $" {
+          pass $test
+          set loop_count 2
+        }
+        -re "#0.*fun \\(\\).*${gdb_prompt} $" {
+          if {$loop_count < 1} {
+            gdb_test "finish" ".*" ""
+          } else {
+            fail $test
+            set loop_count 2
+          }
+        }
+      }
+    }
+
     # Check that the return-value is as expected.  At this stage we're
     # just checking that GDB has returned a value consistent with
     # "return_value_unknown" set above.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]