Skip to content

Commit

Permalink
Maybe default signal handler?
Browse files Browse the repository at this point in the history
  • Loading branch information
gpdaniels committed Jul 17, 2024
1 parent 2fa7540 commit 39a1d02
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/debug/breakpoint.test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,16 @@ TEST(breakpoint, evaluate, breakpoint) {
if (signal_number == SIGTRAP) {
// PRINT("Breakpoint skipped.\n");
caught = true;
std::signal(SIGTRAP, SIG_IGN);
std::signal(SIGTRAP, SIG_DFL);
}
};
REQUIRE(std::signal(SIGTRAP, handler) != SIG_ERR);
#endif

// Note: Arm cpus (unlike intel) do not increment the pc upon hitting the breakpoint instruction.

GTL_BREAKPOINT();

REQUIRE(caught);
}

0 comments on commit 39a1d02

Please sign in to comment.