This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] gdb.trace: Move more target dependencies to trace-support.exp
- From: Pedro Alves <palves at redhat dot com>
- To: Marcin KoÅcielnicki <koriakin at 0x04 dot net>, gdb-patches at sourceware dot org
- Cc: antoine dot tremblay at ericsson dot com
- Date: Thu, 25 Feb 2016 13:45:35 +0000
- Subject: Re: [PATCH] gdb.trace: Move more target dependencies to trace-support.exp
- Authentication-results: sourceware.org; auth=none
- References: <1455884629-23354-1-git-send-email-koriakin at 0x04 dot net>
On 02/19/2016 12:23 PM, Marcin KoÅcielnicki wrote:
> For some strange reason, the call_insn setting code already knew about
> arm, powerpc, s390, and mips - I went ahead and added the remaining
> information about those. I'm not particularly sure if I got mips right,
> but that won't matter anyway until someone actually writes tracepoint
> support for that.
The gdb.trace/entry-values.exp testcase runs some tests before restarting gdb
for a trace session. That first part of the testcase runs on all targets.
I'm not sure I really like this moving of test-specific variables that aren't
shared by more tests, to the shared trace support file. Several of these are
only used after gdb_target_supports_trace checks. So we could also say that
the problem is that the tests are skipped. E.g., in ftrace.exp:
# This expression is used for testing emit_reg.
if [is_amd64_regs_target] {
set arg0exp "\$rdi"
} elseif [is_x86_like_target] {
set arg0exp "*(int *) (\$ebp + 8)"
} elseif { [istarget "aarch64*-*-*"] } {
set arg0exp "\$x0"
} else {
set arg0exp ""
}
if { "$arg0exp" != "" } {
test_ftrace_condition "($arg0exp > 500)" "globvar" { 6 7 8 9 10 }
}
If we removed the else branch or set arg0exp to "port me", someone porting
fast tracepoints to a new architecture would notice it, instead of silently
getting the test skipped.
Thanks,
Pedro Alves