From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 5C9C63858D32; Wed, 27 Dec 2023 22:54:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5C9C63858D32 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1703717685; bh=+aHmxsmEkCc2B/V5p3gb2EbpHyICVPT6/LXlDm55fhg=; h=From:To:Subject:Date:From; b=aoeNcoVmRw9jRzosLcVXBaiRZcWE6eRvn0kudYKge0M0JaOllKfYQvqa/SbIjxBcw wE1s4enqxyFyXSxaJ615WzY6u7pYpoT6B4RcDpfiOKrw3kpOitmqKwGuZQem+GljFh 8AlYd9nzY5XdTrEHE80MQlMz+fbtEjiAGgMDOXvw= From: "peter0x44 at disroot dot org" To: gdb-prs@sourceware.org Subject: [Bug gdb/31194] New: Stepping on "int3" instruction fails assertion. Date: Wed, 27 Dec 2023 22:54:44 +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: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: peter0x44 at disroot dot org 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=3D31194 Bug ID: 31194 Summary: Stepping on "int3" instruction fails assertion. Product: gdb Version: HEAD Status: UNCONFIRMED Severity: normal Priority: P2 Component: gdb Assignee: unassigned at sourceware dot org Reporter: peter0x44 at disroot dot org Target Milestone: --- I tested this with: GNU gdb (GDB) 15.0.50.20231227-git But I could also reproduce it with gdb 13.1, and gdb 13.2 For the following code: #include int main(void) { __asm__("int3"); for (int i =3D 0; i < 5; ++i) { printf("%d\n", i); } } Compiled with: gcc test.c -o test -O2 -g3 GCC does lack an intrinsic to generate the "int3" instruction, but clang generates it from __builtin_debugbreak(). When I run, the debugger breaks as expected, but as soon as I step, the following happens: ../../gdb/infrun.c:2973: internal-error: resume_1: Assertion `pc_in_thread_step_range (pc, tp)' failed. A problem internal to GDB has been detected, further debugging may prove unreliable. Quit this debugging session? (y or n) n This is a bug, please report it. For instructions, see: . --=20 You are receiving this mail because: You are on the CC list for the bug.=