This is the mail archive of the gdb-patches@sourceware.org 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]

[PATCH] gdb.ada/catch_ex.exp, gdb.ada/mi_catch_ex.exp and unsupported catchpoints


Hi!

I get a bunch of cascading failures on gdb.ada/catch_ex.exp and gdb.ada/mi_catch_ex.exp.
These annoy me because the set of FAILs and timeouts is different in
sync vs async.  :-)  But that's actually irrelevant.  The relevant bit of gdb.sum:

Running ../../../gdb/gdb/testsuite/gdb.ada/catch_ex.exp ...
FAIL: gdb.ada/catch_ex.exp: insert catchpoint on all Ada exceptions
FAIL: gdb.ada/catch_ex.exp: info break, catch all Ada exceptions
FAIL: gdb.ada/catch_ex.exp: continuing to first exception (the program exited)
FAIL: gdb.ada/catch_ex.exp: continuing to second exception (the program is no longer running)
FAIL: gdb.ada/catch_ex.exp: insert catchpoint on Program_Error
FAIL: gdb.ada/catch_ex.exp: insert catchpoint on failed assertions
FAIL: gdb.ada/catch_ex.exp: insert catchpoint on unhandled exceptions
FAIL: gdb.ada/catch_ex.exp: info break, second run
FAIL: gdb.ada/catch_ex.exp: continuing to Program_Error exception (the program exited)
FAIL: gdb.ada/catch_ex.exp: continuing to failed assertion (the program is no longer running)
FAIL: gdb.ada/catch_ex.exp: continuing to unhandled exception (the program is no longer running)
FAIL: gdb.ada/catch_ex.exp: continuing to program completion (the program is no longer running)
FAIL: gdb.ada/catch_ex.exp: tcatch exception
FAIL: gdb.ada/catch_ex.exp: continuing to temporary catchpoint (the program exited)
FAIL: gdb.ada/catch_ex.exp: continuing to program completion (the program is no longer running)
Running ../../../gdb/gdb/testsuite/gdb.ada/mi_catch_ex.exp ...
FAIL: gdb.ada/mi_catch_ex.exp: insert catchpoint on all Ada exceptions
FAIL: gdb.ada/mi_catch_ex.exp: continue to exception catchpoint hit (unknown output after running)
FAIL: gdb.ada/mi_catch_ex.exp: continue to exception catchpoint hit (MI error)
FAIL: gdb.ada/mi_catch_ex.exp: continue to exception catchpoint hit (timeout)
FAIL: gdb.ada/mi_catch_ex.exp: continue to exception catchpoint hit (unknown output after running)
FAIL: gdb.ada/mi_catch_ex.exp: continue to exception catchpoint hit (MI error)
FAIL: gdb.ada/mi_catch_ex.exp: continue to exception catchpoint hit (timeout)
FAIL: gdb.ada/mi_catch_ex.exp: continue to exception catchpoint hit (MI error)
FAIL: gdb.ada/mi_catch_ex.exp: continue to exception catchpoint hit (timeout)

And the gdb.log shows:

(gdb) catch exception
Cannot insert catchpoints in this configuration.
(gdb) FAIL: gdb.ada/catch_ex.exp: insert catchpoint on all Ada exceptions
...

So it looks like I just don't have debug info for the runtime on this
machine.  The tests in question already try to detect the case:

    -re "Cannot break on __gnat_raise_nodefer_with_msg in this configuration\.$eol$gdb_prompt $" {
	# If the runtime was not built with enough debug information,
	# or if it was stripped, we can not test exception
	# catchpoints.
	unsupported $msg
	return -1
    }

but they don't match this specific error message.  I can't seem to find the
"Cannot break on" string anywhere, is it escaping me?  The patch below
makes the test accept both variants.  Should we keep the new form
only instead?

(BTW, the "cannot insert catchpoints" error may be a bit confusing,
considering there are other non-Ada catchpoints that will work just
fine.)

gdb/testsuite/
2011-12-06  Pedro Alves  <pedro@codesourcery.com>

	* gdb.ada/catch_ex.exp: Skip as unsupported if "catch exception"
	throws "Cannot insert catchpoints in this configuration".
	* gdb.ada/mi_catch_ex.exp: Likewise.

With the patch I now get:

Running ../../../gdb/gdb/testsuite/gdb.ada/catch_ex.exp ...
Running ../../../gdb/gdb/testsuite/gdb.ada/mi_catch_ex.exp ...

                === gdb Summary ===

# of expected passes            2
# of unsupported tests          2

Okay?

---
 gdb/testsuite/gdb.ada/catch_ex.exp    |    2 +-
 gdb/testsuite/gdb.ada/mi_catch_ex.exp |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/gdb/testsuite/gdb.ada/catch_ex.exp b/gdb/testsuite/gdb.ada/catch_ex.exp
index fa458d8..0ea3256 100644
--- a/gdb/testsuite/gdb.ada/catch_ex.exp
+++ b/gdb/testsuite/gdb.ada/catch_ex.exp
@@ -56,7 +56,7 @@ gdb_test_multiple "catch exception" $msg {
     -re "Catchpoint $any_nb: all Ada exceptions$eol$gdb_prompt $" {
 	pass $msg
     }
-    -re "Cannot break on __gnat_raise_nodefer_with_msg in this configuration\.$eol$gdb_prompt $" {
+    -re "Cannot (insert catchpoints|break on __gnat_raise_nodefer_with_msg) in this configuration\.$eol$gdb_prompt $" {
 	# If the runtime was not built with enough debug information,
 	# or if it was stripped, we can not test exception
 	# catchpoints.
diff --git a/gdb/testsuite/gdb.ada/mi_catch_ex.exp b/gdb/testsuite/gdb.ada/mi_catch_ex.exp
index dadc574..4be1cad 100644
--- a/gdb/testsuite/gdb.ada/mi_catch_ex.exp
+++ b/gdb/testsuite/gdb.ada/mi_catch_ex.exp
@@ -46,7 +46,7 @@ gdb_test_multiple "catch exception" $msg {
     -re "Catchpoint $any_nb: all Ada exceptions$eol$gdb_prompt $" {
 	pass $msg
     }
-    -re "Cannot break on __gnat_raise_nodefer_with_msg in this configuration\.\[\r\n\]+$gdb_prompt $" {
+    -re "Cannot (insert catchpoints|break on __gnat_raise_nodefer_with_msg) in this configuration\.\[\r\n\]+$gdb_prompt $" {
 	# If the runtime was not built with enough debug information,
 	# or if it was stripped, we can not test exception
 	# catchpoints.


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