From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14340 invoked by alias); 2 May 2012 21:52:15 -0000 Received: (qmail 14331 invoked by uid 22791); 2 May 2012 21:52:14 -0000 X-SWARE-Spam-Status: No, hits=-3.5 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_HOSTKARMA_NO,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 02 May 2012 21:52:00 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 5F15A1C6AAA; Wed, 2 May 2012 17:51:59 -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 eLgXeUS24aUh; Wed, 2 May 2012 17:51:59 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id EF35B1C6AA9; Wed, 2 May 2012 17:51:58 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id BA0C6145616; Wed, 2 May 2012 14:51:48 -0700 (PDT) Date: Wed, 02 May 2012 21:52:00 -0000 From: Joel Brobecker To: Chung-Lin Tang Cc: gdb-patches@sourceware.org, Thomas Schwinge Subject: Re: [PATCH][SH] Signal handler unwinding for SH-Linux Message-ID: <20120502215148.GC15555@adacore.com> References: <4F9CF631.9080807@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4F9CF631.9080807@codesourcery.com> User-Agent: Mutt/1.5.20 (2009-06-14) 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 X-SW-Source: 2012-05/txt/msg00037.txt.bz2 Chung-Lin, > 2012-04-29 Chung-Lin Tang > > * sh-linux-tdep.c: Include trad-frame.h and tramp-frame.h. > (sh_linux_sigtramp_cache): New function. > (sh_linux_sigreturn_init): New function. > (sh_linux_rt_sigreturn_init): New function. > (SH_MOVW,SH_TRAP,SH_OR_R0_R0): New symbols for instruction > patterns. > (SH_NR_SIGRETURN,SH_NR_RT_SIGRETURN): New symbols for sigreturn > syscall codes. > (sh_linux_sigreturn_tramp_frame): New tramp_frame definition. > (sh_linux_rt_sigreturn_tramp_frame): Likewise. > (sh_linux_init_abi): Add init calls to register new tramp_frame > definitions under 32-bit SH, update comments. Overall, this looks good to me. I do not know about SH specifically, so I will take your word on the specific location and layout of the sigcontext structure. Just a small minor comment: All new functions and globals should be documented. Usually, when we implement a "virtual method" (a function destined to be used as a pointer in one of our generic structures; Eg. sh_linux_sigreturn_init), we do not repeat description. We just say that this function implements such and such callback in struct bla bla for such and such situation. The actual documentation should already be provided at the same location the field itself is declared. For instance, one possible description of sh_linux_sigreturn_init is: /* Implement struct tramp_frame's "init" callback for signal trampolines on 32-bit SH. */ -- Joel