gdb: Add tracepoint support for powerpc.
gdb/gdbserver/ChangeLog: * linux-ppc-low.c (ppc_supports_tracepoints): New function. (struct linux_target_ops): Wire in the above. gdb/testsuite/ChangeLog: * gdb.trace/ftrace.exp: Set arg0exp for ppc. * gdb.trace/mi-trace-unavailable.exp: Set pcnum for ppc. * gdb.trace/pending.exp: Accept leading dot before function name. * gdb.trace/trace-common.h: Add fast tracepoint dummy insn for ppc. * lib/trace-support.exp: Set registers for ppc.
This commit is contained in:
parent
98fa59e9b0
commit
b04fd3bec9
8 changed files with 31 additions and 3 deletions
|
@ -1,3 +1,8 @@
|
|||
2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
|
||||
|
||||
* linux-ppc-low.c (ppc_supports_tracepoints): New function.
|
||||
(struct linux_target_ops): Wire in the above.
|
||||
|
||||
2016-03-03 Yao Qi <yao.qi@linaro.org>
|
||||
|
||||
* linux-low.c: Update comments to start_step_over.
|
||||
|
|
|
@ -756,6 +756,12 @@ ppc_arch_setup (void)
|
|||
current_process ()->tdesc = tdesc;
|
||||
}
|
||||
|
||||
static int
|
||||
ppc_supports_tracepoints (void)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
struct linux_target_ops the_low_target = {
|
||||
ppc_arch_setup,
|
||||
ppc_regs_info,
|
||||
|
@ -782,7 +788,7 @@ struct linux_target_ops the_low_target = {
|
|||
NULL, /* new_fork */
|
||||
NULL, /* prepare_to_resume */
|
||||
NULL, /* process_qsupported */
|
||||
NULL, /* supports_tracepoints */
|
||||
ppc_supports_tracepoints,
|
||||
NULL, /* get_thread_area */
|
||||
NULL, /* install_fast_tracepoint_jump_pad */
|
||||
NULL, /* emit_ops */
|
||||
|
|
|
@ -1,3 +1,11 @@
|
|||
2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
|
||||
|
||||
* gdb.trace/ftrace.exp: Set arg0exp for ppc.
|
||||
* gdb.trace/mi-trace-unavailable.exp: Set pcnum for ppc.
|
||||
* gdb.trace/pending.exp: Accept leading dot before function name.
|
||||
* gdb.trace/trace-common.h: Add fast tracepoint dummy insn for ppc.
|
||||
* lib/trace-support.exp: Set registers for ppc.
|
||||
|
||||
2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
|
||||
|
||||
* gdb.trace/entry-values.exp: Link ${binfile}1.o to ${binfile}1 and
|
||||
|
|
|
@ -242,6 +242,8 @@ if [is_amd64_regs_target] {
|
|||
set arg0exp "*(int *) (\$ebp + 8)"
|
||||
} elseif { [istarget "aarch64*-*-*"] } {
|
||||
set arg0exp "\$x0"
|
||||
} elseif [istarget "powerpc*-*-*"] {
|
||||
set arg0exp "\$r3"
|
||||
} else {
|
||||
set arg0exp ""
|
||||
}
|
||||
|
|
|
@ -137,6 +137,8 @@ proc test_trace_unavailable { data_source } {
|
|||
set pcnum 8
|
||||
} elseif [is_aarch64_target] {
|
||||
set pcnum 32
|
||||
} elseif [istarget "powerpc*-*-*"] {
|
||||
set pcnum 64
|
||||
} else {
|
||||
# Other ports support tracepoint should define the number
|
||||
# of its own pc register.
|
||||
|
|
|
@ -307,7 +307,8 @@ proc pending_tracepoint_installed_during_trace { trace_type } \
|
|||
\[0-9\]+\[\t \]+\(fast |\)tracepoint\[ \]+keep y.*pendfunc2.*" \
|
||||
"tracepoint is resolved"
|
||||
|
||||
gdb_test "tfind start" "#0 $hex in pendfunc2 .*" "tfind test frame 0"
|
||||
# powerpc64 shows "in .pendfunc2" here.
|
||||
gdb_test "tfind start" "#0 $hex in .?pendfunc2 .*" "tfind test frame 0"
|
||||
gdb_test "tfind" "Target failed to find requested trace frame..*" "tfind test frame"
|
||||
}}
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ x86_trace_dummy ()
|
|||
" call " SYMBOL(x86_trace_dummy) "\n" \
|
||||
)
|
||||
|
||||
#elif (defined __aarch64__)
|
||||
#elif (defined __aarch64__) || (defined __powerpc__)
|
||||
|
||||
#define FAST_TRACEPOINT_LABEL(name) \
|
||||
asm (" .global " SYMBOL(name) "\n" \
|
||||
|
|
|
@ -36,6 +36,10 @@ if [is_amd64_regs_target] {
|
|||
set fpreg "x29"
|
||||
set spreg "sp"
|
||||
set pcreg "pc"
|
||||
} elseif [istarget "powerpc*-*-*"] {
|
||||
set fpreg "r31"
|
||||
set spreg "r1"
|
||||
set pcreg "pc"
|
||||
} else {
|
||||
set fpreg "fp"
|
||||
set spreg "sp"
|
||||
|
|
Loading…
Reference in a new issue