Added "nop" to IM_DEBUG_BREAK macro on GCC to work around GDB bug (#7266)
There are two issues here - first, this macro uses AT&T specific syntax with $, which is not necessary. Also, some assemblers (nasm) emit different bytes for "int 3" and "int3", so it's better to use "int3" (cd 03 vs cc) More importantly, GDB has some failing assertion whenever stepping after hitting an "int3" instruction. This makes it practically useless, as is. For some reason, putting a nop afterwards as a workaround is okay. Related discussions: https://sourceware.org/bugzilla/show_bug.cgi?id=31194 https://lists.sr.ht/~skeeto/public-inbox/%3C2d3d7662a361ddd049f7dc65b94cecdd%40disroot.org%3Efeatures/potocpav-newer-lines-2
parent
8491cf36ad
commit
f1960b60c1
2 changed files with 3 additions and 2 deletions
Loading…
Reference in New Issue