* Assertion `pc_in_thread_step_range (pc, tp)' failed when executing int3 instruction
@ 2023-12-16 1:45 peter0x44
2023-12-29 16:29 ` Simon Marchi
0 siblings, 1 reply; 2+ messages in thread
From: peter0x44 @ 2023-12-16 1:45 UTC (permalink / raw)
To: gdb
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().
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Assertion `pc_in_thread_step_range (pc, tp)' failed when executing int3 instruction
2023-12-16 1:45 Assertion `pc_in_thread_step_range (pc, tp)' failed when executing int3 instruction peter0x44
@ 2023-12-29 16:29 ` Simon Marchi
0 siblings, 0 replies; 2+ messages in thread
From: Simon Marchi @ 2023-12-29 16:29 UTC (permalink / raw)
To: peter0x44, gdb
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-12-29 16:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-16 1:45 Assertion `pc_in_thread_step_range (pc, tp)' failed when executing int3 instruction peter0x44
2023-12-29 16:29 ` Simon Marchi
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).