From: Joel Brobecker <brobecker@adacore.com>
To: Andrew Burgess <aburgess@redhat.com>
Cc: Nils-Christian Kempke <nils-christian.kempke@intel.com>,
gdb-patches@sourceware.org, brobecker@adacore.com
Subject: Re: [PATCH v2 1/1] gdb, testsuite, fortran: adapt info symbol expected output for intel compilers
Date: Sun, 23 Jan 2022 14:05:39 +0400 [thread overview]
Message-ID: <Ye0oc3vhhL1TOqth@adacore.com> (raw)
In-Reply-To: <20220121164933.GL622389@redhat.com>
> > Info symbol is expected to print the symbol table name of a symbol, since
> > symbol lookup happens via the minimal symbol table. This name
> > corresponds to the linkage name in the full symbol table.
> >
> > For gfortran (and maybe others) these names currently have the form
> > XXXX.NUMBER where XXXX is the symbol name and NUMBER a compiler
> > generated appendix for mangling.
> > An example taken from the modified nested-funcs-2.exp would be
> >
> > ~~~~
> > $ objdump -t ./outputs/gdb.fortran/nested-funcs-2/nested-funcs-2 | grep \
> > increment
> > 00000000000014ab l F .text 0000000000000095 increment.3883
> > 000000000000141c l F .text 000000000000008f increment_program_global.3881
> > ~~~~
> >
> > This mangled name gets recognized by the Ada demangler/decoder and decoded as
> > Ada to XXXX (setting the symbol language to Ada). This leads to output
> > of XXXX over XXXX.NUMBER for info symbol on gfortran symbols.
> >
> > For ifort and ifx the generated linkage names have the form
> > SCOPEA_SCOPEB_XXXX_ which are not recognized by the Ada decoder (or any
> > other demangler for that matter) and thus printed as is.
> > The respective objdump in the above case looks like
> >
> > ~~~~
> > $ objdump -t ./outputs/gdb.fortran/nested-funcs-2/nested-funcs-2 | grep \
> > increment
> > 0000000000403a44 l F .text 0000000000000074 contains_keyword_IP_increment_
> > 0000000000403ab8 l F .text 0000000000000070
> > contains_keyword_IP_increment_program_global_
> > ~~~~
> >
> > In the unmodified testcase this results in 'fails' when ran with the intel
> > compilers:
> >
> > ~~~~
> > >> make check RUNTESTFLAGS="gdb.fortran/nested-funcs-2.exp \
> > GDBFLAGS='$GDBFLAGS' CC_FOR_TARGET='icpc' F90_FOR_TARGET='ifort'"
> >
> > ...
> >
> > === gdb Summary ===
> >
> > \# of expected passes 80
> > \# of unexpected failures 14
> > ~~~~
> >
> > Note that there is no Fortran mangling standard. We keep the gfortran
> > behavior as is and modify the test to reflect ifx and ifort mangled
> > names which fixes above fails.
> >
> > Signed-off-by: Nils-Christian Kempke <nils-christian.kempke@intel.com>
>
> You might want to wait a couple more days in case Joel wants to follow
> up, but I think this looks good.
>
> If Joel doesn't get back to you, then feel free to push this next
> week.
Looks good to me too.
Just for the sake of completeness, one alternative could have been
to use gdb_test_multiple, I believe. But both are equally fine
for me.
Thanks both!
--
Joel
next prev parent reply other threads:[~2022-01-23 10:05 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-17 11:30 [PATCH v2 0/1] " Nils-Christian Kempke
2022-01-17 11:30 ` [PATCH v2 1/1] " Nils-Christian Kempke
2022-01-21 16:49 ` Andrew Burgess
2022-01-23 10:05 ` Joel Brobecker [this message]
2022-01-25 7:45 ` Kempke, Nils-Christian
2022-01-28 18:24 ` Tom Tromey
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=Ye0oc3vhhL1TOqth@adacore.com \
--to=brobecker@adacore.com \
--cc=aburgess@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=nils-christian.kempke@intel.com \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).