public inbox for gdb-cvs@sourceware.org help / color / mirror / Atom feed
From: Andrew Burgess <aburgess@sourceware.org> To: gdb-cvs@sourceware.org Subject: [binutils-gdb] gdb/testsuite/ada: Handle missing debug info case Date: Mon, 07 Oct 2019 12:18:00 -0000 [thread overview] Message-ID: <20191007121844.37542.qmail@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=60ff3cd784ac3a96084af21e4c945fe6925cd1fa commit 60ff3cd784ac3a96084af21e4c945fe6925cd1fa Author: Andrew Burgess <andrew.burgess@embecosm.com> Date: Mon Oct 7 13:10:55 2019 +0100 gdb/testsuite/ada: Handle missing debug info case Update a test script to handle the case where missing Ada debug information means we can't catch exceptions. This was discussed on the list here: https://sourceware.org/ml/gdb-patches/2019-08/msg00607.html And is similar to code that already exists in the test scripts gdb.ada/catch_ex.exp and gdb.ada/mi_catch_ex.exp. gdb/testsuite/ChangeLog: * gdb.ada/catch_ex_std.exp: Handle being unabled to catch Ada exceptions due to missing debug information. Diff: --- gdb/testsuite/ChangeLog | 5 +++++ gdb/testsuite/gdb.ada/catch_ex_std.exp | 25 ++++++++++++++++++------- 2 files changed, 23 insertions(+), 7 deletions(-) diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index c3fc339..4adf16a 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-10-07 Andrew Burgess <andrew.burgess@embecosm.com> + + * gdb.ada/catch_ex_std.exp: Handle being unabled to catch Ada + exceptions due to missing debug information. + 2019-10-07 Tom de Vries <tdevries@suse.de> * gdb.base/default.exp: Expect _gdb_major/_gdb_minor to be 9.1. diff --git a/gdb/testsuite/gdb.ada/catch_ex_std.exp b/gdb/testsuite/gdb.ada/catch_ex_std.exp index 839d0bb..f3a4e59 100644 --- a/gdb/testsuite/gdb.ada/catch_ex_std.exp +++ b/gdb/testsuite/gdb.ada/catch_ex_std.exp @@ -95,12 +95,23 @@ if {![runto_main]} then { return 0 } -gdb_test "catch exception some_kind_of_error" \ - "Catchpoint \[0-9\]+: `some_kind_of_error' Ada exception" +set can_catch_exceptions 0 +gdb_test_multiple "catch exception some_kind_of_error" "" { + -re "Catchpoint \[0-9\]+: `some_kind_of_error' Ada exception\r\n$gdb_prompt $" { + pass $gdb_test_name + set can_catch_exceptions 1 + } -gdb_test "cont" \ - "Catchpoint \[0-9\]+, .* at .*foo\.adb:\[0-9\]+.*" \ - "caught the exception" + -re "Your Ada runtime appears to be missing some debugging information.\r\nCannot insert Ada exception catchpoint in this configuration.\r\n$gdb_prompt $" { + unsupported $gdb_test_name + } +} -gdb_test "print \$_ada_exception = some_package.some_kind_of_error'Address" \ - " = true" +if { $can_catch_exceptions } { + gdb_test "cont" \ + "Catchpoint \[0-9\]+, .* at .*foo\.adb:\[0-9\]+.*" \ + "caught the exception" + + gdb_test "print \$_ada_exception = some_package.some_kind_of_error'Address" \ + " = true" +}
reply other threads:[~2019-10-07 12:18 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20191007121844.37542.qmail@sourceware.org \ --to=aburgess@sourceware.org \ --cc=gdb-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).