diff options
author | Christopher Faylor <me@cgf.cx> | 2006-02-20 02:04:31 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2006-02-20 02:04:31 +0000 |
commit | a339c989c7bb65677c1544d613e65699030f9466 (patch) | |
tree | d201b1d003f49b9175ab8d77a40346893f6c53e6 /winsup/cygwin | |
parent | 6d618665782201a6b7f05d0e7d9ad1df7346c463 (diff) | |
download | cygnal-a339c989c7bb65677c1544d613e65699030f9466.tar.gz cygnal-a339c989c7bb65677c1544d613e65699030f9466.tar.bz2 cygnal-a339c989c7bb65677c1544d613e65699030f9466.zip |
* exceptions.cc (stackdump): Avoid dumping more than once.
Diffstat (limited to 'winsup/cygwin')
-rw-r--r-- | winsup/cygwin/ChangeLog | 4 | ||||
-rw-r--r-- | winsup/cygwin/dcrt0.cc | 12 | ||||
-rw-r--r-- | winsup/cygwin/exceptions.cc | 5 | ||||
-rw-r--r-- | winsup/cygwin/timer.cc | 1 |
4 files changed, 21 insertions, 1 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 16c43aebe..fd94cae92 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,5 +1,9 @@ 2006-02-19 Christopher Faylor <cgf@timesys.com> + * exceptions.cc (stackdump): Avoid dumping more than once. + +2006-02-19 Christopher Faylor <cgf@timesys.com> + * fhandler_disk_file.cc (fhandler_disk_file::opendir): Use NtOpenFile to open the directory. (fhandler_disk_file::readdir): Use NT_SUCCESS to determine if status diff --git a/winsup/cygwin/dcrt0.cc b/winsup/cygwin/dcrt0.cc index 8122939b6..a1cacc86c 100644 --- a/winsup/cygwin/dcrt0.cc +++ b/winsup/cygwin/dcrt0.cc @@ -124,6 +124,18 @@ extern "C" #endif }; +#ifdef DEBUGGING +void __stdcall +envvar () +{ + const char *s = "PATH"; + char buf[4096]; + Sleep (500); + small_printf ("%d = GetEnvironmentVariable (\"%s\")\n", GetEnvironmentVariable (s, buf, sizeof buf), s); + small_printf ("value = '%s'\n", buf); +} +#endif + char *old_title; char title_buf[TITLESIZE + 1]; diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc index 3f2c13c88..cce217e87 100644 --- a/winsup/cygwin/exceptions.cc +++ b/winsup/cygwin/exceptions.cc @@ -262,13 +262,16 @@ static void stackdump (DWORD ebp, int open_file, bool isexception) { extern unsigned long rlim_core; + static bool already_dumped; - if (rlim_core == 0UL) + if (rlim_core == 0UL || (open_file && already_dumped)) return; if (open_file) open_stackdumpfile (); + already_dumped = true; + int i; thestack.init (ebp, 1, !isexception); /* Initialize from the input CONTEXT */ diff --git a/winsup/cygwin/timer.cc b/winsup/cygwin/timer.cc index 7dea7ea69..f9205f413 100644 --- a/winsup/cygwin/timer.cc +++ b/winsup/cygwin/timer.cc @@ -74,6 +74,7 @@ timer_tracker::cancel () SetEvent (hcancel); if (WaitForSingleObject (syncthread, INFINITE) != WAIT_OBJECT_0) api_fatal ("WFSO failed waiting for timer thread, %E"); + debug_printf ("cancelled"); return true; } |