From: Tom de Vries <tdevries@suse.de>
To: Andrew Burgess <andrew.burgess@embecosm.com>, gdb-patches@sourceware.org
Cc: Richard Bunt <Richard.Bunt@arm.com>
Subject: [committed][gdb/testsuite] Fix gdb.fortran/info-types.exp regexp
Date: Thu, 29 Aug 2019 12:47:00 -0000 [thread overview]
Message-ID: <b3efbfab-12bd-2d48-c434-be19ef90bf6d@suse.de> (raw)
In-Reply-To: <20190828123722.GW6076@embecosm.com>
[-- Attachment #1: Type: text/plain, Size: 1084 bytes --]
[ was: Re: [PATCH 5/7] gdb/fortran: Don't include module symbols when
searching for types ]
On 28-08-19 14:37, Andrew Burgess wrote:
> * Andrew Burgess <andrew.burgess@embecosm.com> [2019-07-27 17:22:33 +0100]:
>
>> Currently the 'info types' command will return symbols that correspond
>> to Fortran modules. This because the symbols are created with domain
>> MODULE_DOMAIN, but address_class LOC_TYPEDEF, which is the same
>> address_class as type symbols.
>>
>> This commit explicitly prevents MODULE_DOMAIN symbols from appearing
>> when we search for symbols in the TYPES_DOMAIN, this prevents the
>> module symbols from appearing in the output of 'info types'.
>>
>> gdb/ChangeLog:
>>
>> * symtab.c (search_symbols): Don't include MODULE_DOMAIN symbols
>> when searching for types.
>>
>> gdb/testsuite/ChangeLog:
>>
>> * gdb.fortran/info-types.exp: Add module.
>> * gdb.fortran/info-types.f90: Update expected results.
>
> I've now pushed this patch as it only depended on the previous patch
> in this series.
I've committed this fix for the test-case.
Thanks,
- Tom
[-- Attachment #2: 0001-gdb-testsuite-Fix-gdb.fortran-info-types.exp-regexp.patch --]
[-- Type: text/x-patch, Size: 2087 bytes --]
[gdb/testsuite] Fix gdb.fortran/info-types.exp regexp
The gdb.fortran/info-types.exp test-case passes with gcc 7 (though not on
openSUSE, due to the extra debug info) and fails with gcc 4.8 and gcc 8.
Fix the gdb_test regexp to fix all those cases.
gdb/testsuite/ChangeLog:
2019-08-29 Tom de Vries <tdevries@suse.de>
* gdb.fortran/info-types.exp: Fix gdb_test regexp to allow more
diverse debug info.
* lib/fortran.exp (fortran_int8): New proc, based on fortran_int4.
---
gdb/testsuite/gdb.fortran/info-types.exp | 11 +++++++----
gdb/testsuite/lib/fortran.exp | 12 ++++++++++++
2 files changed, 19 insertions(+), 4 deletions(-)
diff --git a/gdb/testsuite/gdb.fortran/info-types.exp b/gdb/testsuite/gdb.fortran/info-types.exp
index 81e67395e8..30646287ee 100644
--- a/gdb/testsuite/gdb.fortran/info-types.exp
+++ b/gdb/testsuite/gdb.fortran/info-types.exp
@@ -31,6 +31,7 @@ if { ![runto MAIN__] } {
}
set integer4 [fortran_int4]
+set integer8 [fortran_int8]
set logical4 [fortran_logical4]
set character1 [fortran_character1]
@@ -41,7 +42,9 @@ gdb_test "info types" \
"File .*:" \
"\[\t \]+${character1}" \
"\[\t \]+${integer4}" \
- "\[\t \]+${logical4}" \
- "20:\[\t \]+Type __vtype_mod1_M1t1;" \
- "17:\[\t \]+Type m1t1;" \
- "22:\[\t \]+Type s1;" ]
+ "(\[\t \]+${integer8}" \
+ ")?\[\t \]+${logical4}" \
+ "(20:\[\t \]+Type __vtype_mod1_M1t1;" \
+ ")?$decimal:\[\t \]+Type m1t1;" \
+ "22:\[\t \]+Type s1;(" \
+ ".*)?"]
diff --git a/gdb/testsuite/lib/fortran.exp b/gdb/testsuite/lib/fortran.exp
index 81811dbc3c..d523608807 100644
--- a/gdb/testsuite/lib/fortran.exp
+++ b/gdb/testsuite/lib/fortran.exp
@@ -41,6 +41,18 @@ proc fortran_int4 {} {
}
}
+proc fortran_int8 {} {
+ if {[test_compiler_info {gcc-4-[012]-*}]} {
+ return "int8"
+ } elseif {[test_compiler_info {gcc-*}]} {
+ return "integer\\(kind=8\\)"
+ } elseif {[test_compiler_info {icc-*}]} {
+ return "INTEGER\\(8\\)"
+ } else {
+ return "unknown"
+ }
+}
+
proc fortran_real4 {} {
if {[test_compiler_info {gcc-4-[012]-*}]} {
return "real4"
prev parent reply other threads:[~2019-08-29 12:47 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-27 16:22 [PATCH 0/7] Fortran info types, info modules, info module Andrew Burgess
2019-07-27 16:22 ` [PATCH 3/7] gdb/fortran: Include module variables in 'info variables' output Andrew Burgess
2019-07-27 16:22 ` [PATCH 2/7] gdb: Add an is_declaration field to each symbol Andrew Burgess
2019-07-29 20:21 ` Tom Tromey
2019-07-30 21:00 ` Andrew Burgess
2019-07-27 16:23 ` [PATCH 6/7] gdb/fortran: Add new 'info modules' command Andrew Burgess
2019-07-27 16:45 ` Eli Zaretskii
2019-07-29 20:30 ` Tom Tromey
2019-07-27 16:23 ` [PATCH 1/7] gdb: Add new -n flag to some info commands Andrew Burgess
2019-07-27 16:41 ` Eli Zaretskii
2019-07-30 21:02 ` Andrew Burgess
2019-07-31 14:51 ` Eli Zaretskii
2019-08-26 15:52 ` Andrew Burgess
2019-08-26 16:19 ` Eli Zaretskii
2019-08-27 15:27 ` Andrew Burgess
2019-08-28 15:13 ` [committed][gdb/testsuite] Fix info-var.exp for debug info from other files Tom de Vries
2019-07-29 20:23 ` [PATCH 1/7] gdb: Add new -n flag to some info commands Tom Tromey
2019-07-27 16:23 ` [PATCH 7/7] gdb: Add new commands to list module variables and functions Andrew Burgess
2019-07-27 17:06 ` Eli Zaretskii
2019-07-27 16:23 ` [PATCH 4/7] gdb/fortran: Implement la_print_typedef for Fortran Andrew Burgess
2019-08-28 12:37 ` Andrew Burgess
2019-07-27 16:23 ` [PATCH 5/7] gdb/fortran: Don't include module symbols when searching for types Andrew Burgess
2019-08-28 12:37 ` Andrew Burgess
2019-08-29 9:09 ` Tom de Vries
2019-08-29 11:45 ` Tom de Vries
2019-08-29 12:47 ` Tom de Vries [this message]
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=b3efbfab-12bd-2d48-c434-be19ef90bf6d@suse.de \
--to=tdevries@suse.de \
--cc=Richard.Bunt@arm.com \
--cc=andrew.burgess@embecosm.com \
--cc=gdb-patches@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: link
Be 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