From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 672BB399DB30; Wed, 5 Jun 2024 16:16:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 672BB399DB30 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1717604161; bh=+VMtx79zJRtaJY1Jr0cx1w6gV255EL+L6MUMajaIebo=; h=From:To:Subject:Date:In-Reply-To:References:From; b=t9yJWsRBxsxd/YmaW1+k819yH1OJvO2/SSqWQA5hfDIgWllsl16f596EutdQbU6Bq Dz3eULuei1HnGchMXxmHysUyuNYXIGan9D7vdPdI5NlALOQkA6+1kzmqos3yT4xreC luP2h2etDeSKqO3SFaTzaESiC9C3P7+yODQ64uws= From: "iamanonymous.cs at gmail dot com" To: gdb-prs@sourceware.org Subject: [Bug gdb/31849] Issue with Unexpected Behavior in GDB Stepping at Optimization Level O2 and O3 Date: Wed, 05 Jun 2024 16:16:00 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: gdb X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: iamanonymous.cs at gmail 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: 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=3D31849 --- Comment #2 from Anonymous --- (In reply to Anonymous from comment #1) > Additionally, this unexpected stepping behavior does not occur when the > program is compiled with optimization level O0. We found this issue by comparing the executable files compiled with optimization level O2, when comparing the debugging traces at the source le= vel and the instruction level. We know that since optimization will optimize a large amount of code, the h= it information (i.e., the lines of code that the debugger stops at) of executa= ble files generated with different optimization levels under GDB cannot be dire= ctly compared. Here, "this unexpected stepping behavior does not occur" indicates that, at= the O0 level, neither the source-level debugging nor the instruction-level debugging encountered the unexpected stopping at line #17. --=20 You are receiving this mail because: You are on the CC list for the bug.=