From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2515 invoked by alias); 30 Oct 2018 10:20:24 -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 2499 invoked by uid 89); 30 Oct 2018 10:20:23 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-0.6 required=5.0 tests=BAYES_00,KHOP_DYNAMIC,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=no version=3.3.2 spammy=braces, H*x:2.5, H*UA:2.5, HContent-Transfer-Encoding:8bit X-HELO: mx0a-001b2d01.pphosted.com Received: from mx0b-001b2d01.pphosted.com (HELO mx0a-001b2d01.pphosted.com) (148.163.158.5) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 30 Oct 2018 10:20:22 +0000 Received: from pps.filterd (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w9UAJJ42125913 for ; Tue, 30 Oct 2018 06:20:20 -0400 Received: from e06smtp02.uk.ibm.com (e06smtp02.uk.ibm.com [195.75.94.98]) by mx0a-001b2d01.pphosted.com with ESMTP id 2nen13sb64-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 30 Oct 2018 06:20:20 -0400 Received: from localhost by e06smtp02.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 30 Oct 2018 10:20:18 -0000 Received: from b06cxnps4074.portsmouth.uk.ibm.com (9.149.109.196) by e06smtp02.uk.ibm.com (192.168.101.132) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Tue, 30 Oct 2018 10:20:16 -0000 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w9UAKDN241549848 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 30 Oct 2018 10:20:13 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2A5CD11C050; Tue, 30 Oct 2018 10:20:13 +0000 (GMT) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 1FDA911C066; Tue, 30 Oct 2018 10:20:13 +0000 (GMT) Received: from oc3748833570.ibm.com (unknown [9.145.169.132]) by d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTP; Tue, 30 Oct 2018 10:20:13 +0000 (GMT) Received: by oc3748833570.ibm.com (Postfix, from userid 1000) id 8A37BD802EF; Tue, 30 Oct 2018 11:20:12 +0100 (CET) Subject: Re: [PATCH] Adding support for reding signal handler frame in AIX To: sangamesh.swamy@in.ibm.com (Sangamesh Mallayya) Date: Tue, 30 Oct 2018 10:20:00 -0000 From: "Ulrich Weigand" Cc: kevinb@redhat.com (Kevin Buettner), gdb-patches@sourceware.org In-Reply-To: from "Sangamesh Mallayya" at Oct 30, 2018 07:16:21 AM MIME-Version: 1.0 x-cbid: 18103010-0008-0000-0000-00000288369D X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18103010-0009-0000-0000-000021F25201 Message-Id: <20181030102012.8A37BD802EF@oc3748833570.ibm.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit X-SW-Source: 2018-10/txt/msg00709.txt.bz2 Sangamesh Mallayya wrote: > I have modified the patch and implemented it using the trad frame cache. > Please review and let me know the comments. This version now looks pretty good to me, I just have a few minor comments related to coding style. Once those are addresses, it should be ready to commit. > + sigconext structure have the mstsave saved under the Typo "sigcontext" ? > + if (wordsize == 4) { > + func = read_memory_unsigned_integer (base_orig + > + SIG_FRAME_PC_OFFSET + 8, > + tdep->wordsize, byte_order); > + safe_read_memory_integer (base_orig + SIG_FRAME_FP_OFFSET + 8, > + wordsize, byte_order, &backchain); > + base = (CORE_ADDR)backchain; > + } else { > + func = read_memory_unsigned_integer (base_orig + > + SIG_FRAME_LR_OFFSET64, > + tdep->wordsize, byte_order); > + safe_read_memory_integer (base_orig + SIG_FRAME_FP_OFFSET64, > + wordsize, byte_order, &backchain); > + base = (CORE_ADDR)backchain; > + } GNU coding style is to put braces on separate lines, and indent like so if (wordsize == 4) { func = ... } else { func = ... } Also, why do you use tdep->wordsize in some places and wordsize in others? > + if (wordsize == 4) { > + trad_frame_set_reg_addr (this_trad_cache, tdep->ppc_lr_regnum, > + base_orig + 0x38 + 52 + 8); > + } else { > + trad_frame_set_reg_addr (this_trad_cache, tdep->ppc_lr_regnum, > + base_orig + 0x70 + 320); > + } Where there is just a single line inside the if / else block, you should just omit the braces completely. > * gdb.base/aix-sighandle_test.c: New file. > * gdb.base/aix-sighandle_test.exp: New file. Those should best go in gdb.arch, not in gdb.base (since they are specific to a single platform). Also, it may be better to omit the "_test" part of the file names (all files in these directories are tests!). Thanks, Ulrich -- Dr. Ulrich Weigand GNU/Linux compilers and toolchain Ulrich.Weigand@de.ibm.com