StuBS
assert.cc File Reference
#include "assert.h"
#include "debug/output.h"
#include "machine/core.h"
Include dependency graph for assert.cc:

Functions

void assertion_failed (const char *exp, const char *func, const char *file, int line)
 Handles a failed assertion.
 

Function Documentation

◆ assertion_failed()

void assertion_failed ( const char *  exp,
const char *  func,
const char *  file,
int  line 
)

Handles a failed assertion.

This function will print a message containing further information about the failed assertion and stops the current CPU permanently.

Note
This function should never be called directly, but only via the macro assert.
Todo:
Implement Remainder of Method (output & CPU stopping)
Parameters
expExpression that did not hold
funcName of the function in which the assertion failed
fileName of the file in which the assertion failed
lineLine in which the assertion failed