This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Check tracefile is generated by binary execution
- From: Stan Shebs <stanshebs at earthlink dot net>
- To: Yao Qi <yao at codesourcery dot com>, gdb-patches at sourceware dot org
- Date: Mon, 21 Apr 2014 16:03:52 -0700
- Subject: Re: [PATCH] Check tracefile is generated by binary execution
- Authentication-results: sourceware.org; auth=none
- References: <1395733933-9366-1-git-send-email-yao at codesourcery dot com>
On 3/25/14 12:52 AM, Yao Qi wrote:
> In gdb.trace/tfile.exp, we execute binary to generate tracefile,
>
> remote_exec target "$binfile"
>
> however, this fails on bare metal target. This patch is to
> handle binary execution failure by running binary in GDB.
> The binary will do some io operation to generate tracefile, so
> we need a check 'target_info exists gdb,nofileio'.
>
> This patch is to check whether tracefile is generated. tfile.exp can
> be skipped if generation is failed, while test_tfind_tfile in
> mi-traceframe-changed.exp is skipped if generated failed. The rest of
> the mi-traceframe-changed.exp can still be executed, because on some
> bare metal targets, the remote stub may support tracepoint but doesn't
> support fileio.
>
> This patch is tested on nios2-elf and arm-none-eabi.
This is OK to push, thanks!
OK, one nit:
> -remote_exec target "$binfile"
> +if { ![generate_tracefile $binfile] } {
> + unsupported "Unable to generate tfile"
"trace file" instead of "tfile" would be clearer to a test-running
person who is not familiar with the details of tracepoint operations.
Stan
stan@codesourcery.com