From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2205) id 77446385E449; Thu, 28 Mar 2024 07:26:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 77446385E449 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1711610799; bh=BTUXlrUqoXV1aLeNMTSJXAAZSrouWD+O1YoibBhf0fU=; h=From:To:Subject:Date:From; b=HpSbcQRftjJ1TqhoB5SGGLFnCr4JlmkotjPZ4zWZlyt6v3Ryz70ZH57iTTOUXJz3v X5H508dpLtqVrUbIotwcY71ycYbU07bLsOApSgm8WKNsuVtJRENv0f8H1lJwu5hMbz anXr8OlvSB5C8jXVKSViDGDebf5ZEFW2Pei+rcYA= 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.base/ending-run.exp on manjaro linux X-Act-Checkin: binutils-gdb X-Git-Author: Tom de Vries X-Git-Refname: refs/heads/master X-Git-Oldrev: a26b7d06eb20bf8c83c9204a398c3444b5c28ddb X-Git-Newrev: 4ef6173d2dfeafd33deedf7ce0d384cfbcf1170d Message-Id: <20240328072639.77446385E449@sourceware.org> Date: Thu, 28 Mar 2024 07:26:39 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D4ef6173d2dfe= afd33deedf7ce0d384cfbcf1170d commit 4ef6173d2dfeafd33deedf7ce0d384cfbcf1170d Author: Tom de Vries Date: Thu Mar 28 08:26:31 2024 +0100 [gdb/testsuite] Fix gdb.base/ending-run.exp on manjaro linux =20 On aarch64-linux, using the manjaro linux distro, I run into: ... (gdb) next^M 32 }^M (gdb) next^M 0x0000fffff7d67b80 in ?? () from /usr/lib/libc.so.6^M (gdb) FAIL: gdb.base/ending-run.exp: step out of main ... =20 What happens here is described in detail in this clause: ... -re "0x.*\\?\\? \\(\\) from /lib/powerpc.*$gdb_prompt $" { # This case occurs on Powerpc when gdb steps out of main and the # needed debug info files are not loaded on the system, prevent= ing # GDB to determine which function it reached (__libc_start_call= _main). # Ideally, the target system would have the necessary debugging # information, but in its absence, GDB's behavior is as expecte= d. ... } ... but the clause only matches for powerpc. =20 Fix this by: - making the regexp generic enough to also match /usr/lib/libc.so.6, and - updating the comment to not mention powerpc. =20 Tested on aarch64-linux. =20 PR testsuite/31450 Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=3D31450 Diff: --- gdb/testsuite/gdb.base/ending-run.exp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gdb/testsuite/gdb.base/ending-run.exp b/gdb/testsuite/gdb.base= /ending-run.exp index 9c80de6879b..b9a72b0e70e 100644 --- a/gdb/testsuite/gdb.base/ending-run.exp +++ b/gdb/testsuite/gdb.base/ending-run.exp @@ -206,8 +206,8 @@ gdb_test_multiple "next" "step out of main" { # This is what happens on system using uClibc. pass "step out of main" } - -re "0x.*\\?\\? \\(\\) from /lib/powerpc.*$gdb_prompt $" { - # This case occurs on Powerpc when gdb steps out of main and the + -re -wrap "$hex in \\?\\? \\(\\) from \[^\r\n\]+" { + # This case occurs when gdb steps out of main and the # needed debug info files are not loaded on the system, preventing # GDB to determine which function it reached (__libc_start_call_main). # Ideally, the target system would have the necessary debugging