diff options
| author | John "Lameguy" Wilbert Villamor <lameguy64@gmail.com> | 2022-03-25 09:22:20 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-03-25 09:22:20 +0800 |
| commit | 975e614b3c840e2f717adac1d1cb9cee4e5e561b (patch) | |
| tree | 6584ce5b0dbe27a466c95c81fac61b0d90f627bd /libpsn00b/libc/abort.c | |
| parent | 05d44488bd5587786f4bd0286fc0f555c79aa46a (diff) | |
| parent | 45168ae43e29aa5930ee5a206475ae836078915f (diff) | |
| download | psn00bsdk-975e614b3c840e2f717adac1d1cb9cee4e5e561b.tar.gz | |
Merge pull request #46 from spicyjpeg/psxmdec
Critical ldscript fixes, initial MDEC support and CI updates
Diffstat (limited to 'libpsn00b/libc/abort.c')
| -rw-r--r-- | libpsn00b/libc/abort.c | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/libpsn00b/libc/abort.c b/libpsn00b/libc/abort.c index ca5ab1d..de4323d 100644 --- a/libpsn00b/libc/abort.c +++ b/libpsn00b/libc/abort.c @@ -1,9 +1,29 @@ + #include <stdio.h> -void abort() { +/* Standard abort */ +void abort() { printf("abort()\n"); - - while(1); -}
\ No newline at end of file + for (;;) + __asm__ volatile(""); +} + +/* Internal function used by assert() macro */ + +void _assert_abort(const char *file, int line, const char *expr) { + printf("%s:%d: assert(%s)\n", file, line, expr); + + for (;;) + __asm__ volatile(""); +} + +/* Pure virtual function call (C++) */ + +void __cxa_pure_virtual(void) { + printf("__cxa_pure_virtual()\n"); + + for (;;) + __asm__ volatile(""); +} |
