[PATCH 18/18] gdb/testsuite: fixup common-block.exp for intel compilers
Kempke, Nils-Christian
nils-christian.kempke@intel.com
Wed May 11 15:31:38 GMT 2022
> -----Original Message-----
> From: Andrew Burgess <aburgess@redhat.com>
> Sent: Wednesday, May 11, 2022 3:29 PM
> To: Kempke, Nils-Christian <nils-christian.kempke@intel.com>; gdb-
> patches@sourceware.org
> Cc: JiniSusan.George@amd.com; Kempke, Nils-Christian <nils-
> christian.kempke@intel.com>
> Subject: Re: [PATCH 18/18] gdb/testsuite: fixup common-block.exp for intel
> compilers
>
> Nils-Christian Kempke <nils-christian.kempke@intel.com> writes:
>
> > The order in which the variables in info common and info locals are
> > displayed is compiler (and dwarf) dependent. While all symbols should
> > be displayed the order is not fixed.
> >
> > I added a gdb_test_multiple that lets ifx and ifort pass in cases where
> > only the order differs.
> > ---
> > gdb/testsuite/gdb.fortran/common-block.exp | 38
> ++++++++++++++++++++--
> > 1 file changed, 35 insertions(+), 3 deletions(-)
> >
> > diff --git a/gdb/testsuite/gdb.fortran/common-block.exp
> b/gdb/testsuite/gdb.fortran/common-block.exp
> > index ac39a4a575..fc38b8d772 100644
> > --- a/gdb/testsuite/gdb.fortran/common-block.exp
> > +++ b/gdb/testsuite/gdb.fortran/common-block.exp
> > @@ -54,8 +54,27 @@ gdb_test "whatis fo_o$suffix" "No symbol
> \"fo_o$suffix\" in current context."
> > gdb_test "ptype fo_o$suffix" "No symbol \"fo_o$suffix\" in current
> context."
> > gdb_test "p fo_o$suffix" "No symbol \"fo_o$suffix\" in current context."
> >
> > -gdb_test "info locals" "ix_x = 11\r\niy_y = 22\r\niz_z = 33\r\nix = 1\r\niy =
> 2\r\niz = 3" "info locals out"
> > -gdb_test "info common" "Contents of F77 COMMON block 'fo_o':\r\nix_x
> = 11\r\niy_y = 22\r\niz_z = 33\r\n\r\nContents of F77 COMMON block
> 'foo':\r\nix = 1\r\niy = 2\r\niz = 3" "info common out"
> > +gdb_test_multiple "info locals" "info locals out" {
> > + # gfortran
> > + -re "ix_x = 11\r\niy_y = 22\r\niz_z = 33\r\nix = 1\r\niy = 2\r\niz =
> 3.*$gdb_prompt $" {
> > + pass $gdb_test_name
> > + }
>
> You can use:
>
> -re -wrap "ix_x = 11\r\niy_y = 22\r\niz_z = 33\r\nix = 1\r\niy = 2\r\niz = 3" {
> ...
> }
>
> to avoid having to add the $gdb_prompt in all of these tests.
>
> Thanks,
> Andrew
Thanks! That is more convenient indeed.
Changed in v2.
Nils
Intel Deutschland GmbH
Registered Address: Am Campeon 10, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de <http://www.intel.de>
Managing Directors: Christin Eisenschmid, Sharon Heck, Tiffany Doon Silva
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928
More information about the Gdb-patches
mailing list