From: Fernando Nasser <fnasser@redhat.com>
To: law@redhat.com
Cc: gdb-patches@sources.redhat.com
Subject: Re: constvars.exp & volatile.exp fixes
Date: Wed, 19 Dec 2001 12:54:00 -0000 [thread overview]
Message-ID: <3C20FE6D.B70276C2@redhat.com> (raw)
In-Reply-To: <22600.1008793888@porcupine.cygnus.com>
OK with me. You can check it in.
Fernando
law@redhat.com wrote:
>
> constvars.exp & volatile.exp are failing miserably on the PA when using
> GCC.
>
> The problem is we compile these ".c" files with the C++ compiler.
>
> This causes names to be mangled, but because we're working with a .c
> file, the debugger has set the language to "C", not "C++". Therefore
> it does not demangle the names.
>
> It appears this was done to pacify HP's compilers; particularly since
> if you use GCC all these tests ought to pass without problems.
>
> The fix is pretty obvious. First, we have to get the compiler info
> so that we know whether we're using GCC or one of HP's compilers. Once
> armed with that information, we can arrange to do the right thing for
> whatever compiler we happen to be using.
>
> With this change, there are no unexpected failures in either test when
> using GCC.
>
> * gdb.base/constvars.exp: Only set lang to c++ if we're
> compiling the test with HP's compilers.
> * gdb.base/volatile.exp: Similarly.
>
> Index: constvars.exp
> ===================================================================
> RCS file: /cvs/cvsfiles/devo/gdb/testsuite/gdb.base/constvars.exp,v
> retrieving revision 1.8
> diff -c -3 -p -r1.8 constvars.exp
> *** constvars.exp 2001/09/28 11:46:40 1.8
> --- constvars.exp 2001/12/19 20:26:18
> *************** set testfile "constvars"
> *** 41,47 ****
> set srcfile ${testfile}.c
> set binfile ${objdir}/${subdir}/${testfile}
>
> ! if [istarget "hppa*-*-*"] {
> set lang "c++"
> } else {
> set lang ""
> --- 41,53 ----
> set srcfile ${testfile}.c
> set binfile ${objdir}/${subdir}/${testfile}
>
> ! # Create and source the file that provides information about the compiler
> ! # used to compile the test case.
> ! if [get_compiler_info ${binfile}] {
> ! return -1;
> ! }
> !
> ! if {$hp_aCC_compiler || $hp_cc_compiler} {
> set lang "c++"
> } else {
> set lang ""
> Index: volatile.exp
> ===================================================================
> RCS file: /cvs/cvsfiles/devo/gdb/testsuite/gdb.base/volatile.exp,v
> retrieving revision 1.6
> diff -c -3 -p -r1.6 volatile.exp
> *** volatile.exp 2001/09/28 11:46:40 1.6
> --- volatile.exp 2001/12/19 20:26:18
> *************** set testfile "constvars"
> *** 49,55 ****
> set srcfile ${testfile}.c
> set binfile ${objdir}/${subdir}/${testfile}
>
> ! if [istarget "hppa*-*-*"] {
> set lang "c++"
> } else {
> set lang ""
> --- 49,61 ----
> set srcfile ${testfile}.c
> set binfile ${objdir}/${subdir}/${testfile}
>
> ! # Create and source the file that provides information about the compiler
> ! # used to compile the test case.
> ! if [get_compiler_info ${binfile}] {
> ! return -1;
> ! }
> !
> ! if {$hp_aCC_compiler || $hp_cc_compiler} {
> set lang "c++"
> } else {
> set lang ""
--
Fernando Nasser
Red Hat - Toronto E-Mail: fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario M4P 2C9
prev parent reply other threads:[~2001-12-19 20:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-12-19 12:33 law
2001-12-19 12:54 ` Fernando Nasser [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=3C20FE6D.B70276C2@redhat.com \
--to=fnasser@redhat.com \
--cc=gdb-patches@sources.redhat.com \
--cc=law@redhat.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