public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug gdb/31194] New: Stepping on "int3" instruction fails assertion.
@ 2023-12-27 22:54 peter0x44 at disroot dot org
  2023-12-27 22:58 ` [Bug gdb/31194] " peter0x44 at disroot dot org
                   ` (15 more replies)
  0 siblings, 16 replies; 17+ messages in thread
From: peter0x44 at disroot dot org @ 2023-12-27 22:54 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=31194

            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 <stdio.h>

int main(void)
{
        __asm__("int3");
        for (int i = 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:
<https://www.gnu.org/software/gdb/bugs/>.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2024-02-08 19:10 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-27 22:54 [Bug gdb/31194] New: Stepping on "int3" instruction fails assertion peter0x44 at disroot dot org
2023-12-27 22:58 ` [Bug gdb/31194] " peter0x44 at disroot dot org
2023-12-27 23:04 ` peter0x44 at disroot dot org
2023-12-28  9:51 ` ssbssa at sourceware dot org
2023-12-28 11:25 ` vries at gcc dot gnu.org
2023-12-28 16:42 ` tromey at sourceware dot org
2023-12-29  5:57 ` vries at gcc dot gnu.org
2023-12-29  6:25 ` vries at gcc dot gnu.org
2023-12-29 18:25 ` tromey at sourceware dot org
2023-12-30 17:30 ` tromey at sourceware dot org
2023-12-31  1:46 ` peter0x44 at disroot dot org
2023-12-31  5:15 ` vries at gcc dot gnu.org
2023-12-31 20:02 ` tromey at sourceware dot org
2023-12-31 20:45 ` tromey at sourceware dot org
2024-01-07 22:03 ` peter0x44 at disroot dot org
2024-01-10 18:43 ` tromey at sourceware dot org
2024-02-08 19:10 ` tromey at sourceware dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).