diff options
| author | manuel <manuel@mausz.at> | 2012-03-27 11:51:08 +0200 |
|---|---|---|
| committer | manuel <manuel@mausz.at> | 2012-03-27 11:51:08 +0200 |
| commit | 4f670845ff9ab6c48bcb5f7bf4d4ef6dc3c3064b (patch) | |
| tree | 868c52e06f207b5ec8a3cc141f4b8b2bdfcc165c /pintos-progos/lib/user/debug.c | |
| parent | eae0bd57f0a26314a94785061888d193d186944a (diff) | |
| download | progos-4f670845ff9ab6c48bcb5f7bf4d4ef6dc3c3064b.tar.gz progos-4f670845ff9ab6c48bcb5f7bf4d4ef6dc3c3064b.tar.bz2 progos-4f670845ff9ab6c48bcb5f7bf4d4ef6dc3c3064b.zip | |
reorganize file structure to match the upstream requirements
Diffstat (limited to 'pintos-progos/lib/user/debug.c')
| -rw-r--r-- | pintos-progos/lib/user/debug.c | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/pintos-progos/lib/user/debug.c b/pintos-progos/lib/user/debug.c deleted file mode 100644 index f49b874..0000000 --- a/pintos-progos/lib/user/debug.c +++ /dev/null | |||
| @@ -1,25 +0,0 @@ | |||
| 1 | #include <debug.h> | ||
| 2 | #include <stdarg.h> | ||
| 3 | #include <stdbool.h> | ||
| 4 | #include <stdio.h> | ||
| 5 | #include <syscall.h> | ||
| 6 | |||
| 7 | /* Aborts the user program, printing the source file name, line | ||
| 8 | number, and function name, plus a user-specific message. */ | ||
| 9 | void | ||
| 10 | debug_panic (const char *file, int line, const char *function, | ||
| 11 | const char *message, ...) | ||
| 12 | { | ||
| 13 | va_list args; | ||
| 14 | |||
| 15 | printf ("User process ABORT at %s:%d in %s(): ", file, line, function); | ||
| 16 | |||
| 17 | va_start (args, message); | ||
| 18 | vprintf (message, args); | ||
| 19 | printf ("\n"); | ||
| 20 | va_end (args); | ||
| 21 | |||
| 22 | debug_backtrace (); | ||
| 23 | |||
| 24 | exit (1); | ||
| 25 | } | ||
