aboutsummaryrefslogtreecommitdiff
path: root/winsup/cygwin/dcrt0.cc
diff options
context:
space:
mode:
authorJon Turney <jon.turney@dronecode.org.uk>2024-01-11 21:34:27 +0000
committerJon Turney <jon.turney@dronecode.org.uk>2024-01-16 14:07:07 +0000
commitaa8224826cb4d7d436757688e8cb3fb760f1aabc (patch)
treed5f5e55430270334b33f6b3cfac489ea06f1d7f3 /winsup/cygwin/dcrt0.cc
parenta83b93e662b0e65fd181ed50de7e960b311f4a94 (diff)
downloadnewlib-aa8224826cb4d7d436757688e8cb3fb760f1aabc.zip
newlib-aa8224826cb4d7d436757688e8cb3fb760f1aabc.tar.gz
newlib-aa8224826cb4d7d436757688e8cb3fb760f1aabc.tar.bz2
Cygwin: Treat api_fatal() similarly to a core-dumping signal
Provide the same debugging opportunities for api_fatal() as we do for a core-dumping signal: 1) Break into any attached debugger 2) Start JIT debugger (if configured) (keeping these under DEBUGGING doesn't seem helpful) 3) Write a coredump (if rlim_core > 1MB) 4) Write a stackdump (if that failed, or 0 < rlim_core <= 1MB)
Diffstat (limited to 'winsup/cygwin/dcrt0.cc')
-rw-r--r--winsup/cygwin/dcrt0.cc6
1 files changed, 1 insertions, 5 deletions
diff --git a/winsup/cygwin/dcrt0.cc b/winsup/cygwin/dcrt0.cc
index 130d652..17c9be7 100644
--- a/winsup/cygwin/dcrt0.cc
+++ b/winsup/cygwin/dcrt0.cc
@@ -1250,11 +1250,7 @@ vapi_fatal (const char *fmt, va_list ap)
__small_vsprintf (buf + n, fmt, ap);
va_end (ap);
strace.prntf (_STRACE_SYSTEM, NULL, "%s", buf);
-
-#ifdef DEBUGGING
- try_to_debug ();
-#endif
- cygwin_stackdump ();
+ api_fatal_debug();
myself.exit (__api_fatal_exit_val);
}