From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 50366 invoked by alias); 5 Dec 2017 13:21:09 -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 50357 invoked by uid 89); 5 Dec 2017 13:21:08 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.7 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mx0a-001b2d01.pphosted.com Received: from mx0a-001b2d01.pphosted.com (HELO mx0a-001b2d01.pphosted.com) (148.163.156.1) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 05 Dec 2017 13:21:02 +0000 Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id vB5DJYn0101490 for ; Tue, 5 Dec 2017 08:21:01 -0500 Received: from e06smtp10.uk.ibm.com (e06smtp10.uk.ibm.com [195.75.94.106]) by mx0a-001b2d01.pphosted.com with ESMTP id 2enu28m0bm-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Tue, 05 Dec 2017 08:21:00 -0500 Received: from localhost by e06smtp10.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 5 Dec 2017 13:20:58 -0000 Received: from b06cxnps3075.portsmouth.uk.ibm.com (9.149.109.195) by e06smtp10.uk.ibm.com (192.168.101.140) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 5 Dec 2017 13:20:56 -0000 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id vB5DKurT65142842; Tue, 5 Dec 2017 13:20:56 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D6307A4057; Tue, 5 Dec 2017 13:15:22 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C52DEA4040; Tue, 5 Dec 2017 13:15:22 +0000 (GMT) Received: from oc3748833570.ibm.com (unknown [9.152.213.29]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTP; Tue, 5 Dec 2017 13:15:22 +0000 (GMT) Received: by oc3748833570.ibm.com (Postfix, from userid 1000) id C7002D80330; Tue, 5 Dec 2017 14:20:55 +0100 (CET) Subject: Re: [PATCH v2 07/11] s390: Hook s390 into OSABI mechanism To: prudo@linux.vnet.ibm.com (Philipp Rudo) Date: Tue, 05 Dec 2017 13:21:00 -0000 From: "Ulrich Weigand" Cc: gdb-patches@sourceware.org, arnez@linux.vnet.ibm.com (Andreas Arnez) In-Reply-To: <20171205122859.2919-8-prudo@linux.vnet.ibm.com> from "Philipp Rudo" at Dec 05, 2017 01:28:55 PM MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 x-cbid: 17120513-0040-0000-0000-000003F68E17 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17120513-0041-0000-0000-000025F982D1 Message-Id: <20171205132055.C7002D80330@oc3748833570.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-12-05_04:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=47 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=47 clxscore=1011 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1712050192 X-SW-Source: 2017-12/txt/msg00105.txt.bz2 Philipp Rudo wrote: Just a couple of quick comments on the common vs. Linux split. > + set_gdbarch_guess_tracepoint_registers (gdbarch, > + s390_guess_tracepoint_registers); This is OS-independent as far as I can see. > + /* Frame handling. */ > + frame_unwind_append_unwinder (gdbarch, &s390_stub_frame_unwind); > + frame_unwind_append_unwinder (gdbarch, &s390_sigtramp_frame_unwind); > + frame_unwind_append_unwinder (gdbarch, &s390_frame_unwind); > + frame_base_set_default (gdbarch, &s390_frame_base); All of that *except* the sigtramp unwinder is OS-independent. In fact, if move the prolog-based sniffer to common code, you'll see that you no longer need to export various internal routines from s390-tdep.c to s390-linux-tdep.c. This may require swapping the order of the stub and the sigtramp unwinder, but that should be harmless. In the end you should have this sequence: - first, in common code, announce all the DWARF-based unwinders - then, in Linux ABI code, announce the sigtramp unwinder - finally, back in common code, announce all the fallback unwinders > set_gdbarch_process_record (gdbarch, s390_process_record); > set_gdbarch_process_record_signal (gdbarch, s390_linux_record_signal); The first of these should be generic, only the second is Linux specific (that's why there are two different callbacks to begin with!). > + /* Miscellaneous. */ > + set_gdbarch_stap_is_single_operand (gdbarch, s390_stap_is_single_operand); > + set_gdbarch_gcc_target_options (gdbarch, s390_gcc_target_options); > + set_gdbarch_gnu_triplet_regexp (gdbarch, s390_gnu_triplet_regexp); Are these really Linux-specific? Bye, Ulrich -- Dr. Ulrich Weigand GNU/Linux compilers and toolchain Ulrich.Weigand@de.ibm.com