From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 76461 invoked by alias); 24 Feb 2016 12:05:48 -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 76447 invoked by uid 89); 24 Feb 2016 12:05:48 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.2 required=5.0 tests=AWL,BAYES_50,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=UD:mi-dprintf.exp, mi-dprintf.exp, midprintfexp, UD:dprintf.exp 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; Wed, 24 Feb 2016 12:05:46 +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 8F7A340000; Wed, 24 Feb 2016 13:06:37 +0100 (CET) Received: from [192.168.13.108] (89-65-66-135.dynamic.chello.pl [89.65.66.135]) by hogfather.0x04.net (Postfix) with ESMTPSA id 55E1F580100; Wed, 24 Feb 2016 13:05:43 +0100 (CET) Subject: Re: [PATCH 2/5 v4] powerpc: Support z-point type in gdbserver. To: Wei-cheng Wang , uweigand@de.ibm.com, gdb-patches@sourceware.org References: <1435422102-39438-1-git-send-email-cole945@gmail.com> <1435422102-39438-2-git-send-email-cole945@gmail.com> From: =?UTF-8?Q?Marcin_Ko=c5=9bcielnicki?= Message-ID: <56CD9C97.8040905@0x04.net> Date: Wed, 24 Feb 2016 12:05:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <1435422102-39438-2-git-send-email-cole945@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2016-02/txt/msg00721.txt.bz2 Another old approved patch that I'd like to push. Testing on ppc+ppc64+ppc64le: gdb.base/dprintf.exp: agent: 1st dprintf UNSUPPORTED -> PASS×3 gdb.base/jit.exp: PIE: one_jit_test-1: set var libname = "SHLIBDIR/jit-solib.so" PASS -> FAIL, on ppc64 only (I don't consider that one a problem, since jit.exp already has lots of similiar FAILs for this arch, nothing really new is broken here) gdb.mi/mi-dprintf.exp: mi expect stop FAIL×5 -> PASS×4 gdb.threads/forking-threads-plus-breakpoint.exp: cond_bp_target=1: detach_on_fork=on: displaced=off FAIL -> PASS×3 gdb.threads/process-dies-while-handling-bp.exp: non_stop=on: cond_bp_target=1: KFAIL (memory error) -> KFAIL (prompt) gdb.threads/process-dies-while-handling-bp.exp: non_stop=off: cond_bp_target=[01]: inferior 1 exited PASS×2 -> KFAIL (PRMS: gdb/18749) Fixes a lot of gdb.trace tests if I enable tracepoints. On 27/06/15 18:21, Wei-cheng Wang wrote: > Support z-point, so tracepoints and breakpoints can be inserted at the same > location. > > gdb/gdbserver/ChangeLog > > 2015-06-27 Wei-cheng Wang > > * linux-ppc-low.c (ppc_supports_z_point_type): New function: > (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints. > (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type, > ppc_insert_point, ppc_remove_point. > --- > gdb/gdbserver/linux-ppc-low.c | 69 +++++++++++++++++++++++++++++++++++++++++-- > 1 file changed, 66 insertions(+), 3 deletions(-) > > diff --git a/gdb/gdbserver/linux-ppc-low.c b/gdb/gdbserver/linux-ppc-low.c > index 188fac0..41ec281 100644 > --- a/gdb/gdbserver/linux-ppc-low.c > +++ b/gdb/gdbserver/linux-ppc-low.c > @@ -512,6 +512,69 @@ 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; > + } > +} > + > +/* Implement insert_point target-ops. > + Returns 0 on success, -1 on failure and 1 on unsupported. */ > + > +static int > +ppc_insert_point (enum raw_bkpt_type type, CORE_ADDR addr, > + int size, struct raw_breakpoint *bp) > +{ > + switch (type) > + { > + case raw_bkpt_type_sw: > + return insert_memory_breakpoint (bp); > + > + case raw_bkpt_type_hw: > + case raw_bkpt_type_write_wp: > + case raw_bkpt_type_access_wp: > + default: > + /* Unsupported. */ > + return 1; > + } > +} > + > +/* Implement remove_point target-ops. > + Returns 0 on success, -1 on failure and 1 on unsupported. */ > + > +static int > +ppc_remove_point (enum raw_bkpt_type type, CORE_ADDR addr, > + int size, struct raw_breakpoint *bp) > +{ > + switch (type) > + { > + case raw_bkpt_type_sw: > + return remove_memory_breakpoint (bp); > + > + case raw_bkpt_type_hw: > + case raw_bkpt_type_write_wp: > + case raw_bkpt_type_access_wp: > + default: > + /* Unsupported. */ > + return 1; > + } > +} > + > /* Provide only a fill function for the general register set. ps_lgetregs > will use this for NPTL support. */ > > @@ -690,9 +753,9 @@ struct linux_target_ops the_low_target = { > NULL, > 0, > ppc_breakpoint_at, > - NULL, /* supports_z_point_type */ > - NULL, > - NULL, > + ppc_supports_z_point_type, > + ppc_insert_point, > + ppc_remove_point, > NULL, > NULL, > ppc_collect_ptrace_register, >