From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B921B395A061; Wed, 16 Nov 2022 14:56:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B921B395A061 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1668610616; bh=09/1s+W++amYEchiA1IZardnRnUqxxRAs/rirZsECm4=; h=From:To:Subject:Date:From; b=eSodZkp8DESe4cHcj19BS+lDGXZy1NGP/7sos9ij1haQpgsyh44twzrKP/AEu/2oL cSaT9b0hfkaGl+DB4KK5Kd51z3UeBbPr/rgImozAMe90biYDg+fmLfxqjLzeMpMKe3 6ELVQS2mf4HJgiEgYChKWYbP4YRcU8G5e+huMZfA= From: "vries at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug testsuite/29792] New: [gdb/testsuite, powerpc] FAIL: gdb.opt/solib-intra-step.exp: second-hit Date: Wed, 16 Nov 2022 14:56:56 +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: 12.1 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=3D29792 Bug ID: 29792 Summary: [gdb/testsuite, powerpc] FAIL: gdb.opt/solib-intra-step.exp: second-hit Product: gdb Version: 12.1 Status: NEW Severity: normal Priority: P2 Component: testsuite Assignee: unassigned at sourceware dot org Reporter: vries at gcc dot gnu.org Target Milestone: --- On powerpc64le-linux, I ran into: ... (gdb) PASS: gdb.opt/solib-intra-step.exp: first-hit step^M 28 { /* first-retry */^M (gdb) FAIL: gdb.opt/solib-intra-step.exp: second-hit ... First let's do a stepping session: ... $ ./build/gdb/gdb -q outputs/gdb.opt/solib-intra-step/solib-intra-step-main Reading symbols from outputs/gdb.opt/solib-intra-step/solib-intra-step-main= ... (gdb) start Temporary breakpoint 1 at 0x10000718: file /suse/tdevries/gdb/src/gdb/testsuite/gdb.opt/solib-intra-step-main.c, line = 23. Starting program: /suse/tdevries/gdb/build/gdb/testsuite/outputs/gdb.opt/solib-intra-step/sol= ib-intra-step-main=20 Temporary breakpoint 1, main () at /suse/tdevries/gdb/src/gdb/testsuite/gdb.opt/solib-intra-step-main.c= :23 23 shlib_first (); (gdb) step shlib_first () at /suse/tdevries/gdb/src/gdb/testsuite/gdb.opt/solib-intra-step-lib.c:29 29 shlib_second (0); /* first-hit */ (gdb) step 28 { /* first-retry */ (gdb) step 29 shlib_second (0); /* first-hit */ (gdb) step shlib_second (dummy=3D0) at /suse/tdevries/gdb/src/gdb/testsuite/gdb.opt/solib-intra-step-lib.c:= 23 23 abort (); /* second-hit */ ... So the problem is that we arrive at line 29, then step back to 28, and agai= n to 29 before stepping into shlib_second. Looking at objdump output, shlib_first starts at 0x740, and with readline -= wL, we see: ... CU: /suse/tdevries/gdb/src/gdb/testsuite/gdb.opt/solib-intra-step-lib.c: File name Line number Starting address View Stmt solib-intra-step-lib.c 22 0x710 x solib-intra-step-lib.c 23 0x724 x solib-intra-step-lib.c 28 0x740 x solib-intra-step-lib.c 29 0x74c x solib-intra-step-lib.c 28 0x750 x solib-intra-step-lib.c 29 0x758 x solib-intra-step-lib.c 30 0x760 x solib-intra-step-lib.c - 0x77c ... So, that makes sense. When stepping into shlib_first, we skip the first en= try at 28 due to prologue skipping, then step to the entry at 28 and then back = to the entry at 29, which is where the call to shlib_second is. GDB uses the line info available (which is weird because of optimization), = and does this correctly. The test-case needs to be updated to handle this. --=20 You are receiving this mail because: You are on the CC list for the bug.=