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

Daniel Jacobowitz
2004-02-25T20:17:52Z

On Wed, Feb 25, 2004 at 10:32:11AM -0800, Joel Brobecker wrote:
> Continuing my fascinating monologous with myself :)
>
> > - Object files are placed in the testsuite directory. I'd rather
> > see them being placed in gdb.ada.
> >
> > I managed to do this, but I a not completely sure that it's such
> > a good idea after all. See patch below. On the one hand, the object
> > files et al are placed in gdb.ada rather than gdb/testsuite, but
> > on the other hand this has a slight impact in the debug info generated
> > by the compiler, since the source file name is no longer absolute.
> > So this change is not completely transparent for the debugger...
> > What do you think?
>
> Actually, I just noticed that the few tests that do generate object
> files and other compilation artifacts actually leave them in the
> testsuite directory, not inside the gdb.* directories.
>
> So I would be tempted to discard the idea above of making sure that
> all these artifacts be placed in the gdb.ada directory for all Ada
> testcases. Hence the attached patch. One note, however: contrary to
> C where temporary .o files are automatically deleted, gnatmake leaves
> behind. This is to allow incremental builds, similar what make does.
> This will cause a much higher number of object files to be created
> in the testsuite directory. I hope this is fine? Otherwise, we'll
> can use the previous approach, but I believe it should be done
> consistently across all languages.

I would prefer to have them placed in the subdirectory. Can't you
specify an output directory for gnatmake? It seems like a terrible
limitation.

Also, gdb_compile_ada may want to remove the incremental files in this
case, since the testsuite will not use them.
> + lappend options "compiler=gnatmake"

See find_gcc in dejagnu's libgloss.exp.

--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer