From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 58E9B3882100; Fri, 14 Jun 2024 10:05:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 58E9B3882100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1718359546; bh=IN98+AHimzJWFynC0haSudKFFEzlgjeVo6txkEebFnE=; h=From:To:Subject:Date:From; b=CiSWFORlt8A0ZpMB0MTvjESd0tvDMR25AvgZxw4PN6l4nNJr5vPXoF+kb5ywdXnts LbYNX7vbI5+Fdpsg0bNc1bblnY1mY8hyJnuJDbtxc0lV6EShgx6RrW3QlcTpUTGqbg 8owZLHUd56kIWH5qDFrKq6UojIfT3MIGWcwqGuY8= From: "dmitry.neverov at jetbrains dot com" To: gdb-prs@sourceware.org Subject: [Bug gdb/31896] New: -exec-next skips statements Date: Fri, 14 Jun 2024 10:05:45 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: gdb X-Bugzilla-Version: 14.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: dmitry.neverov at jetbrains dot com X-Bugzilla-Status: UNCONFIRMED 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=3D31896 Bug ID: 31896 Summary: -exec-next skips statements Product: gdb Version: 14.1 Status: UNCONFIRMED Severity: normal Priority: P2 Component: gdb Assignee: unassigned at sourceware dot org Reporter: dmitry.neverov at jetbrains dot com Target Milestone: --- I'm debugging the following code, the at line1 (v =3D=3D 0): if (v) { // line1 // branch1 } else if (predicate()) { // line2 // branch2 } else=20 { // branch3, line3 } When I issue the `next` command, execution stops at line3 instead of line2. If I change the code and add a newline before the 'else if', `next` stops at line2 as expected: if (condition1) { // line1 // branch1 } else if (predicate()) { // line2 // branch2 } else=20 { // branch3, line3 } It looks like it happens because the last jump instruction in first branch has the line2. --=20 You are receiving this mail because: You are on the CC list for the bug.=