public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Simon Marchi <simark@simark.ca>
To: peter0x44 <peter0x44@disroot.org>, gdb@sourceware.org
Subject: Re: Assertion `pc_in_thread_step_range (pc, tp)' failed when executing int3 instruction
Date: Fri, 29 Dec 2023 11:29:13 -0500	[thread overview]
Message-ID: <d119257a-3d14-4126-aa81-6a503b110779@simark.ca> (raw)
In-Reply-To: <54e8eb183fec7cd01bec92ba23b83863@disroot.org>



On 2023-12-15 20:45, peter0x44 via Gdb wrote:
> For the following code:
> 
> #include <stdio.h>
> 
> int main(void)
> {
>     __asm__("int3");
>     // give code to step through
>     for (int i = 0; i < 10; ++i)
>     {
>         printf("%d\n", i);
>     }
> }
> Compiled with:
> gcc -o int3 -g3 -O2
> 
> When I try debugging under GDB 13.2, I get the following:
> 
> 0x7fb54815cd89 ???
> 0x558eebc578e4 ???
> 0xffffffffffffffff ???
> ---------------------
> ../../gdb/infrun.c:2640: 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/>.
> 
> This instruction seems to be the standard way to implement a breakpoint from code.
> Clang has an intrinsic __builtin_debugtrap() which generates it, and Microsoft Visual C++ generates it from __debugbreak().

I think that this bug is for the same thing, so discussions are going to happen there.

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

Simon

      reply	other threads:[~2023-12-29 16:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-16  1:45 peter0x44
2023-12-29 16:29 ` Simon Marchi [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d119257a-3d14-4126-aa81-6a503b110779@simark.ca \
    --to=simark@simark.ca \
    --cc=gdb@sourceware.org \
    --cc=peter0x44@disroot.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).