This is the mail archive of the gdb-patches@sourceware.org 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: [PATCH 07/13] fix up gdb.trace


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


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