mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-27 22:48:57 +08:00
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:
@ -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>
|
2016-03-03 Yao Qi <yao.qi@linaro.org>
|
||||||
|
|
||||||
* linux-low.c: Update comments to start_step_over.
|
* linux-low.c: Update comments to start_step_over.
|
||||||
|
@ -756,6 +756,12 @@ ppc_arch_setup (void)
|
|||||||
current_process ()->tdesc = tdesc;
|
current_process ()->tdesc = tdesc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
ppc_supports_tracepoints (void)
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
struct linux_target_ops the_low_target = {
|
struct linux_target_ops the_low_target = {
|
||||||
ppc_arch_setup,
|
ppc_arch_setup,
|
||||||
ppc_regs_info,
|
ppc_regs_info,
|
||||||
@ -782,7 +788,7 @@ struct linux_target_ops the_low_target = {
|
|||||||
NULL, /* new_fork */
|
NULL, /* new_fork */
|
||||||
NULL, /* prepare_to_resume */
|
NULL, /* prepare_to_resume */
|
||||||
NULL, /* process_qsupported */
|
NULL, /* process_qsupported */
|
||||||
NULL, /* supports_tracepoints */
|
ppc_supports_tracepoints,
|
||||||
NULL, /* get_thread_area */
|
NULL, /* get_thread_area */
|
||||||
NULL, /* install_fast_tracepoint_jump_pad */
|
NULL, /* install_fast_tracepoint_jump_pad */
|
||||||
NULL, /* emit_ops */
|
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>
|
2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
|
||||||
|
|
||||||
* gdb.trace/entry-values.exp: Link ${binfile}1.o to ${binfile}1 and
|
* 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)"
|
set arg0exp "*(int *) (\$ebp + 8)"
|
||||||
} elseif { [istarget "aarch64*-*-*"] } {
|
} elseif { [istarget "aarch64*-*-*"] } {
|
||||||
set arg0exp "\$x0"
|
set arg0exp "\$x0"
|
||||||
|
} elseif [istarget "powerpc*-*-*"] {
|
||||||
|
set arg0exp "\$r3"
|
||||||
} else {
|
} else {
|
||||||
set arg0exp ""
|
set arg0exp ""
|
||||||
}
|
}
|
||||||
|
@ -137,6 +137,8 @@ proc test_trace_unavailable { data_source } {
|
|||||||
set pcnum 8
|
set pcnum 8
|
||||||
} elseif [is_aarch64_target] {
|
} elseif [is_aarch64_target] {
|
||||||
set pcnum 32
|
set pcnum 32
|
||||||
|
} elseif [istarget "powerpc*-*-*"] {
|
||||||
|
set pcnum 64
|
||||||
} else {
|
} else {
|
||||||
# Other ports support tracepoint should define the number
|
# Other ports support tracepoint should define the number
|
||||||
# of its own pc register.
|
# 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.*" \
|
\[0-9\]+\[\t \]+\(fast |\)tracepoint\[ \]+keep y.*pendfunc2.*" \
|
||||||
"tracepoint is resolved"
|
"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"
|
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" \
|
" call " SYMBOL(x86_trace_dummy) "\n" \
|
||||||
)
|
)
|
||||||
|
|
||||||
#elif (defined __aarch64__)
|
#elif (defined __aarch64__) || (defined __powerpc__)
|
||||||
|
|
||||||
#define FAST_TRACEPOINT_LABEL(name) \
|
#define FAST_TRACEPOINT_LABEL(name) \
|
||||||
asm (" .global " SYMBOL(name) "\n" \
|
asm (" .global " SYMBOL(name) "\n" \
|
||||||
|
@ -36,6 +36,10 @@ if [is_amd64_regs_target] {
|
|||||||
set fpreg "x29"
|
set fpreg "x29"
|
||||||
set spreg "sp"
|
set spreg "sp"
|
||||||
set pcreg "pc"
|
set pcreg "pc"
|
||||||
|
} elseif [istarget "powerpc*-*-*"] {
|
||||||
|
set fpreg "r31"
|
||||||
|
set spreg "r1"
|
||||||
|
set pcreg "pc"
|
||||||
} else {
|
} else {
|
||||||
set fpreg "fp"
|
set fpreg "fp"
|
||||||
set spreg "sp"
|
set spreg "sp"
|
||||||
|
Reference in New Issue
Block a user