From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2205) id 56D933858404; Thu, 13 Oct 2022 08:03:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 56D933858404 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1665648194; bh=Z1ML6dutnUGqu1PzLISkD0YypIUvYY13KLTR17mYejI=; h=From:To:Subject:Date:From; b=CHswDDj+XMeh8spuWtquMa5ntXU5BpbjZuVxlw2RmZV4616d3TtEYb7voPJIOLQX3 RGq7Ie9qn08oMzJSRfm/OKyaG5V3sf7156dzDI/aFjHzjxdjl1AWU/anBcqx8juA8w j5iHR4uL5ltfhfQeVS5l7JGPMMNdz5kFJ0fEsmJI= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Tom de Vries To: gdb-cvs@sourceware.org Subject: [binutils-gdb] [gdb/testsuite] Fix gdb.dwarf2/entry-value-typedef.exp with -m32 X-Act-Checkin: binutils-gdb X-Git-Author: Tom de Vries X-Git-Refname: refs/heads/master X-Git-Oldrev: 0ffa92773a25042d97a6df74062270a03cb84982 X-Git-Newrev: 927b2f4caf46e5ca49684c9a52a9786425c60fa2 Message-Id: <20221013080314.56D933858404@sourceware.org> Date: Thu, 13 Oct 2022 08:03:14 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D927b2f4caf46= e5ca49684c9a52a9786425c60fa2 commit 927b2f4caf46e5ca49684c9a52a9786425c60fa2 Author: Tom de Vries Date: Thu Oct 13 10:03:09 2022 +0200 [gdb/testsuite] Fix gdb.dwarf2/entry-value-typedef.exp with -m32 =20 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=3Dnever -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 ... =20 The problem is that the test-cases selects an amd64 .S file based on th= e check: ... if { [istarget "x86_64-*-linux*"] } { ... which is also true for target board unix/-m32 on x86_64-linux. =20 Fix this by adding the missing is_lp64_target check. =20 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/testsui= te/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 2937= 4) # where a typedef type was used before it was resolved. =20 -if { [istarget "x86_64-*-linux*"] } { +if { [istarget "x86_64-*-linux*"] && [is_lp64_target] } { set suffix amd64 } elseif { [istarget "aarch64-*-linux*"] } { set suffix aarch64