From patchwork Sun Feb 7 13:48:25 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Marcin_Ko=C5=9Bcielnicki?= X-Patchwork-Id: 10750 Received: (qmail 46704 invoked by alias); 7 Feb 2016 13:48:30 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 46691 invoked by uid 89); 7 Feb 2016 13:48:30 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 spammy=6096, Advertise, 7.2, Hx-languages-length:1997 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; Sun, 07 Feb 2016 13:48:28 +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 E4F533FE0F for ; Sun, 7 Feb 2016 14:49:14 +0100 (CET) Received: by hogfather.0x04.net (Postfix, from userid 1000) id E34E558008E; Sun, 7 Feb 2016 14:48:25 +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: Sun, 7 Feb 2016 14:48:25 +0100 Message-Id: <1454852905-17184-1-git-send-email-koriakin@0x04.net> In-Reply-To: <1453374480-11047-1-git-send-email-koriakin@0x04.net> References: <1453374480-11047-1-git-send-email-koriakin@0x04.net> MIME-Version: 1.0 X-IsSubscribed: yes 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. --- I've added missing comment. Ping? gdb/gdbserver/ChangeLog | 5 +++++ gdb/gdbserver/linux-s390-low.c | 18 +++++++++++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index fd49585..254341c 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,5 +1,10 @@ 2016-02-07 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-02-07 Marcin Kościelnicki + * tracepoint.c (struct tracepoint_action_ops): Removed. (struct tracepoint_action): Removed ops field. (struct collect_registers_action): Removed. diff --git a/gdb/gdbserver/linux-s390-low.c b/gdb/gdbserver/linux-s390-low.c index 63728aa..533e384 100644 --- a/gdb/gdbserver/linux-s390-low.c +++ b/gdb/gdbserver/linux-s390-low.c @@ -609,6 +609,22 @@ s390_breakpoint_at (CORE_ADDR pc) return memcmp (c, s390_breakpoint, s390_breakpoint_len) == 0; } +/* Breakpoint/Watchpoint support. */ + +/* The "supports_z_point_type" linux_target_ops method. */ + +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 +703,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,