This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 07/13] fix up gdb.trace
- From: Pedro Alves <palves at redhat dot com>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 27 Aug 2013 13:26:28 +0100
- Subject: Re: [PATCH 07/13] fix up gdb.trace
- Authentication-results: sourceware.org; auth=none
- References: <1377290210-483-1-git-send-email-tromey at redhat dot com> <1377290210-483-8-git-send-email-tromey at redhat dot com>
On 08/23/2013 09:36 PM, Tom Tromey wrote:
> diff --git a/gdb/testsuite/gdb.trace/mi-traceframe-changed.exp b/gdb/testsuite/gdb.trace/mi-traceframe-changed.exp
...
> +set purely_local 0
> +set tfile_basic tfile-basic.tf
Reads a bit odd to have these defaulted, but...
> +if {![is_remote host] && ![is_remote target]} {
> + set tfile_basic [standard_output_file $tfile_basic]
> + set tfile_dir [file dirname $tfile_basic]/
> + set purely_local 1
> +} else {
> + set tfile_dir ""
... not this one. I'd move all defaults to this else
block. Same in tfile.exp.
> +}
> -# Make sure we are starting fresh.
> -remote_file host delete tfile-basic.tf
> -remote_file target delete tfile-basic.tf
> +if {!$purely_local} {
> + # Make sure we are starting fresh.
> + remote_file host delete tfile-basic.tf
> + remote_file target delete tfile-basic.tf
> +}
Shouldn't we delete the previous version of the file
in local mode? tfile.exp does keep this unconditional.
In tfile.exp:
> -gdb_test "target tfile tfile-basic.tf" "Created tracepoint.*" \
> +gdb_test "target tfile $tfile_basic" "Created tracepoint.*" \
> "target tfile"
>
> gdb_test "info trace" ".*tracepoint.*in write_basic_trace_file.*" \
> @@ -108,7 +125,7 @@ gdb_start
>
> gdb_load $binfile
>
> -gdb_test "target tfile tfile-error.tf" "Created tracepoint.*" \
> +gdb_test "target tfile $tfile_error" "Created tracepoint.*" \
> "target tfile"
This seems to introduce duplicated messages in gdb.sum.
(A good exercise would be to compare gdb.sum before/after whole series.)
--
Pedro Alves