public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
From: Tom de Vries <vries@sourceware.org>
To: gdb-cvs@sourceware.org
Subject: [binutils-gdb] [gdb/testsuite] Fix gdb.dwarf2/entry-value-typedef.exp with -m32
Date: Thu, 13 Oct 2022 08:03:14 +0000 (GMT)	[thread overview]
Message-ID: <20221013080314.56D933858404@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=927b2f4caf46e5ca49684c9a52a9786425c60fa2

commit 927b2f4caf46e5ca49684c9a52a9786425c60fa2
Author: Tom de Vries <tdevries@suse.de>
Date:   Thu Oct 13 10:03:09 2022 +0200

    [gdb/testsuite] Fix gdb.dwarf2/entry-value-typedef.exp with -m32
    
    With test-case gdb.dwarf2/entry-value-typedef.exp and target board unix/-m32,
    I run into:
    ...
    builtin_spawn -ignore SIGHUP g++ -fno-stack-protector \
      gdb/testsuite/gdb.dwarf2/entry-value-typedef-amd64.S \
      -fdiagnostics-color=never -Lbuild/libiberty -lm -m32 \
      -o outputs/gdb.dwarf2/entry-value-typedef/entry-value-typedef^M
    entry-value-typedef.cpp: Assembler messages:^M
    entry-value-typedef.cpp:38: Error: bad register name `%rbp'^M
    ...
    
    The problem is that the test-cases selects an amd64 .S file based on the check:
    ...
    if { [istarget "x86_64-*-linux*"] } {
    ...
    which is also true for target board unix/-m32 on x86_64-linux.
    
    Fix this by adding the missing is_lp64_target check.
    
    Tested on x86_64-linux, using native and target board unix/-m32.

Diff:
---
 gdb/testsuite/gdb.dwarf2/entry-value-typedef.exp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gdb/testsuite/gdb.dwarf2/entry-value-typedef.exp b/gdb/testsuite/gdb.dwarf2/entry-value-typedef.exp
index db09cd2915d..6f196b71dc8 100644
--- a/gdb/testsuite/gdb.dwarf2/entry-value-typedef.exp
+++ b/gdb/testsuite/gdb.dwarf2/entry-value-typedef.exp
@@ -16,7 +16,7 @@
 # The program associated to this test case uncovered a bug in GDB (PR 29374)
 # where a typedef type was used before it was resolved.
 
-if { [istarget "x86_64-*-linux*"] } {
+if { [istarget "x86_64-*-linux*"] && [is_lp64_target] } {
     set suffix amd64
 } elseif { [istarget "aarch64-*-linux*"] } {
     set suffix aarch64

                 reply	other threads:[~2022-10-13  8:03 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20221013080314.56D933858404@sourceware.org \
    --to=vries@sourceware.org \
    --cc=gdb-cvs@sourceware.org \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).