This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Fix gdb.trace/mi-traceframe-changed.exp to check for target trace support
- From: Yao Qi <yao at codesourcery dot com>
- To: Sergio Durigan Junior <sergiodj at redhat dot com>
- Cc: GDB Patches <gdb-patches at sourceware dot org>
- Date: Fri, 10 Jan 2014 10:15:43 +0800
- Subject: Re: [PATCH] Fix gdb.trace/mi-traceframe-changed.exp to check for target trace support
- Authentication-results: sourceware.org; auth=none
- References: <m3mwj4onqn dot fsf at redhat dot com> <52CF4B40 dot 3030500 at codesourcery dot com>
On 01/10/2014 09:22 AM, Yao Qi wrote:
> On 01/10/2014 05:21 AM, Sergio Durigan Junior wrote:
>> > gdb.trace/mi-traceframe-changed.exp was running without actually
>> > checking if the target supported tracing or not. So I wrote this patch
>> > to fix the issue.
> The patch looks a right fix. Any tracepoint related tests should check
> whether target supports tracing or not at first.
>
> I did it through an oversight when I wrote this case.
Ah, I read the patch and mi-traceframe-change.exp again, and find my
last comment is wrong. Sorry for the confusion.
The first half of mi-traceframe-changed.exp (test_tfind_tfile) is to
test "=traceframe-changed" on tfile target, which is produced by
tfile.c. It is expected to run on native debugging. The second half
of mi-traceframe-changed.exp (test_tfile_remote) is to test
"=traceframe-changed" on remote target with a gdbserver connected. We
can see mi-traceframe-changed.exp has already have the code to check
target supports tracing or not.
The root cause is that tfile.c isn't portable and unable to produce
trace file properly for s390x. Search FIXME in it.
We should skip test_find_tfile for targets other than x86-linux or
x86_64-linux. Alternatively, we can modify tfile.c for s390x, but I
think "generating tfile on a unsupported-tracing target" isn't useful.
--
Yao (éå)