Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom de Vries <tdevries@suse.de>
To: Andreas Arnez <arnez@linux.ibm.com>, gdb-patches@sourceware.org
Cc: Ulrich Weigand <uweigand@de.ibm.com>, Tom Tromey <tom@tromey.com>
Subject: Re: [PATCH] s390: Implement 'type_align' gdbarch method
Date: Tue, 27 Aug 2019 11:29:00 -0000	[thread overview]
Message-ID: <58a64dce-9855-c43b-43f9-f93fdd31ab73@suse.de> (raw)
In-Reply-To: <m3o90z7unb.fsf@oc0404454431.ibm.com>

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


  parent reply	other threads:[~2019-08-27 11:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-08 11:40 Andreas Arnez
2019-08-08 17:01 ` Tom Tromey
2019-08-09 18:32   ` Andreas Arnez
2019-08-27 11:29 ` Tom de Vries [this message]
2019-08-30 15:16   ` Ulrich Weigand
2019-08-30 15:42     ` Tom de Vries

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=58a64dce-9855-c43b-43f9-f93fdd31ab73@suse.de \
    --to=tdevries@suse.de \
    --cc=arnez@linux.ibm.com \
    --cc=gdb-patches@sourceware.org \
    --cc=tom@tromey.com \
    --cc=uweigand@de.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox