|
resonance 1.0.1
|
Go to the source code of this file.
Macros | |
| #define | HX_ASSERT(expression) |
Functions | |
| void | HxAssertFailed (const char *pszFile, int nLine, const char *pszExpression) |
| Report a failed check and stop the machine. | |
| #define HX_ASSERT | ( | expression | ) |
| void HxAssertFailed | ( | const char * | pszFile, |
| int | nLine, | ||
| const char * | pszExpression ) |
Report a failed check and stop the machine.
The routine behaves as newlib's own __assert, toolchain C library linked as shipped. Its report goes to stderr, taken from the reentrancy structure at 0x007819cc, through the format assertion "s" failed: file "s", line d, which is that library's text verbatim. It then tail-calls abort, which raises signal 6, calls exit, and spins forever. This declaration exists because the game calls it.
The identification is strong rather than verified. The format string, the argument order, and the three-parameter signature were matched against newlib from knowledge of that library and not against a copy of its source. HX_ASSERT below therefore wraps the standard assert rather than any routine of the game's own.
Every call site in the binary falls through into the code the check was protecting. That is because the declaration the game compiled against did not mark the routine as never returning, and not because the routine returns. It does not return.
| pszFile | The reporting file, from __FILE__. |
| nLine | The reporting line, from __LINE__. |
| pszExpression | The source text of the failed expression. |