From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13469 invoked by alias); 20 Oct 2013 19:32:28 -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 13454 invoked by uid 89); 20 Oct 2013 19:32:27 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: glazunov.sibelius.xs4all.nl Received: from sibelius.xs4all.nl (HELO glazunov.sibelius.xs4all.nl) (83.163.83.176) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Sun, 20 Oct 2013 19:32:26 +0000 Received: from glazunov.sibelius.xs4all.nl (kettenis@localhost [127.0.0.1]) by glazunov.sibelius.xs4all.nl (8.14.5/8.14.3) with ESMTP id r9KJWGdN008758; Sun, 20 Oct 2013 21:32:16 +0200 (CEST) Received: (from kettenis@localhost) by glazunov.sibelius.xs4all.nl (8.14.5/8.14.3/Submit) id r9KJWGfB025774; Sun, 20 Oct 2013 21:32:16 +0200 (CEST) Date: Sun, 20 Oct 2013 19:32:00 -0000 Message-Id: <201310201932.r9KJWGfB025774@glazunov.sibelius.xs4all.nl> From: Mark Kettenis To: jose.marchesi@oracle.com CC: brobecker@adacore.com, tromey@redhat.com, gdb-patches@sourceware.org In-reply-to: <87r4bk1694.fsf@oracle.com> (jose.marchesi@oracle.com) Subject: Re: [PATCH] [SPARC64] Figure out where a longjmp will land References: <87y563k71b.fsf@oracle.com> <87d2nffr53.fsf@fleche.redhat.com> <87txgrjupm.fsf@oracle.com> <20131017055736.GC3302@adacore.com> <87r4bk1694.fsf@oracle.com> X-SW-Source: 2013-10/txt/msg00612.txt.bz2 > From: jose.marchesi@oracle.com (Jose E. Marchesi) > Date: Thu, 17 Oct 2013 13:33:43 +0200 > > > 2013-10-08 Jose E. Marchesi > > > > * sparc-tdep.c (sparc_is_annulled_branch_insn): New function. > > * sparc-tdep.h: And its prototype. > > > > * sparc64-linux-tdep.c (sparc64_linux_get_longjmp_target): New > > function. > > (sparc64_linux_init_abi): Register the get_longjmp_target hook. > > This looks reasonable to me, with a minor correction requested below. > But Sparc patches normally get reviewed by MarkK, so can you give it > another week before checking the final version in? (remember that > when you check something in that is different from the patch already > posted, an updated patch should be sent to the list, for the > record). > > Noted, but I don't have write access to the CVS so I can't check > anything in. > > I assume that this was validated against our testsuite, and that > no new regressions were detected? > > Yes. I always run the testsuite for regressions before submitting any > patch. I tested this on sparc64-unknown-linux-gnu. > > > +/* Figure out where a longjmp will land. Get the args out of the > > + output registers. We expect the first arg to be a pointer to the > > + jmp_buf structure from which we extract the address that we will > > + land at. This address is copied into PC. This routine returns > > + non-zero on success. */ > > + > > +static int > > +sparc64_linux_get_longjmp_target (struct frame_info *frame, CORE_ADDR *pc) > > This function is expected to implement a gdbarch callback, so you do > not need to repeat the spec, which is expected to already be documented > in gdbarch.h. Instead, use: > > /* Implement the "get_longjmp_target" gdbarch method. */ > > Amended patch below. > > 2013-10-08 Jose E. Marchesi > > * sparc-tdep.c (sparc_is_annulled_branch_insn): New function. > * sparc-tdep.h: And its prototype. > > * sparc64-linux-tdep.c (sparc64_linux_get_longjmp_target): New > function. > (sparc64_linux_init_abi): Register the get_longjmp_target hook. Diff looks good to me, although I'm not really familliar with the glibc longjmp implementation. See my note about pinging Dave Miller. One nit though... > Index: sparc-tdep.h > =================================================================== > RCS file: /cvs/src/src/gdb/sparc-tdep.h,v > retrieving revision 1.33 > diff -u -r1.33 sparc-tdep.h > --- sparc-tdep.h 1 Jan 2013 06:32:51 -0000 1.33 > +++ sparc-tdep.h 17 Oct 2013 11:27:05 -0000 > @@ -202,6 +202,12 @@ > extern void sparc_collect_rwindow (const struct regcache *regcache, > CORE_ADDR sp, int regnum); > > + > + > +extern int sparc_is_annulled_branch_insn (CORE_ADDR pc); > + > + > + Seems a bit excessive to put these additional ^L's in there.