From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 44961 invoked by alias); 21 Jan 2016 11:08:11 -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 44951 invoked by uid 89); 21 Jan 2016 11:08:10 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1800, Wire, tracepoint, Watchpoint X-HELO: xyzzy.0x04.net Received: from xyzzy.0x04.net (HELO xyzzy.0x04.net) (109.74.193.254) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 21 Jan 2016 11:08:08 +0000 Received: from hogfather.0x04.net (89-65-66-135.dynamic.chello.pl [89.65.66.135]) by xyzzy.0x04.net (Postfix) with ESMTPS id 3A1323FE60 for ; Thu, 21 Jan 2016 12:08:49 +0100 (CET) Received: by hogfather.0x04.net (Postfix, from userid 1000) id AB3AA5800AC; Thu, 21 Jan 2016 12:08:05 +0100 (CET) From: =?UTF-8?q?Marcin=20Ko=C5=9Bcielnicki?= To: gdb-patches@sourceware.org Cc: =?UTF-8?q?Marcin=20Ko=C5=9Bcielnicki?= Subject: [PATCH] gdbserver/s390: Advertise Z0 packet support. Date: Thu, 21 Jan 2016 11:08:00 -0000 Message-Id: <1453374480-11047-1-git-send-email-koriakin@0x04.net> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2016-01/txt/msg00510.txt.bz2 This is necessary for upcoming tracepoint support - otherwise, setting a tracepoint and a breakpoint on the same address will fail, since gdbserver won't know about gdb's breakpoint. Tested on s390x-ibm-linux-gnu and s390-ibm-linux-gnu, RHEL 7.2. gdb/gdbserver/ChangeLog: * linux-s390-low.c (s390_supports_z_point_type): New function. (struct linux_target_ops): Wire s390_supports_z_point_type in. --- OK to push? gdb/gdbserver/ChangeLog | 5 +++++ gdb/gdbserver/linux-s390-low.c | 16 +++++++++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index 4eb92db..7d28546 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,3 +1,8 @@ +2016-01-21 Marcin Kościelnicki + + * linux-s390-low.c (s390_supports_z_point_type): New function. + (struct linux_target_ops): Wire s390_supports_z_point_type in. + 2016-01-18 Yao Qi * linux-low.c (linux_set_pc_64bit): New function. diff --git a/gdb/gdbserver/linux-s390-low.c b/gdb/gdbserver/linux-s390-low.c index 63728aa..420430b 100644 --- a/gdb/gdbserver/linux-s390-low.c +++ b/gdb/gdbserver/linux-s390-low.c @@ -609,6 +609,20 @@ s390_breakpoint_at (CORE_ADDR pc) return memcmp (c, s390_breakpoint, s390_breakpoint_len) == 0; } +/* Breakpoint/Watchpoint support. */ + +static int +s390_supports_z_point_type (char z_type) +{ + switch (z_type) + { + case Z_PACKET_SW_BP: + return 1; + default: + return 0; + } +} + /* Support for hardware single step. */ static int @@ -687,7 +701,7 @@ struct linux_target_ops the_low_target = { NULL, s390_breakpoint_len, s390_breakpoint_at, - NULL, /* supports_z_point_type */ + s390_supports_z_point_type, NULL, NULL, NULL, -- 2.7.0