Re: [PATCH 02/16] gdb: tests: add support for testing FLAT toolchains

Mike Frysinger
2010-03-19T01:26:28Z

[-- Attachment #1: Type: Text/Plain, Size: 1554 bytes --]

On Thursday 18 March 2010 09:38:22 Daniel Jacobowitz wrote:
> On Thu, Mar 18, 2010 at 03:10:40AM -0400, Mike Frysinger wrote:
> > FLAT toolchains output a FLAT binary for the named output and create
> > another file with a .gdb suffix that is used for debugging. So when
> > testing a FLAT toolchain and we need to load up a file, use the .gdb.
>
> FWIW, in our board files, we found it simpler to swap the two. So
> we have a gdb_compile which generates an elf file as foo, and a flat
> file as foo.flt. Nothing in the GDB testsuite except for the board
> file itself needs to access the FLT file.

hmm, that is one way of going about the issue, but personally i feel that this
kind of logic should be in the test suite. imo, the dejagnu framework already
puts too much demand on the end user to simply run `make check`. plus, since
this isnt specific to an arch and FLAT isnt an uncommon target, doing it once
in common code seems like it'd be easier for people to collaborate on.

> That's not the only way to do it, we can accomodate both. But I'm not
> thrilled with having binfmt_flat references scattered around random
> tests. In lib/ maybe, but not everywhere that uses gdb_file_cmd...
>
> Or in the main definition of gdb_compile?

i agree the current patch isnt terrible suave, but i'm not terribly familiar
with the gdb testing framework. so i thought i'd post the patch to garner
feedback on a better way and then attack the problem based on that.

i'll give gdb_compile a try ... thanks !
-mike

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]