Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Gary Benson via Gdb-patches <gdb-patches@sourceware.org>
To: gdb-patches@sourceware.org
Cc: Tom Tromey <tom@tromey.com>, Andreas Schwab <schwab@linux-m68k.org>
Subject: [PATCH v2] Fix gdb.dwarf2/clztest.exp with Clang
Date: Wed,  4 Nov 2020 11:26:41 +0000	[thread overview]
Message-ID: <1604489201-21004-1-git-send-email-gbenson@redhat.com> (raw)
In-Reply-To: <87361rsdym.fsf@tromey.com>

Hi Tom, Andreas,

Tom Tromey wrote:
> >> Shouldn't .eh_frame always be read-only?
> 
> Gary> I don't know.
> 
> For a test in particular I think the question is whether the change
> can somehow negatively affect the test itself; and maybe secondarily
> whether some plausible and/or planned future change would break the
> test.
> 
> If not then it seems fine to move forward.

GCC doesn't complain about making that section read-only, so I've
updated the test to make the section read-only always.

> Generally I think we'd be better off eliminating these assembly
> tests in favor of something like the test suite's DWARF assembler,
> though I didn't look to see whether this one would qualify.

Sure, but I'm not volunteering to do this one today! ;)

I've inlined an updated patch below.  As before I checked it on
Fedora 32 x86_64, with GCC and Clang.  Is it ok for me to commit?

Thanks,
Gary

---
Clang fails to compile gdb.dwarf2/clztest.S, with the following error:

  gdb compile failed, /gdbtest/src/gdb/testsuite/gdb.dwarf2/clztest.S:181:2:
    error: changed section flags for .eh_frame, expected: 0x2

This commit fixes the testcase by defining .eh_frame's flags
as Clang expects, as "a" rather than as "aw", thus making the
section read-only.

gdb/testsuite/ChangeLog:

	* gdb.dwarf2/clztest.S (.eh_frame): Make read-only.
---
 gdb/testsuite/ChangeLog            | 4 ++++
 gdb/testsuite/gdb.dwarf2/clztest.S | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/gdb/testsuite/gdb.dwarf2/clztest.S b/gdb/testsuite/gdb.dwarf2/clztest.S
index a904fee..5e6cdae 100644
--- a/gdb/testsuite/gdb.dwarf2/clztest.S
+++ b/gdb/testsuite/gdb.dwarf2/clztest.S
@@ -178,7 +178,7 @@ _start:
 .LEFDE4:
 #NO_APP
 #APP
-	.section	.eh_frame,"aw",@progbits
+	.section	.eh_frame,"a",@progbits
 .Lframe1:
 	.long	.LECIE1-.LSCIE1	# Length of Common Information Entry
 .LSCIE1:
-- 
1.8.3.1


  reply	other threads:[~2020-11-04 11:27 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-02 17:08 [PATCH] " Gary Benson via Gdb-patches
2020-11-02 17:52 ` Andreas Schwab
2020-11-02 19:14   ` Gary Benson via Gdb-patches
2020-11-02 19:22     ` Andreas Schwab
2020-11-02 19:31       ` Rainer Orth
2020-11-02 20:30         ` Andreas Schwab
2020-11-02 19:29     ` Rainer Orth
2020-11-02 20:25     ` Tom Tromey
2020-11-04 11:26       ` Gary Benson via Gdb-patches [this message]
2020-11-18  9:20         ` [PING][PATCH v2] " Gary Benson via Gdb-patches

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=1604489201-21004-1-git-send-email-gbenson@redhat.com \
    --to=gdb-patches@sourceware.org \
    --cc=gbenson@redhat.com \
    --cc=schwab@linux-m68k.org \
    --cc=tom@tromey.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