From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by sourceware.org (Postfix) with ESMTPS id E373A3858C53 for ; Wed, 14 Jun 2023 15:40:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E373A3858C53 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id A07191FDF8 for ; Wed, 14 Jun 2023 15:40:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1686757201; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=FBEidePOhs+n/kMlDjYaQVLkDsOPX4o7z+du5JFcpgE=; b=rTeguXka+A02mE/l4HsQbJCqA7bjDbPx854sZCuE3u8o5QsipWnhzAzaVzxGWuviUNLG9k gG9Qp8ekglHRQvETNPYg43fFBWR8iUk8ezpthhuS/E7XjJ71b0vMPptG1/jFg6qFCePwVr tpJG4HUbOWw6UUZ1a0KHU7LjPKoC0Mw= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1686757201; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=FBEidePOhs+n/kMlDjYaQVLkDsOPX4o7z+du5JFcpgE=; b=mno+KGI8e9jryj+Ad0J8JunDncEQxkQhEIhOYiVtjd3q4DOBjUPBf/NNSKFFSKKZ6vyfZI 8SbIcchaECT5Y4Bw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 8C6AF1357F for ; Wed, 14 Jun 2023 15:40:01 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id phUwIVHfiWT6IQAAMHmgww (envelope-from ) for ; Wed, 14 Jun 2023 15:40:01 +0000 From: Tom de Vries To: gdb-patches@sourceware.org Subject: [pushed] [gdb/testsuite] Fix gdb.base/step-over-exit.exp with glibc debuginfo Date: Wed, 14 Jun 2023 17:40:23 +0200 Message-Id: <20230614154023.30619-1-tdevries@suse.de> X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-12.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: In test-case gdb.base/step-over-exit.exp, we set a breakpoint on _exit and continue, expecting to hit the breakpoint. Without glibc debug info installed, we have with target board unix/-m64: ... Thread 2.1 "step-over-exit" hit Breakpoint 2.2, 0x00007ffff7d46aee in \ _exit () from /lib64/libc.so.6^M (gdb) PASS: gdb.base/step-over-exit.exp: continue to exit ... and with target board unix/-m32: ... Thread 2.1 "step-over-exit" hit Breakpoint 2.2, 0xf7d84c25 in _exit () from \ /lib/libc.so.6^M (gdb) PASS: gdb.base/step-over-exit.exp: continue to exit ... However after installing debug info (packages glibc-debuginfo and glibc-32bit-debuginfo), we have for -m64 (note: __GI__exit instead of _exit): ... Thread 2.1 "step-over-exit" hit Breakpoint 2.2, \ __GI__exit (status=) at \ ../sysdeps/unix/sysv/linux/_exit.c:27^M 27 {^M (gdb) PASS: gdb.base/step-over-exit.exp: continue to exit ... and -m32 (note: _Exit instead of _exit): ... Thread 2.1 "step-over-exit" hit Breakpoint 2.2, _Exit () at \ ../sysdeps/unix/sysv/linux/i386/_exit.S:24^M 24 ../sysdeps/unix/sysv/linux/i386/_exit.S: No such file or directory.^M (gdb) FAIL: gdb.base/step-over-exit.exp: continue to exit ... The gdb_test allows for both _exit and __GI__exit, but not _Exit: ... gdb_test "continue" \ "Continuing\\..*Breakpoint $decimal.*_exit \\(.*\\).*" \ "continue to exit" ... Fix this by allowing _Exit as well. Tested on x86_64-linux. --- gdb/testsuite/gdb.base/step-over-exit.exp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdb/testsuite/gdb.base/step-over-exit.exp b/gdb/testsuite/gdb.base/step-over-exit.exp index 6e975c6d34c..2a2a98a8884 100644 --- a/gdb/testsuite/gdb.base/step-over-exit.exp +++ b/gdb/testsuite/gdb.base/step-over-exit.exp @@ -49,7 +49,7 @@ gdb_test "break _exit" "Breakpoint $decimal at .*" # Hit the breakpoint on _exit. The address of syscall insn is recorded. gdb_test "continue" \ - "Continuing\\..*Breakpoint $decimal.*_exit \\(.*\\).*" \ + "Continuing\\..*Breakpoint $decimal.*_\[eE\]xit \\(.*\\).*" \ "continue to exit" gdb_test "display/i \$pc" ".*" base-commit: 7ade0f1582c417dc74b9449faf2b8dc86469ac9b -- 2.35.3