* gdb.base/annota1.exp: Allow .*printf in backtraces.
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.java / jprint.exp
index 0268f87fcd88357ddb8883a28f33389326eb3300..dfcde577977310eabeb5103690edfa6b05d70ae5 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 2004 Free Software Foundation, Inc.
+# Copyright 2004, 2006 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
@@ -65,7 +65,14 @@ gdb_test "set print sevenbit-strings" ".*"
 if ![set_lang_java] then {
     # Ref PR gdb:java/1565.  Don't use the simpler "break jmisc.main".
     # As of 2004-02-24 it wasn't working and is being tested separatly.
-    runto "\'${testfile}.main(java.lang.String\[\])\'"
+    # Before GCJ 4.1 (approximately) the demangled name did not include
+    # a method signature; after that point it does include a trailing
+    # signature.
+    runto_main
+    set function "${testfile}.main(java.lang.String\[\])"
+    gdb_breakpoint "\'$function\'" { allow-pending }
+    gdb_breakpoint "\'${function}void\'" { allow-pending }
+    gdb_continue_to_breakpoint $function
 
     gdb_test "p jvclass.addprint(4,5,6)" "sum is 15\r\n.*" "unambiguous static call"
 
This page took 0.024499 seconds and 4 git commands to generate.