[prev in list] [next in list] [prev in thread] [next in thread]
List: gdb-patches
Subject: [PATCH 1/7 v3] powerpc: Support z-point type in gdbserver.
From: cole945 () gmail ! com (Wei-cheng Wang)
Date: 2015-03-30 16:31:00
Message-ID: 1427733032-64989-1-git-send-email-cole945 () gmail ! com
[Download RAW message or body]
Support z-point, so tracepoints and breakpoints can be inserted at the same
location.
gdb/gdbserver/ChangeLog
2015-03-30 Wei-cheng Wang <cole945@gmail.com>
* linux-ppc-low.c (ppc_supports_z_point_type): New function:
(ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type.
---
gdb/gdbserver/linux-ppc-low.c | 23 ++++++++++++++++++++++-
1 file changed, 22 insertions(+), 1 deletion(-)
diff --git a/gdb/gdbserver/linux-ppc-low.c b/gdb/gdbserver/linux-ppc-low.c
index 188fac0..8a0d5df 100644
--- a/gdb/gdbserver/linux-ppc-low.c
+++ b/gdb/gdbserver/linux-ppc-low.c
@@ -512,6 +512,27 @@ ppc_breakpoint_at (CORE_ADDR where)
return 0;
}
+/* Implement supports_z_point_type target-ops.
+ Returns true if type Z_TYPE breakpoint is supported.
+
+ Handling software breakpoint at server side, so tracepoints
+ and breakpoints can be inserted at the same location. */
+
+static int
+ppc_supports_z_point_type (char z_type)
+{
+ switch (z_type)
+ {
+ case Z_PACKET_SW_BP:
+ return 1;
+ case Z_PACKET_HW_BP:
+ case Z_PACKET_WRITE_WP:
+ case Z_PACKET_ACCESS_WP:
+ default:
+ return 0;
+ }
+}
+
/* Provide only a fill function for the general register set. ps_lgetregs
will use this for NPTL support. */
@@ -690,7 +711,7 @@ struct linux_target_ops the_low_target = {
NULL,
0,
ppc_breakpoint_at,
- NULL, /* supports_z_point_type */
+ ppc_supports_z_point_type, /* supports_z_point_type */
NULL,
NULL,
NULL,
--
1.9.1
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic