From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20433 invoked by alias); 17 Oct 2013 05:57:44 -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 20423 invoked by uid 89); 17 Oct 2013 05:57:44 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2 X-HELO: rock.gnat.com Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Thu, 17 Oct 2013 05:57:43 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 6E74F116750; Thu, 17 Oct 2013 01:58:04 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id jqc7mp4hJKDn; Thu, 17 Oct 2013 01:58:04 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 0467B116679; Thu, 17 Oct 2013 01:58:03 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 0C782E10A0; Thu, 17 Oct 2013 09:57:36 +0400 (RET) Date: Thu, 17 Oct 2013 05:57:00 -0000 From: Joel Brobecker To: "Jose E. Marchesi" Cc: Tom Tromey , gdb-patches@sourceware.org Subject: Re: [PATCH] [SPARC64] Figure out where a longjmp will land Message-ID: <20131017055736.GC3302@adacore.com> References: <87y563k71b.fsf@oracle.com> <87d2nffr53.fsf@fleche.redhat.com> <87txgrjupm.fsf@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87txgrjupm.fsf@oracle.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-SW-Source: 2013-10/txt/msg00508.txt.bz2 > 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). I assume that this was validated against our testsuite, and that no new regressions were detected? Thank you. > +/* 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. */ This prevents maintenance issues if we start modifying the "method"'s specifications. If there is anything from the documentation that you think is worth preserving locally, please do. Now, I see that "method" is actually not documented, yet. I will try fixing that as best as I can. -- Joel