From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 71833 invoked by alias); 27 Aug 2019 11:29:27 -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 71825 invoked by uid 89); 27 Aug 2019 11:29:27 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-13.4 required=5.0 tests=AWL,BAYES_00,SPF_PASS autolearn=ham version=3.3.1 spammy=Application X-HELO: mx1.suse.de Received: from mx2.suse.de (HELO mx1.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 27 Aug 2019 11:29:26 +0000 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id D72ECAF1E; Tue, 27 Aug 2019 11:29:23 +0000 (UTC) Subject: Re: [PATCH] s390: Implement 'type_align' gdbarch method To: Andreas Arnez , gdb-patches@sourceware.org Cc: Ulrich Weigand , Tom Tromey References: From: Tom de Vries Openpgp: preference=signencrypt Message-ID: <58a64dce-9855-c43b-43f9-f93fdd31ab73@suse.de> Date: Tue, 27 Aug 2019 11:29:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2019-08/txt/msg00609.txt.bz2 On 08-08-19 13:40, Andreas Arnez wrote: > The align.exp test case yields many FAILs on s390x, since GDB's _Alignoff > doesn't always agree with the compiler's. On s390x, the maximum alignment > is 8, but GDB returns an alignment of 16 for 16-byte data types such as > "long double". > > This is fixed by implementing the type_align gdbarch method. The new > method returns an alignment of 8 for all integer, floating-point, and > vector types larger than 8 bytes. With this change, all align.exp tests > pass. > Hi, in the "zSeries ELF Application Binary Interface Supplement" document I find long double listed with 16-byte size and alignment. Likewise in the "IBM XL C/C++ for Linux on z Systems Optimization and Programming Guide". So I wonder, is this patch hardcoding the assumptions of a single compiler implementation (gcc) in gdb, thereby possibly breaking functionality in gdb when debugging executables generated by other compilers? If so, ISTM the correct way to fix this is to get gcc to emit the non-standard type alignment in the debug info. Thanks, - Tom