This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] An implementation of pipe to make I/O communication between gdb and shell. [MinGW question]
On Wed, 17 Aug 2011 10:26:36 +0200, Abhijit Halder wrote:
> --- src/gdb/testsuite/gdb.base/pipe.exp 2011-08-16 22:37:45.969351119 +0530
> +++ dst/gdb/testsuite/gdb.base/pipe.exp 2011-08-17 13:49:26.195383001 +0530
> @@ -0,0 +1,37 @@
> +# Copyright 2011 Free Software Foundation, Inc.
Excessive two spaces.
[...]
> +set testfile "pipe"
> +set tempfile "temp.xxx"
[...]
> +gdb_test "pipe | p 'x' | cat >$tempfile ; if \[ -f $tempfile \] ; \
> + then echo \"SUCCESS\" ; rm -f $tempfile ; fi" "SUCCESS"
This will create file in current directory, that should not happen. Please
use ${objdir}/${subdir} and also ${testfile} prefix, something like:
set tempfile ${objdir}/${subdir}/${testfile}.x
$tempfile should be deleted first as otherwise it may create false PASSes.
Optional - not required but I would find better: You could use TCL `file
exists' and `file delete' instead of making some more dependencies on host
shell compatibility. You could also check the content of such file, whether
the redirection was successful, lib/gdb.exp build_id_debug_filename_get
contains reading of a file by TCL.
Thanks,
Jan