From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A2E50385828E; Thu, 13 Jul 2023 13:19:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A2E50385828E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1689254346; bh=WYFzBr/AqRrEdat6yWsrw7mnoAE7custG+9YAjyuw8U=; h=From:To:Subject:Date:From; b=hLrF5fi/P3wtnZc1LH3DU8x0ePD8UT30xQorRluqEZuW3A1QXn22Rio/O1Jx7VYRw VWtbI4SA81ToXqTsa2LcA7+42lqHjINw/9CbpjtEhaGMxoXDHTiGXBrkTO1i4gGP/r n2m5Z5waHCbEmbXwMnkQHetgDEsBudeTquZ0S3WQ= From: "vries at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug testsuite/30633] New: [gdb/testsuite, native-gdbserver] FAIL: gdb.dwarf2/typeddwarf.exp: runto: run to main Date: Thu, 13 Jul 2023 13:19:05 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: testsuite X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: vries 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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=3D30633 Bug ID: 30633 Summary: [gdb/testsuite, native-gdbserver] FAIL: gdb.dwarf2/typeddwarf.exp: runto: run to main Product: gdb Version: unknown Status: NEW Severity: normal Priority: P2 Component: testsuite Assignee: unassigned at sourceware dot org Reporter: vries at gcc dot gnu.org Target Milestone: --- On ubuntu 22.04.2 I run into: ... make check RUNTESTFLAGS=3D"--target_board=3Dnative-gdbserver/ gdb.dwarf2/typeddwarf.exp" ... FAIL: gdb.dwarf2/typeddwarf.exp: runto: run to main ... In more detail: ... (gdb) continue^M Continuing.^M ^M Program received signal SIGSEGV, Segmentation fault.^M 0x0000000000000001 in ?? ()^M (gdb) FAIL: gdb.dwarf2/typeddwarf.exp: runto: run to main ... Previously reported here: https://sourceware.org/pipermail/gdb-patches/2023-July/200591.html . It's a regression since commit 90cce6c0551 ("[gdb/testsuite] Add nopie in a= few test-cases"). Without nopie we have: ... $ file outputs/gdb.dwarf2/typeddwarf/typeddwarf outputs/gdb.dwarf2/typeddwarf/typeddwarf: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=3D1f4dde6f634075d45b39826931f143ae350f45ea, with debug_info, = not stripped ... With nopie we have: ... outputs/gdb.dwarf2/typeddwarf/typeddwarf: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, BuildID[sha1]=3Df99a83c0cb6e5ce8281978bd9e69b05c559fee81, with debug_info, = not stripped ... Using this information, I can also reproduce the FAIL on openSUSE Leap 15.4= , by adding -static. We run into the FAIL as follows: - due to using gdbserver, we attach at the point of the first instruction, = in _start - we then set a breakpoint at main - the test-case is a .s file, that has main renamed to _start in the assemb= ly, but not in the debuginfo. - setting a breakpoint at main sets the breakpoint at the same instruction we're currently stopped at (for the amd64 case. For the i386 case, the breakpoint is set one instruction after that). - continue doesn't hit the breakpoint, and we return out of _start, which causes a sigsegv Without nopie, the executable is not static, and consequently we attach at _start in the dynamic linker, which means that continue will hit the breakp= oint in main. --=20 You are receiving this mail because: You are on the CC list for the bug.=