This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC/RFA] (testsuite/Ada) Add gdb_compile_ada


On Thu, Feb 26, 2004 at 02:37:42PM -0800, Joel Brobecker wrote:
> And then building a typical Ada program will be done using the
> following command:
> 
>         % gnatmake -P$objdir/gdb.ada/gnat_ada -g <src_file> -o <dest>
> 
> where <src_file> is the name of the Ada file (*basename* only)
> and <dest> is the name of the executable (can be basename or fullname,
> it doesn't matter)

Great.

> > Also, gdb_compile_ada may want to remove the incremental files in this
> > case, since the testsuite will not use them.
> 
> gnatmake will. For instance gnatmake won't recompile the test programs
> on subsequent runs, unless the sources have changes. Or if we have two
> test programs depending on the same unit, this unit will only be compiled
> once. I think we should keep them, they are useful.

Well, I'm not so sure that qualifies as useful for the testsuite, but
if they go into gdb.ada I don't care :)

> > > +    lappend options "compiler=gnatmake"
> > 
> > See find_gcc in dejagnu's libgloss.exp.
> 
> Could you explain a bit more what you mean (sorry, dejagnu is still
> new to me, and I have allergic reactions to tcl and expect :-/)?
> Do you means that I should create a new find_gnatmake function and
> then do
> 
>         lappend options "compiler=[find_gnatmake]"
> 
> instead? I think this is the last sticky point to look at before being
> able to properly submit these changes for inclusion.

Aye.  You can put find_gnatmake in gdb.exp for now and submit it to
dejagnu later.

The basic goals of the function are:
  - Find an in-tree gnatmake and pass it appropriate options to run
    from in-tree, for testing a combined tree.
  - Use [transform], which will supply the appropriate cross prefixes.

> load_lib libgloss.exp
> 
> proc gdb_begin {args expected_output} {
>    gdb_test "begin $args" "$expected_output" "begin command"
> }

What's begin do again in your sources?  Also, I'm not sure about the
need for an ada.exp; what else do you expet to go here?

Otherwise it looks reasonable.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]