2020-06-15 14:18:57 +00:00
|
|
|
#if 0
|
|
|
|
/*─────────────────────────────────────────────────────────────────╗
|
|
|
|
│ To the extent possible under law, Justine Tunney has waived │
|
|
|
|
│ all copyright and related or neighboring rights to this file, │
|
|
|
|
│ as it is written in the following disclaimers: │
|
|
|
|
│ • http://unlicense.org/ │
|
|
|
|
│ • http://creativecommons.org/publicdomain/zero/1.0/ │
|
|
|
|
╚─────────────────────────────────────────────────────────────────*/
|
|
|
|
#endif
|
2021-09-28 05:58:51 +00:00
|
|
|
#include "libc/log/backtrace.internal.h"
|
2020-06-15 14:18:57 +00:00
|
|
|
#include "libc/log/log.h"
|
|
|
|
#include "libc/runtime/runtime.h"
|
2021-09-28 05:58:51 +00:00
|
|
|
#include "libc/runtime/symbols.internal.h"
|
2020-06-15 14:18:57 +00:00
|
|
|
#include "libc/stdio/stdio.h"
|
|
|
|
|
|
|
|
int main(int argc, char *argv[]) {
|
2022-03-21 10:46:16 +00:00
|
|
|
ShowCrashReports();
|
2020-06-15 14:18:57 +00:00
|
|
|
if (IsDebuggerPresent(false)) {
|
|
|
|
printf("debugger found!\r\n");
|
|
|
|
DebugBreak();
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
printf("try running: gdb %s\r\n", argv[0]);
|
|
|
|
return 1;
|
|
|
|
}
|