From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D4214385703A; Tue, 31 Jan 2023 15:00:41 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D4214385703A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1675177241; bh=RO4UBGNs2Mroy5sCN9z5OKvqROtBwxhufTfE0Vso84s=; h=From:To:Subject:Date:In-Reply-To:References:From; b=xP9m5m6EoIDNkqq1kmBbpu2zh/xEygEoTWKTUanRocyrDD3iCzKkkJX9vYLxSvM6G w2QhGWSJ2hBOxmdLC00tKURbmt9MRHKSKybuHjMuABYqzg2Wsm/gsd4Wj8Q132yGUx J/QccSqQ5xydqDCzScrFgT4lLi0mf5iu6rVTy+4g= From: "kristof.mulier at telenet dot be" To: gdb-prs@sourceware.org Subject: [Bug gdb/21221] gdb hangs while stepping an empty loop Date: Tue, 31 Jan 2023 15:00:41 +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: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: kristof.mulier at telenet dot be X-Bugzilla-Status: ASSIGNED 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=3D21221 --- Comment #18 from kristof mulier --- > Handling these cases (they are a set of multiple corner cases depending o= n how you write your code) in gdb is not trivial unfortunately. Indeed, we understand this is a very complicated problem to solve. > I believe clang might generate code that doesn't cause GDB to get stuck. Unfortunately, we need a solution that's independent of the compiler. We ca= nnot force our users to use Clang. Do you think a solution would be possible, that works for the current GCC versions? Or is this a fundamental problem? Many microcontroller sample projects use these kinds of empty loops for del= ays. If you stop the program, there's always a big probability the PC is in such= a loop. So, this "GDB hangs while stepping an empty loop" issue is really important to many GDB users. --=20 You are receiving this mail because: You are on the CC list for the bug.=