From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 99300 invoked by alias); 30 Mar 2015 16:31:13 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 99290 invoked by uid 89); 30 Mar 2015 16:31:12 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.4 required=5.0 tests=AWL,BAYES_00,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,KAM_FROM_URIBL_PCCC,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=no version=3.3.2 X-HELO: mail-pd0-f179.google.com Received: from mail-pd0-f179.google.com (HELO mail-pd0-f179.google.com) (209.85.192.179) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Mon, 30 Mar 2015 16:31:11 +0000 Received: by pdnc3 with SMTP id c3so180746079pdn.0 for ; Mon, 30 Mar 2015 09:31:08 -0700 (PDT) X-Received: by 10.66.228.104 with SMTP id sh8mr59267715pac.63.1427733068426; Mon, 30 Mar 2015 09:31:08 -0700 (PDT) Received: from localhost.localdomain (114-32-204-230.HINET-IP.hinet.net. [114.32.204.230]) by mx.google.com with ESMTPSA id qo4sm10550523pab.33.2015.03.30.09.31.06 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 30 Mar 2015 09:31:07 -0700 (PDT) From: Wei-cheng Wang To: uweigand@de.ibm.com, gdb-patches@sourceware.org Cc: Wei-cheng Wang Subject: [PATCH 1/7 v3] powerpc: Support z-point type in gdbserver. Date: Mon, 30 Mar 2015 16:31:00 -0000 Message-Id: <1427733032-64989-1-git-send-email-cole945@gmail.com> X-SW-Source: 2015-03/txt/msg00993.txt.bz2 Support z-point, so tracepoints and breakpoints can be inserted at the same location. gdb/gdbserver/ChangeLog 2015-03-30 Wei-cheng Wang * 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