From: mec.gnu@mindspring.com (Michael Elizabeth Chastain)
To: cagney@gnu.org, mec.gnu@mindspring.com
Cc: brobecker@gnat.com, gdb-patches@sources.redhat.com
Subject: Re: Problems with dejagnu and c++ tests...
Date: Wed, 04 Feb 2004 22:31:00 -0000 [thread overview]
Message-ID: <20040204223104.7766C4B364@berman.michael-chastain.com> (raw)
ac> (aren't we trying to delete gcc_compiled? :-)
Yes. When the last reference to gcc_compiled goes away,
then we can remove the code that initializes it.
ac> Something based on CPP would be more robust, and avoid assumptions such
ac> as the target has output and can correctly compile / execute code.
ac> Consider what happens when trying to bring up a new GDB+GCC+....
We're running the test suite. If gdb_compile does not work,
or the resulting executables cannot be run, then the test script
cannot run its tests anyways.
Just look at the code in gdb.cp/ambiguous.exp or anywhere else that
calls get_compiler_info:
if [get_compiler_info ${binfile} "c++"] {
return -1;
}
...
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug c++}] != "" } {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
...
gdb_exit
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
gdb_load ${binfile}
get_compiler_info is always followed by gdb_compile.
get_compiler_info should use the same compiler as gdb_compile.
Also, read the comments at the beginning of get_compiler_info.
'Something based on CPP' has a lot of problems with any implementation
that I can think of.
gdb 6.0 had four different implementations:
most targets with c
most targets with c++
hpux|irix with c
hpux|irix with c++
"most targets with c" and "most targets with c++" depended on
a non-standard gcc extension, which is why the hpux|irix targets
needed special cases.
hpux|irix with c++ *did not work*. It used about 100 lines of special
code but did not even use the same compiler as gdb_compile, so it
invoked a different compiler and set the variables wrong.
That's what drove me to rewrite get_compiler_info in the first place.
Michael C
next reply other threads:[~2004-02-04 22:31 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-04 22:31 Michael Elizabeth Chastain [this message]
2004-02-04 22:49 ` Andrew Cagney
-- strict thread matches above, loose matches on Subject: below --
2004-02-04 23:50 Michael Elizabeth Chastain
2004-02-04 23:55 ` Daniel Jacobowitz
2004-02-04 23:03 Michael Elizabeth Chastain
2004-02-04 23:13 ` Daniel Jacobowitz
2004-02-04 14:01 Michael Elizabeth Chastain
2004-02-04 15:41 ` Andrew Cagney
2004-02-04 12:50 Michael Elizabeth Chastain
2004-02-04 13:20 ` Joel Brobecker
2004-02-04 11:58 Joel Brobecker
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=20040204223104.7766C4B364@berman.michael-chastain.com \
--to=mec.gnu@mindspring.com \
--cc=brobecker@gnat.com \
--cc=cagney@gnu.org \
--cc=gdb-patches@sources.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