Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2014-08-22 * Throughout, use __try/__except/__endtry blocks, rather than myfaultCorinna Vinschen
handler. * cygtls.cc (_cygtls::remove): Accommodate the fact that pathbufs has been moved from _local_storage to _cygtls. * cygtls.h (class tls_pathbuf): Add comment to hint to gendef usage of counters. Change type of counters to uint32_t for clarity. Remove _cygtls as friend class. (struct _local_storage): Move pathbufs from here... (struct _cygtls): ...to here, allowing to access it from _sigbe. (class san): Only define on 32 bit. Remove errno, _c_cnt and _w_cnt members. (san::setup): Drop parameter. Don't initialize removed members. (san::leave): Don't set removed members. (class myfault): Only define on 32 bit. (myfault::faulted): Only keep implementation not taking any parameter. Drop argument in call to sebastian.setup. (__try/__leave/__except/__endtry): Implement to support real SEH. For now stick to SJLJ on 32 bit. * dcrt0.cc (dll_crt0_0): Drop 64 bit call to exception::install_myfault_handler. * exception.h (exception_handler): Define with EXCEPTION_DISPOSITION as return type. (PDISPATCHER_CONTEXT): Define as void * on 32 bit. Define as pointer to _DISPATCHER_CONTEXT on 64 bit. (class exception): Define separately for 32 and 64 bit. (exception::myfault): Add handler for myfault SEH handling on 64 bit. (exception::exception): Fix mangled method name to account for change in type of last parameter. (exception::install_myfault_handler): Remove. * exceptions.cc (exception::myfault_handle): Remove. (exception::myfault): New SEH handler for 64 bit. * gendef (_sigbe): Set tls_pathbuf counters to 0 explicitely when returning to the caller. * ntdll.h: Move a comment to a better place. (struct _SCOPE_TABLE): Define on 64 bit. * thread.cc (verifyable_object_isvalid): Remove gcc 4.7 workaround. * tls_pbuf.cc (tls_pbuf): Fix to accommodate new place of pathbufs. (tls_pathbuf::destroy): Change type of loop variables to uint32_t. * tls_pbuf.h (class tmp_pathbuf): Change type of buffer counters to uint32_t. Accommodate new place of pathbufs. * tlsoffsets.h: Regenerate. * tlsoffsets64.h: Regenerate.
2014-07-09 * exceptions.cc (exception::myfault_handle): Rephrase comment.Corinna Vinschen
2014-07-09 * exceptions.cc (exception::myfault_handle): Fix typo in comment.Corinna Vinschen
2014-07-07 * exceptions.cc (exception::myfault_handle): Disable handlingCorinna Vinschen
STATUS_STACK_OVERFLOW. Explain why.
2014-06-23 * exceptions.cc (try_to_debug): Free environment pointer when not usedCorinna Vinschen
anymore (CID 59968).
2014-05-19 * exceptions.cc (try_to_debug): Fix size of dbg_cmd (CID 59929).Corinna Vinschen
2014-04-09 * exceptions.cc (exception::myfault_handle): Only handle the minimumCorinna Vinschen
amount of exceptions the myfault handler was designed for.
2014-03-30* DevNotes: Add entry cgf-000025.Christopher Faylor
* exceptions.cc (_cygtls::signal_debugger): Reorganize to avoid contacting the debugger if we have already done so via the exception handler. Eliminate need for goto. Remove an ifdef in favor of just allocating a larger buffer.
2014-03-29 * dcrt0.cc (dll_crt0_0): Install myfault exception handler on x86_64.Corinna Vinschen
* exception.h (exception_list): Typedef as void on x86_64. (exception::handler_installed): Remove. (exception::handle_while_being_debugged): Remove. (exception::myfault_handle): Declare for x86_64. (exception::handle): Declare as ordinary exception handler on x86_64 as well. (exception::exception): Drop previous code (again). Install exception::handle as SEH handler. (exception::install_myfault_handler): New x86_64-only method to install exception::myfault_handle as VEH handler. Explain why. (exception::~exception): For x86_64, define frame end label (again). * exceptions.cc (CYG_EXC_CONTINUE_EXECUTION): Drop definition. (CYG_EXC_CONTINUE_SEARCH): Ditto. (exception::myfault_handle): New x86_64-only method, VEH handler to handle myfault exceptions. (exception::handle): Define as ordinary exception handler on x86_64 as well. Use ExceptionContinueExecution and ExceptionContinueSearch throughout instead of deleted Cygwin macros. Don't handle myfault exceptions on x86_64.
2014-03-28 * exceptions.cc (_cygtls::signal_debugger): Move memcpy to copy contextCorinna Vinschen
from incoming siginfo_t to thread_context, too.
2014-03-19 * exception.h (exception::handle_while_being_debugged): Declare.Corinna Vinschen
(exception::exception): Install unhandled exception filter. * exceptions.cc (exception::handle_while_being_debugged): New method.
2014-03-18 Partially revert patch from 2014-03-04.Corinna Vinschen
* exception.h (exception::handler_installed): Declare. (exception::exception): Install vectored exception handler on x86_64. (exception::~exception): Remove for x86_64. * exceptions.cc (exception::handler_installed): Define.
2014-03-04 * exception.h (exception::handler_installed): Remove.Corinna Vinschen
(exception::exception): Remove old code. Manually install SEH handler instead. (exception::~exception): For x86_64, define frame end label. * exceptions.cc (exception::handler_installed): Remove.
2014-01-08* exceptions.h (cygwin_exception::open_stackdumpfile): Move old function intoChristopher Faylor
class. (cygwin_exception::h): New member. (cygwin_exception::cygwin_exception): Initialize h to NULL. * exceptions.cc (cygwin_exception::open_stackdumpfile): Move into cygwin_exception class. Use 'h' class member. (cygwin_exception::dumpstack): Close stack dump file handle if opened.
2013-12-10* globals.cc (hntdll): Define/declare.Christopher Faylor
* exceptions.cc (inside_kernel): Don't call GetModuleFileName if we know we're in ntdll. * sigproc.cc (wait_sig): Initialize hntdll.
2013-11-24 Throughout, drop unnecessary explicit includes of windows header filesCorinna Vinschen
included by default. * winlean.h: Add long comment to explain why we have to define certain symbols. (_NORMALIZE_): Define. (_WINNLS_): Drop definition and subsequent undef. (_WINNETWK_): Ditto. (_WINSVC_): Ditto. 2013-11-23 Eric Blake <eblake@redhat.com>
2013-07-20* exceptions.cc (signal_exit): Remove comment. Use __builtin_frame_address.Christopher Faylor
2013-07-20* exceptions.cc (signal_exit): Nope. Nevermind. Dump core unconditionally.Christopher Faylor
2013-07-20reword commentChristopher Faylor
2013-07-20* exceptions.cc (signal_exit): Add a FIXME comment.Christopher Faylor
2013-07-20* exceptions.cc (signal_exit): Only dump core when it's a "kernel" signal.Christopher Faylor
Only use RtlCaptureContext on x86_64. It doesn't seem to do what's expected on x86.
2013-06-08* exceptions.cc (try_to_debug): Don't use yield() when waiting for anotherChristopher Faylor
process. (sigpacket::setup_handler): Fix long-standing problem where loop could exit with lock held.
2013-06-08* cygwait.cc (cygwait): Remove lock around sig retrieval since this code isChristopher Faylor
essentially guarded by thread-specific signal_arrived. * exceptions.cc (_cygtls::handle_SIGCONT): Simplify. Eliminate lock/unlock since code is guarded by signal_arrived.
2013-06-07* exceptions.cc (_cygtls::handle_SIGCONT): Reinstate previous behavior but makeChristopher Faylor
sure that yield() isn't called when signal stack is locked.
2013-06-07* exceptions.cc (exception::handle): Add comment explaining si_addr behavior.Christopher Faylor
2013-06-06 * exceptions.cc (_cygtls::handle_SIGCONT): Simplify loop waiting forCorinna Vinschen
sig_handle_tty_stop to wake up. Make sure to unlock before calling yield to avoid starvation of sig_handle_tty_stop. Add comments. * miscfuncs.cc (yield): Explain why yield should never be called under _cygtls::lock conditions. Call SleepEx with 1ms timeout. Explain why.
2013-06-02 * exceptions.cc (exception::handle): Resurrect accidentally lostCorinna Vinschen
patch from 2009-07-22: Set si_addr according to POSIX for SIGSEGV.
2013-05-01* exceptions.cc (cygwin_exception::dumpstack): Guard against wild pointerChristopher Faylor
dereference. (CYG_EXC_CONTINUE_EXECUTION): Define based on standard Windows definition. (CYG_EXC_CONTINUE_SEARCH): Ditto. (exception::handle): Move andreas detection earlier. Make comment clearer. (signal_exit): Set core-dumped flag.
2013-04-23 * Merge in cygwin-64bit-branch.Corinna Vinschen
2013-04-09* cygtls.h (_cygtls::reset_signal_arrived): Actually reset the signal_arrivedChristopher Faylor
event. (_cygtls::handle_SIGCONT): Declare ew function. * cygwait.cc (is_cw_sig_handle): Delete. (is_cw_sig_cont): New convenience define. (cygwait): Clear signal if is_cw_sig_cont and we got a SIGCONT. * cygwait.h (cw_wait_mask): Add cw_sig_cont. * exceptions.cc (sig_handle_tty_stop): Tighten "incyg" region. Use cw_sig_cont param for cygwait. Don't zero signal here outside of lock. (sigpacket::setup_handler): Don't check for in_forkee since we will now never get here in that state. (_cygtls::handle_SIGCONT): Define new function. (sigpacket::process): Call handle_SIGCONT early to deal with SIGCONT. Nuke continue_now handling. Allow SIGKILL to kill a suspended process. Delete a couple of now-unneeded labels. (_cygtls::call_signal_handler): Reorganize setting of incyg within lock. * sigproc.cc (pending_signals): Simplify. (pending_signals::clear): New method. (_cygtls::remove_wq): Reorganize to always close wq.thread_ev if it exists to avoid handle leaks. (sig_clear): Simplify by just calling sigq.clear(). (sig_dispatch_pending): Always call sigq.pending even in signal thread to force another loop in wait_sig. (sig_send): Remove a "goto out" just before out: label. (pending_signals::add): Simplify. (pending_signals::del): Delete. (pending_signals::next): Delete. (wait_sig): Define variable q to be the start of the signal queue. Just iterate through sigq queue, deleting processed or zeroed signals. Only set clearwait when the current signal is SIGCHLD. * sigproc.h: Add a comment about an unused enum.
2013-03-31* child_info.h (cygheap_exec_info::sigmask): Declare new field.Christopher Faylor
* cygheap.cc (init_cygheap::find_tls): Rename threadlist_ix -> ix. Only take one pass through thread list, looking for eligible threads to signal. Set a new param indicating that function has found a sigwait* mask. * cygheap.h (init_cygheap::find_tls): Reflect new parameter. * dcrt0.cc (parent_sigmask): New variable. (child_info_spawn::handle_spawn): Save parent's signal mask here. (dll_crt0_1): Restore parent's signal mask to tls sigmask as appropriate. Call sig_dispatch_pending to flush signal queue when we can finally do something with signals. * exceptions.cc (sigpacket::process): Avoid attempting to handle signals if we haven't finished initializing. Rely on the fact that find_tls will do mask checking and don't do it again. Delete ill-named 'dummy' variable. * sigproc.cc (cygheap_exec_info::alloc): Save calling thread's signal mask in new sigmask field. (wait_sig): Try to debug when WFSO fails and DEBUGGING is defined. * thread.cc (pthread::set_tls_self_pointer): Make this a true automatic method rather than inexplicably relying on a thread parameter. (pthread::thread_init_wrapper): Accommodate set_tls_self_pointer change to non-static. Initialize sigmask before setting tid or suffer signal races. * ehread.h (pthread::set_tls_self_pointer): Make non-static, delete parameter.
2013-03-28* exceptions.cc (exception::handle): Generalize comment.Christopher Faylor
2013-03-10* cygtls.h (_cygtls::signal_debugger): Change argument type.Christopher Faylor
(_cygtls::copy_context): Delete declaration. * exceptions.cc (exception::handle): Don't call copy_context() here. Move signal_handler call earlier and always call it. (_cygtls::copy_context): Delete definition. (_cygtls::signal_debugger): Move copy_context logic here. Suspend thread receiving signal before gathering context information.
2013-03-01Remove now-inappropriate comment.Christopher Faylor
2013-03-01* exceptions.cc (exception::handle): Eliminate buggy recursed value and justChristopher Faylor
check if we're exiting.
2013-01-31* DevNotes: Add entry cgf-000022.Christopher Faylor
* cygtls.h (_cygtls::func): Define as a sa_sigaction style function. * exceptions.cc (sig_handle_tty_stop): Ditto. (_cygtls::interrupt_setup): Fix coercion to accommodate 'func' change. (ctrl_c_handler): Use tty kill_pgrp to send a signal. (sigpacket::process): Don't process sigflush here. (_cygtls::call_signal_handler): Reorganize to avoid a race. Always call sa_sigaction style function. * fhandler_termios.cc (is_flush_sig): Define new function. (tty_min::kill_pgrp): Handle tty flush when signal detected. (fhandler_termios::bg_check): Be slightly more paranoid about checking for valid tty. (fhandler_termios::sigflush): Don't flush unless tty owner. * fhandler_tty.cc (fhandler_pty_slave::ioctl): Use tty kill_pgrp to send signal. (fhandler_pty_master::ioctl): Ditto. * signal.cc (killsys): Delete definition. * sigproc.h (killsys): Delete declaration. * include/cygwin/signal.h (siginfo_t): Simplify union/struct nesting slightly. Implement mechanism to allow cygwin data passing.
2013-01-23* exceptions.cc (exception::handle): Make attempt to recursively dump stackChristopher Faylor
fatal.
2013-01-21* dcrt0.cc (dll_crt0_1): Comment assumption.Christopher Faylor
* exceptions.cc (sigpacket::setup_handler): Avoid sending signals during fork processing.
2013-01-21Throughout, change __attribute__ ((regparm (N))) to just __regN. Throughout,Christopher Faylor
(mainly in fhandler*) start fixing gcc 4.7.2 mismatch between regparm definitions and declarations. * gendef: Define some functions to take @ declaration to accommodate _regN defines which use __stdcall. * gentls_offsets: Define __regN macros as empty. * autoload.cc (wsock_init): Remove unneeded regparm attribute. * winsup.h (__reg1): Define. (__reg2): Define. (__reg3): Define. * advapi32.cc (DuplicateTokenEx): Coerce some initializers to avoid warnings from gcc 4.7.2. * exceptions.cc (status_info): Declare struct to use NTSTATUS. (cygwin_exception::dump_exception): Coerce e->ExceptionCode to NTSTATUS. * fhandler_clipboard.cc (cygnativeformat): Redefine as UINT to avoid gcc 4.7.2 warnings. (fhandler_dev_clipboard::read): Ditto.
2013-01-19* exceptions.cc (ctrl_c_handler): Remove special-case handler forChristopher Faylor
"cygwin_finished_initializing". * sigproc.cc (exit_thread): Undefine ExitThread earlier to avoid recursion on error return.
2013-01-14* exceptions.cc (signal_exit): Move captive process termintation...Christopher Faylor
(_cygtls::interrupt_setup): ...into here. (sigpacket::process): Simplify setting of handler when have_execed. (_cygtls::interrupt_setup): Don't call proc_subproc when we've execed. * globals.cc (exit_states): Delete unneeded ES_EXEC_EXIT. * pinfo.cc (pinfo::exit): Change debugging output. Call proc_terminate rather than the now-obsolete sigproc_terminate. Don't set exit_state to ES_EXEC_EXIT. Set exit_state to ES_FINAL later. * sigproc.cc (sigproc_terminate): Delete function. (wait_sig): Don't call proc_subproc if have_execed. * sigproc.h (sigproc_terminate): Delete declaration. * sync.h (lock_process::lock_process): Don't set exit_state to ES_PROCESS_LOCKED. (lock_process::operator LONG): Define.
2013-01-09 * cygerrno.h: Fix copyright.Corinna Vinschen
* exceptions.cc: Drop comment explaining removed variable.
2013-01-02* cygtls.h (_cygtls::signal_exit): Delete from class.Christopher Faylor
* exception.h (cygwin_exception): New class. (cygwin_exception::dumpstack): Declare new function. (cygwin_exception::context): Ditto. (cygwin_exception::dump_exception): Ditto. * exceptions.cc (cygwin_exception::dump_exception): Move into cygwin_exception class. Accommodate new variable names. (cygwin_exception::dumpstack): Ditto stackdump -> dumpstack. (exception::handle): Move andreas processing earlier. Defer signal processing decisions to the signal thread where they belong. Pass exception information to sig_send via new siginfo_t si_cyg field. (ctrl_c_handler): Wait for SIGHUP signal to be processed since it could cause a process exit and we don't want races with thread exit lock. (signal_exit): Move back here from sigproc.cc. Modify arguments and remove from sigpacket class. Decide when to dump core based on signal type. (sigpacket::process): Handle exiting signals in context of threads rather than in the signal thread. Signal debugger on non-Windows signals. Remove setup_signal_exit call. * sigproc.cc (no_signals_available): Remove argument. (signal_exit_code): Delete. (close_my_readsig): Ditto. (_cygtls::signal_exit): Move to exceptions.cc. (sigproc_terminate): Don't attempt to terminate signal thread. (setup_signal_exit): Delete. (exit_thread): Use new si_cyg entry in siginfo_t. (sig_send): Just use empty initializer for si. Accommodate change in no_signals_available argument. (wait_sig): Remove attempt to "go asynchronous" on process exit. Delete __SIGEXIT handling. Don't ever exit. * sigproc.h: Remove __SIGEXIT from signal enum. Renumber. * include/cygwin/signal.h (siginfo_t): Add si_cyg entry.
2012-12-28* DevNotes: Add entry cgf-000019.Christopher Faylor
* dcrt0.cc (do_exit): Just set exit_state to ES_EVENTS_TERMINATE and nuke call to events_terminate which just set a superfluous flag. * sigproc.cc (signal_exit_code): New variable. (setup_signal_exit): Define new function. (_cygtls::signal_exit): Remove accommodations for closing the signal pipe handle. (exit_thread): Just sleep if we're exiting. (wait_sig): If signal_exit_code is set, just handle bookkeeping signals and exit ReadFile loop if there is nothing more to process. Call signal_exit at end if signal_exit_code is non-zero. * sigproc.h (setup_signal_exit): Declare new function. * exceptions.cc (sigpacket::process): Use setup_signal_exit to control exiting due to a signal. (exception::handle): Ditto. Query exit_state rather than defunct exit_already to determine if we are exiting. * globals.cc (ES_SIGNAL_EXIT): New enum. * sync.h (lock_process::release): New function for explicitly unlocking muto. (lock_process::~lock_process): Use release method.
2012-12-08* exceptions.cc (sigpacket::process): Reorganize to avoid use of tls beforeChristopher Faylor
initialization. * fhandler_fifo.cc (fhandler_fifo::arm): Avoid improper printing of integer as a string in debug output.
2012-12-07* sigproc.h (sigpacket): Remove parameter names from declarations.Christopher Faylor
(sigpacket::sigtls): Rename from 'tls'. * exceptions.cc (sigpacket::process): Define local tls variable and assign that to sigtls if appropriate. Clarify debugging output. * sigproc.cc (sig_send): Accommodate tls -> sigtls rename. (pending_signals::add): Ditto. (wait_sig): Ditto.
2012-12-07* cygtls.h (_cygtls::get_signal_arrived): Add parameter to make lock/unlockChristopher Faylor
conditional. * exceptions.cc (_cygtls::interrupt_setup): Don't get a lock when setting signal_arrived since we already have one. * gendef: Add some comments to make it easier to find functions.
2012-12-05* cygtls.h (_cygtls::will_wait_for_signal): Rename from 'signal_waiting' toChristopher Faylor
something more expressive. Reflect rename throughout. (_cygtls::get_signal_arrived): Rename from create_signal_arrived. Move lock here. (_cygtls::set_signal_arrived): Use get_signal_arrived. * exceptions.cc (_cygtls::interrupt_setup): Use get_signal_arrived. * tlsoffsets.h: Regenerate.
2012-08-17* DevNotes: Add entry cgf-000016.Christopher Faylor
* cygtls.h (_cygtls::push): Inline. (_cygtls::interrupt_now): Change signal number argument to siginfo_t argument. (_cygtls::interrupt_setup): Ditto. (_cygtls::set_siginfo): Delete declaration. (_cygtls::reset_signal_arrived): Don't reset signal_arrived signal. Just reset flag. * exceptions.cc (_cygtls::interrupt_now): Reflect argument changes. Pass si to interrupt_setup. (_cygtls::interrupt_setup): Reflect argument changes. Fill out tls infodata here using passed-in si. Use si.si_signo instead of sig. (sigpacket::setup_handler): Move this function into sigpacket class. Use si field from the class as appropriate. (sigpacket::process): Don't call tls->set_siginfo here since setup_handler could fail. Eliminate now-unneeded sig argument. * sigproc.h (sigpacket::setup_handler): Move setup_handler to this class.
2012-08-17* exceptions.cc (sig_handle_tty_stop): Clear tls sig field.Christopher Faylor
(sigpacket::process): When continuing, set tls->sig before arming signal_arrived.