From: Daniel Jacobowitz <drow@false.org>
To: Joel Brobecker <brobecker@gnat.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [RFA/testsuite/ada] Add support for building Ada programs
Date: Wed, 31 Mar 2004 16:32:00 -0000 [thread overview]
Message-ID: <20040331163201.GA31286@nevyn.them.org> (raw)
In-Reply-To: <20040329195523.GE888@gnat.com>
On Mon, Mar 29, 2004 at 11:55:23AM -0800, Joel Brobecker wrote:
> Hello,
>
> Based on the discussion between Daniel and myself that started with:
>
> http://sources.redhat.com/ml/gdb-patches/2004-02/msg00695.html
>
> I suggest the addition of a new file in testsuite/lib: ada.exp.
>
> This file contains 2 elements:
> 1. Two procedure that should be provided by dejagnu. The changes
> needed to add support for Ada is not in there yet, so I duplicated
> this code here for now. This only affect testing of Ada programs,
> since a test would need to include "ada.exp" to see these different
> procedures. The plan is also to keep them for a while after they
> are part of a released version of dejagnu, to avoid increasing
> the dejagnu version number requirement when running the GDB testsuite.
There's one problem here. A recurring problem we've had is testcases
tainting other tests, because what you say above isn't quite right -
once ada.exp is loaded, it will remain loaded for the remainder of
the test run.
So, it's good to avoid loading these when not necessary. Here's one
way to do it:
proc gdb_find_gnatmake { } { ... }
proc gdb_default_target_compile { } { ... }
if {[info procs find_gnatmake] == ""} {
proc find_gnatmake { } { return [gdb_find_gnatmake] }
proc default_target_compile { source destfile type options } {
return [gdb_default_target_compile $source $destfile $type $options]
}
}
Yes, in TCL procedure definitions can be conditional. This way, if a
version of DejaGNU which includes your patch is used, the code in GDB
will be ignored in favor of DejaGNU's.
Does the above work?
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
next prev parent reply other threads:[~2004-03-31 16:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-29 19:55 Joel Brobecker
2004-03-31 16:32 ` Daniel Jacobowitz [this message]
2004-03-31 17:40 ` Joel Brobecker
2004-03-31 18:57 ` Daniel Jacobowitz
2004-04-01 0: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=20040331163201.GA31286@nevyn.them.org \
--to=drow@false.org \
--cc=brobecker@gnat.com \
--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