From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 71134 invoked by alias); 15 Jan 2018 16:27:29 -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 71038 invoked by uid 89); 15 Jan 2018 16:27:21 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=H*x:version, H*UA:version, guidance, H*Ad:D*us.ibm.com 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; Mon, 15 Jan 2018 16:27:19 +0000 Received: from pps.filterd (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w0FGPEcU089932 for ; Mon, 15 Jan 2018 11:27:04 -0500 Received: from e06smtp12.uk.ibm.com (e06smtp12.uk.ibm.com [195.75.94.108]) by mx0b-001b2d01.pphosted.com with ESMTP id 2fgy4y9xn0-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Mon, 15 Jan 2018 11:27:04 -0500 Received: from localhost by e06smtp12.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 15 Jan 2018 16:27:03 -0000 Received: from b06cxnps4075.portsmouth.uk.ibm.com (9.149.109.197) by e06smtp12.uk.ibm.com (192.168.101.142) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 15 Jan 2018 16:27:00 -0000 Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w0FGQvFe45547714; Mon, 15 Jan 2018 16:26:57 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B781D5204D; Mon, 15 Jan 2018 15:19:28 +0000 (GMT) Received: from oc3748833570.ibm.com (unknown [9.152.213.76]) by d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTP id B171B5204B; Mon, 15 Jan 2018 15:19:28 +0000 (GMT) Received: by oc3748833570.ibm.com (Postfix, from userid 1000) id D896DD804E4; Mon, 15 Jan 2018 17:26:56 +0100 (CET) Subject: Re: [PATCH] Adding support for reading signal hanlder frame in AIX To: sangamesh.swamy@in.ibm.com (Sangamesh Mallayya) Date: Mon, 15 Jan 2018 16:27:00 -0000 From: "Ulrich Weigand" Cc: gdb-patches@sourceware.org, Ulrich.Weigand@de.ibm.com (Ulrich Weigand), edelsohn@us.ibm.com (David Edelsohn), sanrathi@in.ibm.com (Sanket Rathi) In-Reply-To: from "Sangamesh Mallayya" at Jan 15, 2018 03:42:47 AM MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 x-cbid: 18011516-0008-0000-0000-000004C1F6A3 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18011516-0009-0000-0000-00001E555DF4 Message-Id: <20180115162656.D896DD804E4@oc3748833570.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2018-01-15_08:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1801150234 X-SW-Source: 2018-01/txt/msg00274.txt.bz2 Sangamesh Mallayya wrote: > Attached patch adds support for reading signal handler frame in AIX. Thanks for working on this! However, you should not patch AIX-specific code into the generic PowerPC code in rs6000-tdep.c. Instead, you should create code to handle AIX signal frames in rs0000-aix-tdep.c. To do so, you'll want to call something like tramp_frame_prepend_unwinder (gdbarch, ... your handler ...); in the rs6000_aix_init_osabi function. For guidance, you may want to look at ppc-linux-tdep.c:ppc_linux_init_abi, which already does the same thing to handle Linux signal frames. Note that rs6000-aix-tdep.c already defines the SIG_FRAME_* constants. You should also be able to easily distinguish the 32-bit and 64-bit cases by just checking tdep->wordsize; no need to export a new global from xcoffread.c. As an added bonus, it would be great if you could convert the test case you had in your email into an actual new test in the GDB test suite, to help prevent regressing on this support in the future :-) Bye, Ulrich -- Dr. Ulrich Weigand GNU/Linux compilers and toolchain Ulrich.Weigand@de.ibm.com