From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 1423A3858017; Fri, 10 Feb 2023 14:58:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1423A3858017 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1676041085; bh=sDaQphIGe2KGoOMdVrMKU1m4qKWKuZYcH3MuEF8ewho=; h=From:To:Subject:Date:In-Reply-To:References:From; b=lsJ04dOKNTLGTpu3o6aoSKUzMGnC5ruW7AinBYX+DeM5B5p9K2e75sfm4tyrElod3 dhNXjqE3hT/m9MyyvjKSIEoEjW2uU2T5QW1Go3tr8R1oneHLkORMeInLrR0mO/7mf1 BDdsm+j4Jkj8OpeiXOuYtKMaoqOWTJstrPmvUfM8= From: "cvs-commit at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug testsuite/30103] GDB gets confused about what is the current source file for various actions Date: Fri, 10 Feb 2023 14:58:04 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: testsuite X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D30103 --- Comment #3 from cvs-commit at gcc dot gnu.org --- The master branch has been updated by Tom de Vries : https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D632652850db2= 3bfec2499febe03c9ac4aa0b8dce commit 632652850db23bfec2499febe03c9ac4aa0b8dce Author: Tom de Vries Date: Fri Feb 10 15:58:00 2023 +0100 [gdb/testsuite] Fix linespec ambiguity in gdb.base/longjmp.exp PR testsuite/30103 reports the following failure on aarch64-linux (ubuntu 22.04): ... (gdb) PASS: gdb.base/longjmp.exp: with_probes=3D0: pattern 1: next to l= ongjmp next warning: Breakpoint address adjusted from 0x83dc305fef755015 to \ 0xffdc305fef755015. Warning: Cannot insert breakpoint 0. Cannot access memory at address 0xffdc305fef755015 __libc_siglongjmp (env=3D0xaaaaaaab1018 , val=3D1) at ./setjmp/longjmp.c:30 30 } (gdb) KFAIL: gdb.base/longjmp.exp: with_probes=3D0: pattern 1: gdb/2696= 7 \ (PRMS: next over longjmp) delete breakpoints Delete all breakpoints? (y or n) y (gdb) info breakpoints No breakpoints or watchpoints. (gdb) break 63 No line 63 in the current file. Make breakpoint pending on future shared library load? (y or [n]) n (gdb) FAIL: gdb.base/longjmp.exp: with_probes=3D0: pattern 2: setup: breakpoint \ at pattern start (got interactive prompt) ... The test-case intends to set the breakpoint on line number 63 in gdb.base/longjmp.c. It tries to do so by specifying "break 63", which specifies a line in t= he "current source file". Due to the KFAIL PR, gdb stopped in __libc_siglongjmp, and because of presence of debug info, the "current source file" becomes glibc's ./setjmp/longjmp.c. Consequently, setting the breakpoint fails. Fix this by adding a $subdir/$srcfile: prefix to the breakpoint linespe= cs. I've managed to reproduce the FAIL on x86_64/-m32, by installing the glibc-32bit-debuginfo package. This allowed me to confirm the "current source file" that is used: ... (gdb) KFAIL: gdb.base/longjmp.exp: with_probes=3D0: pattern 1: gdb/2696= 7 \ (PRMS: next over longjmp) info source^M Current source file is ../setjmp/longjmp.c^M ... Tested on x86_64-linux, target boards unix/{-m64,-m32}. Reported-By: Luis Machado Reviewed-By: Tom Tromey PR testsuite/30103 Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=3D30103 --=20 You are receiving this mail because: You are on the CC list for the bug.=