mirror of
https://github.com/matrix-construct/construct
synced 2024-11-16 15:00:51 +01:00
ircd::assert: Ensure x86_64 for use of trap instruction.
This commit is contained in:
parent
b456210f1e
commit
8a100eeb26
1 changed files with 6 additions and 4 deletions
|
@ -26,12 +26,14 @@ __assert_fail(const char *__assertion,
|
||||||
__function,
|
__function,
|
||||||
__assertion);
|
__assertion);
|
||||||
|
|
||||||
if(strcmp(RB_ASSERT, "trap") == 0)
|
if(strcmp(RB_ASSERT, "quit") == 0)
|
||||||
__asm__ volatile ("int $3");
|
|
||||||
|
|
||||||
else if(strcmp(RB_ASSERT, "quit") == 0)
|
|
||||||
ircd::quit();
|
ircd::quit();
|
||||||
|
|
||||||
|
#if defined(__x86_64__)
|
||||||
|
else if(strcmp(RB_ASSERT, "trap") == 0)
|
||||||
|
__asm__ volatile ("int $3");
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(HAVE_EXCEPTION)
|
#if defined(HAVE_EXCEPTION)
|
||||||
else if(strcmp(RB_ASSERT, "term") == 0)
|
else if(strcmp(RB_ASSERT, "term") == 0)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue