[Bug c/84595] Add __builtin_break() built-in for a breakpointing mechanism
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84595 --- Comment #12 from Segher Boessenkool --- (In reply to H. Peter Anvin from comment #9) > How is this different from raise(SIGTRAP);? It does an architecture-specific trap instruction, not a SIGTRAP signal. The former is useful even if you do not have an OS (or *are* the OS), for example.
[Bug c/84595] Add __builtin_break() built-in for a breakpointing mechanism
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84595 Segher Boessenkool changed: What|Removed |Added Ever confirmed|0 |1 CC||segher at gcc dot gnu.org Status|UNCONFIRMED |NEW Last reconfirmed||2021-06-09 --- Comment #11 from Segher Boessenkool --- (In reply to Richard Biener from comment #7) > I frequently use raise(SIGSTOP) ... (or x86 specific you can do asm ("int > 3"); > or whatever that break thing was... > > Note I think that a compiler-only-side implementation might not be possible > on all targets given it might be dependent on OS and debugger preferences > as well? Generating a trap instruction is not. How that then will be handled by something else is that something else's concern, yes :-)
[Bug c/84595] Add __builtin_break() built-in for a breakpointing mechanism
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84595 Andrew Pinski changed: What|Removed |Added CC||christophe.leroy at csgroup dot eu --- Comment #10 from Andrew Pinski --- *** Bug 99299 has been marked as a duplicate of this bug. ***
[Bug c/84595] Add __builtin_break() built-in for a breakpointing mechanism
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84595 H. Peter Anvin changed: What|Removed |Added CC||hpa at zytor dot com --- Comment #9 from H. Peter Anvin --- How is this different from raise(SIGTRAP);?
[Bug c/84595] Add __builtin_break() built-in for a breakpointing mechanism
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84595 --- Comment #8 from Daniel Gutson --- (In reply to Richard Biener from comment #7) > I frequently use raise(SIGSTOP) ... (or x86 specific you can do asm ("int > 3"); > or whatever that break thing was... > > Note I think that a compiler-only-side implementation might not be possible > on all targets given it might be dependent on OS and debugger preferences > as well? It is an interesting observation. I'll drop a question in the DWARF mailing list. In any case it could be a -ggdb extension? (a table of predefined breakpoints) Pedro?
[Bug c/84595] Add __builtin_break() built-in for a breakpointing mechanism
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84595 Richard Biener changed: What|Removed |Added Component|tree-optimization |c Severity|normal |enhancement --- Comment #7 from Richard Biener --- I frequently use raise(SIGSTOP) ... (or x86 specific you can do asm ("int 3"); or whatever that break thing was... Note I think that a compiler-only-side implementation might not be possible on all targets given it might be dependent on OS and debugger preferences as well?