public inbox for gdb-testers@sourceware.org help / color / mirror / Atom feed
From: gdb-buildbot@sergiodj.net To: gdb-testers@sourceware.org Subject: [binutils-gdb] gdb/fortran: Add test for module variables in 'info variables' output Date: Tue, 22 Oct 2019 18:05:00 -0000 [thread overview] Message-ID: <0b54364d92d9cddb490f9291ec8eef11086b0917@gdb-build> (raw) *** TEST RESULTS FOR COMMIT 0b54364d92d9cddb490f9291ec8eef11086b0917 *** commit 0b54364d92d9cddb490f9291ec8eef11086b0917 Author: Andrew Burgess <andrew.burgess@embecosm.com> AuthorDate: Wed Jul 24 14:00:07 2019 +0100 Commit: Andrew Burgess <andrew.burgess@embecosm.com> CommitDate: Wed Oct 16 22:22:09 2019 +0100 gdb/fortran: Add test for module variables in 'info variables' output Recent work from Tom Tromey to better handle variables with associated copy relocations has fixed a Fortran issue where module variables wouldn't show up in the output of 'info variables'. This commit adds a test for this functionality to ensure it doesn't get broken in the future. gdb/testsuite/ChangeLog: * gdb.fortran/module.exp: Extend with 'info variables' test. Change-Id: I7306b1d0a9a72947fd48ad7a03f49df774d6573b diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index d2fa9ed24e..395a3ccacf 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2019-10-16 Andrew Burgess <andrew.burgess@embecosm.com> + + * gdb.fortran/module.exp: Extend with 'info variables' test. + 2019-10-16 Andrew Burgess <andrew.burgess@embecosm.com> * boards/cc-with-tweaks.exp: Setup F90_FOR_TARGET and diff --git a/gdb/testsuite/gdb.fortran/module.exp b/gdb/testsuite/gdb.fortran/module.exp index 4d71e7efac..276f7dc3c2 100644 --- a/gdb/testsuite/gdb.fortran/module.exp +++ b/gdb/testsuite/gdb.fortran/module.exp @@ -13,6 +13,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. +load_lib "fortran.exp" + standard_testfile .f90 if { [prepare_for_testing "failed to prepare" $testfile $srcfile {debug f90}] } { @@ -32,6 +34,28 @@ if ![runto MAIN__] then { continue } +set int_type [fortran_int4] + +# Test 'info variables' can find module variables. +gdb_test "info variables -n" \ + [multi_line \ + "All defined variables:" \ + "" \ + "File .*$srcfile:" \ + "18:\[ \t\]+${int_type} mod1::var_const;" \ + "17:\[ \t\]+${int_type} mod1::var_i;" \ + "23:\[ \t\]+${int_type} mod2::var_i;" \ + "28:\[ \t\]+${int_type} mod3::mod1;" \ + "27:\[ \t\]+${int_type} mod3::mod2;" \ + "29:\[ \t\]+${int_type} mod3::var_i;" \ + "33:\[ \t\]+${int_type} modmany::var_a;" \ + "33:\[ \t\]+${int_type} modmany::var_b;" \ + "33:\[ \t\]+${int_type} modmany::var_c;" \ + "33:\[ \t\]+${int_type} modmany::var_i;" \ + "37:\[ \t\]+${int_type} moduse::var_x;" \ + "37:\[ \t\]+${int_type} moduse::var_y;" ] + + # Do not use simple single-letter names as GDB would pick up for expectedly # nonexisting symbols some static variables from system libraries debuginfos.
next reply other threads:[~2019-10-22 18:05 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-10-22 18:05 gdb-buildbot [this message] 2019-10-22 18:05 ` Failures on Ubuntu-Aarch64-m64, branch master gdb-buildbot 2019-10-22 18:39 ` Failures on Ubuntu-Aarch64-native-extended-gdbserver-m64, " gdb-buildbot 2019-10-22 19:08 ` Failures on Ubuntu-Aarch64-native-gdbserver-m64, " gdb-buildbot 2019-11-01 21:36 ` Failures on Fedora-x86_64-m32, " gdb-buildbot 2019-11-01 22:48 ` Failures on Fedora-x86_64-m64, " gdb-buildbot 2019-11-02 1:07 ` Failures on Fedora-x86_64-native-extended-gdbserver-m32, " gdb-buildbot 2019-11-02 5:34 ` Failures on Fedora-x86_64-native-gdbserver-m64, " gdb-buildbot
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=0b54364d92d9cddb490f9291ec8eef11086b0917@gdb-build \ --to=gdb-buildbot@sergiodj.net \ --cc=gdb-testers@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).