public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] gdb.ada/catch_ex.exp, gdb.ada/mi_catch_ex.exp and unsupported catchpoints
@ 2011-12-06 17:33 Pedro Alves
  2011-12-07 10:07 ` Joel Brobecker
  0 siblings, 1 reply; 18+ messages in thread
From: Pedro Alves @ 2011-12-06 17:33 UTC (permalink / raw)
  To: gdb-patches; +Cc: Joel Brobecker

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.

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2012-01-10 20:26 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-06 17:33 [PATCH] gdb.ada/catch_ex.exp, gdb.ada/mi_catch_ex.exp and unsupported catchpoints Pedro Alves
2011-12-07 10:07 ` Joel Brobecker
2011-12-07 15:29   ` Pedro Alves
2011-12-07 16:10     ` Pedro Alves
2011-12-07 22:01   ` Tom Tromey
2011-12-07 23:18     ` Joel Brobecker
2011-12-09  3:50       ` Tom Tromey
2011-12-09 17:20       ` Pedro Alves
2011-12-09 18:00         ` Tom Tromey
2011-12-09 18:13           ` Pedro Alves
2011-12-09 18:40             ` Tom Tromey
2011-12-10 22:53               ` Pedro Alves
2011-12-11 20:33                 ` Joel Brobecker
2011-12-20 14:53                 ` Tom Tromey
2012-01-10 20:26                   ` Pedro Alves
2011-12-11 17:42   ` [commit] Ada exception catchpoint support cleanup Joel Brobecker
2011-12-11 17:44   ` [commit] Warn if missing debug info for Ada exception catchpoints Joel Brobecker
2011-12-11 18:04   ` [commit/Ada] improve message when cannot insert Ada exception catchpoint Joel Brobecker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).