Commit Graph

175 Commits

Author SHA1 Message Date
Jonathan Ernst 360a3f9142 Update the address of the Free Software Foundation. 2006-05-23 14:11:13 +02:00
Alexandre Julliard d2ad6f8355 ntdll: Get registers on the client side for NtGetContextThread on the current thread. 2006-04-20 15:40:28 +02:00
James Hawkins 14faf12845 ntdll: Return error if the signal index equals the size of the array. 2006-04-07 11:46:12 +02:00
Alexandre Julliard a1f0f39174 ntdll: Save FPU context for all exceptions. 2006-04-03 21:39:33 +02:00
Petr Tesarik e748a77e1a ntdll: Fix debug exceptions from VM86.
- Set ContextFlags accordingly in save_vm86_context().
- Raise debug exceptions correctly for debug exceptions.
- Do not clear TF bit for VM86-generated debug exceptions.
2006-03-27 11:30:50 +02:00
Detlef Riekenberg 43a0f0c85a ntdll: Avoid compile error caused by a single quote. 2006-02-21 11:12:28 +01:00
Robert Shearman 3e47c82e02 ntdll: Add a define for SYS_sigaction to __NR_sigaction.
Print an error if __NR_sigaction doesn't exist as this means the wrong
syscall header is being used.
2006-02-20 20:31:51 +01:00
Eric Pouech c67bc2260c A couple of new valgrind instrumentations for better support. 2006-02-14 13:06:29 +01:00
Alexandre Julliard 57550776ce ntdll: Added emulation of ATL thunks for platforms with NX support. 2006-02-10 15:13:59 +01:00
Robert Millan 8800352477 Enable for GNU/kFreeBSD the same kernel-specific interface/parameter
that is used with FreeBSD.
2006-02-05 13:06:50 +01:00
Robert Millan 62af0706ff ntdll: Rename i386 CPU trap codes to avoid collision with system headers. 2006-02-03 12:30:55 +01:00
Eric Pouech 2e0b5336f6 Suppress some false-positives reported by valgrind. 2006-01-27 16:17:51 +01:00
Alexandre Julliard 4ce433d826 ntdll: Move the %gs register to the ntdll_thread_regs structure. 2006-01-20 16:54:11 +01:00
Alexandre Julliard a19e3eeb20 ntdll: Move the TEB register to the ntdll_thread_regs structure. 2006-01-20 16:18:06 +01:00
Alexandre Julliard 2878d99216 ntdll: Add debug registers to the context of all exceptions.
Maintain a local cache of the debug registers to avoid server calls
where possible.
2006-01-13 13:58:14 +01:00
Alexandre Julliard 2654be08d5 ntdll: Handle NtSetContextThread on the client side (as far as
possible) when setting the context of the current thread.
2006-01-11 20:20:32 +01:00
Alexandre Julliard 8651ceb18e ntdll: Make __wine_call_from_32_restore_regs take a context pointer.
Changed exception raise functions to call it explicitly.
2005-12-19 09:59:50 +01:00
Alexandre Julliard 07f84d0458 ntdll: More compatible exception information for protection faults.
Added a bunch of test cases.
2005-12-16 16:27:39 +01:00
Alexandre Julliard f3dad37ba2 TEB.StackLimit should not include the guard page. 2005-12-12 17:28:32 +01:00
Alexandre Julliard cc01e8ff05 Preserve 16-byte stack alignment in the various assembly
functions. Needed for MacOSX.
2005-11-23 19:55:06 +01:00
Ken Thomases a63acd71c8 Updated context definitions for the latest Darwin/x86. 2005-11-15 18:15:56 +00:00
Alexandre Julliard 86f8aef511 Use proper asm name for external functions. 2005-11-15 12:05:45 +00:00
Alexandre Julliard 73c72390f8 Fixed Get/SetThreadContext to work properly on suspended threads.
Added a test case.
2005-11-02 20:54:12 +00:00
Robert Shearman 2a02dd1f05 Make the call exception handler function more compatible with NT and
with what Shrinker expects.
2005-11-01 09:21:03 +00:00
Marcus Meissner 98ed5585c7 Added assembly implementation of EXC_CallHandler. 2005-10-31 14:08:05 +00:00
Alexandre Julliard 7955fb01d7 Clear the single-step flag in setup_exception instead of in the
SIGTRAP handler to avoid having the assigmnent optimized out.
2005-10-04 15:56:34 +00:00
Alexandre Julliard 2eaff5074f Fixed exception handling on MacOS. 2005-09-27 09:36:15 +00:00
Alexandre Julliard fb9cead92b Support arbitrary sizes for the thread signal stack, and set the
default size from the MINSIGSTKSZ constant.
2005-09-14 10:36:58 +00:00
Glenn Wurster cee9a0f2a3 Make stack check work if stack is a small value. 2005-08-25 19:20:21 +00:00
Alexandre Julliard 2e1f8fc8dd Some fixes for the Darwin build. 2005-07-03 11:24:54 +00:00
Mike McCormack 04f9f1b066 Don't include winbase.h or winerror.h when not necessary. 2005-06-21 09:52:40 +00:00
Alexandre Julliard ab29aa2126 Moved the ntdll per-thread data out of the TEB into a private
structure stored in TEB.SystemReserved2.
2005-06-06 20:04:33 +00:00
Alexandre Julliard e4412a618c Removed the special casing of kernel32 and ntdll for the TEB
definition in winternl.h.
2005-05-16 17:52:10 +00:00
Alexandre Julliard d876893fc1 Store the 16-bit stack pointer in the WOW32Reserved TEB field. 2005-05-14 12:16:46 +00:00
Alexandre Julliard 26050b49d5 Prefix the internal name of all register functions with __regs_ for
better consistency and to make automated checking possible.
2005-05-07 18:10:30 +00:00
Mike McCormack f92fff66a2 Implemented NtSignalAndWaitForSingleObject. 2005-04-24 17:35:52 +00:00
Dmitry Timoshkov 0497af09a7 Match RaiseException and EXCEPTION_RECORD to SDK definitions. 2005-02-24 13:15:36 +00:00
Peter Chapman 505dfdefb5 Fix up several inline assembler blocks so that they produce correct
code with the -fomit-frame-pointer gcc flag.
2004-12-02 18:19:25 +00:00
Pierre d'Herbemont ed7a2bab5f Added signal support for Darwin/i386. 2004-08-24 02:26:59 +00:00
Markus Amsler b5b8810e99 Pass debug exceptions to winedos. 2004-08-04 19:08:19 +00:00
Dmitry Timoshkov c2de5fbcb9 Set SA_RESTART sigaction flag for other BSDs beside NetBSD. 2004-02-24 01:21:56 +00:00
Robert Lunnon 93be53744e Save UESP instead of ESP where UESP defined. 2004-01-16 02:00:24 +00:00
Alexandre Julliard 8b39cea352 Fixed __siginfo type for Solaris (based on a patch by Robert Lunnon). 2004-01-14 05:25:07 +00:00
Dimitrie O. Paun 2eaefbd1a4 Move content of global.h into the appropriate private headers. 2003-12-08 21:58:55 +00:00
Alexandre Julliard 8fb98a41e0 Added wine_ldt_is_system() to replace the IS_SELECTOR_SYSTEM macro,
and stop exporting the WINE_LDT_FIRST_ENTRY constant.
2003-11-17 20:12:56 +00:00
Jukka Heinonen d7ee5f3f31 Fix race in real mode event handling.
Merge real mode pending event checking routines.
Remove some obsolete code.
2003-11-11 00:44:10 +00:00
Alexandre Julliard 4dba172e55 Added server_abort_thread to replace SYSDEPS_AbortThread.
Removed no longer used SIGNAL_Block and SIGNAL_Reset.
Moved some internal ntdll definitions to ntdll_misc.h.
2003-11-06 00:08:05 +00:00
Alexandre Julliard 063cff8686 Use the signal stack pointer to determine the current thread.
Converted the SIGUSR2 handler to use setup_exception (probably still
not working properly).
2003-11-05 00:52:29 +00:00
Alexandre Julliard 7924f421e9 Allocate the TEB and signal stack separately from the main stack.
Dynamically allocate the initial TEB too so that it is properly
page-aligned.
2003-11-04 04:50:18 +00:00
Alexandre Julliard 0f95d5498d Fixed race in %gs selector restoring during vm86 mode return.
Minor cleanups.
2003-10-30 23:15:56 +00:00
Alexandre Julliard 07931f2d70 Removed no longer needed SIGNAL_Unblock() function. 2003-10-28 21:46:46 +00:00
Alexandre Julliard 4cb001967a Switch back to the main process stack before calling exception
handlers.
2003-10-28 00:30:55 +00:00
Alexandre Julliard 8824c38e9e Simplified signal stack allocation a bit, and avoid allocating it on
non-i386 platforms.
2003-10-22 03:26:53 +00:00
Jukka Heinonen 46f29944c3 Remove races from DPMI async event handling. 2003-10-14 05:20:34 +00:00
Alexandre Julliard 67d9f38059 Added __wine_set_signal_fs function to avoid sharing the
SYSLEVEL_Win16CurrentTeb variable between kernel and ntdll.
On the kernel side, replaced SYSLEVEL_Win16CurrentTeb by
CallTo16_TebSelector stored directly in the asm relay code to avoid a
run-time relocation.
2003-10-08 22:59:22 +00:00
Alexandre Julliard bff860c4b1 Moved synchronization and syslevel routines to dlls/kernel. 2003-09-18 04:39:13 +00:00
Alexandre Julliard 1479aebda3 Moved instruction emulation to dlls/kernel. 2003-09-17 04:34:31 +00:00
Alexandre Julliard e37c6e18d0 Fixed header dependencies to be fully compatible with the Windows
headers (with help from Dimitrie O. Paun).
2003-09-05 23:08:26 +00:00
Alexandre Julliard bf97962a51 Avoid including stackframe.h if it's not needed. 2003-08-27 02:52:17 +00:00
Jukka Heinonen 2a3ce4c425 Start processing asynchronous DOS events in DPMI mode. 2003-07-01 03:37:41 +00:00
Alexandre Julliard 217fdab78f Implemented NtDelayExecution and make Sleep call it.
The handle count must not be 0 in NtWaitForMultipleObjects (spotted by
Troy Rollo).
2003-06-30 21:00:15 +00:00
Jukka Heinonen ae906923a1 Remove SIGALRM handler.
Reserve TEB field for DPMI virtual interrupt flag.
2003-06-16 01:18:26 +00:00
Eric Pouech 8638b26483 Correctly convert into EXCEPTION_RECORD SIGTRAPs received from
DebugBreakProcess.
2003-06-07 00:33:13 +00:00
Yorick Hardy 6dd0685f74 Use SA_RESTART on NetBSD. 2003-06-04 20:15:10 +00:00
Alexandre Julliard 0b34697abb Made INSTR_EmulateInstruction return the exception code.
Don't allow intXX instructions from 32-bit code (based on a patch by
Jukka Heinonen).
2003-05-14 19:41:16 +00:00
Alexandre Julliard ebe67a2864 Added support for retrieving page fault address on Solaris (based on a
patch by Robert Lunnon).
2003-05-06 18:50:08 +00:00
Alexandre Julliard 088bcf9ca5 Implemented NtQueueApcThread, and changed the server APC interface to
always take 3 parameters.
Implemented a number of other ntdll thread functions, and use them
from the kernel ones.
2003-04-04 22:26:34 +00:00
Eric Pouech 14d04b608c No longer call WaitFor*Object* from ntdll (but NtWait*Object*). 2003-04-03 23:57:11 +00:00
Yorick Hardy 14251f1b48 Added fields from NetBSD struct sigcontext on i386. 2003-03-28 00:29:45 +00:00
Alexandre Julliard 78675ba234 Store %gs in the TEB on every call to 16-bit code, and don't restore
it from the TEB for signals that did not happen in 16-bit code.
2003-03-25 00:36:16 +00:00
Alexandre Julliard a993df861c Make sure changes to the debug registers while inside a SIGTRAP
exception are taken into account (based on a patch by Alex Pasadyn).
2003-03-24 19:31:10 +00:00
Alexandre Julliard 6a26e3f7ac Split signal blocking code out of SIGNAL_Reset into SIGNAL_Block.
Added SIGTERM handler.
2003-03-21 23:45:26 +00:00
Alexandre Julliard d04ccb8ebe Use SIGUSR1 instead of SIGSTOP to suspend threads. 2003-03-04 22:18:43 +00:00
Alexandre Julliard 551797bc57 Properly save/restore %gs register across 16-bit calls. 2003-02-27 21:11:13 +00:00
Alexandre Julliard b4a4c05aed Removed a few more #ifdef __WINE__. 2003-01-04 00:19:17 +00:00
Jukka Heinonen bbb7dc0fad When asynchronous signals are blocked, block also SIGUSR2.
Fix race that made signal handler forget to restore FS register.
2002-12-13 23:28:01 +00:00
Alexandre Julliard 435e2e63f4 winnt.h should not be self-contained, it must depend on windef.h so
that STRICT works correctly; moved some definitions back to windef.h
where they belong, and removed a couple of definitions that don't
exist on Windows.
2002-12-10 22:56:43 +00:00
Marcus Meissner 727c31d7a0 Only enable VM86 mode if we have the <sys/vm86.h> include file. 2002-11-08 18:53:32 +00:00
Lionel Ulmer bdb44555a3 Raise an exception if any Wine or Winelib code does an assert. 2002-10-28 23:56:58 +00:00
Patrik Stridvall 9c1de6de30 Moved all the content of the DDK files ntdef.h and ntddk.h to
winternl.h.
2002-09-12 22:07:02 +00:00
Patrik Stridvall a62a26ced0 Fixed some issues found by winapi_check. 2002-09-09 19:26:55 +00:00
Patrik Stridvall d016f819f1 Added include protection for unistd.h and sys/time.h. 2002-08-17 00:43:16 +00:00
Patrik Stridvall 4325554aef Fixed some issues found by winapi_check. 2002-08-09 01:07:29 +00:00
Rafael Kitover ac81d02a58 Portability fixes for Cygwin. 2002-07-31 20:04:20 +00:00
Eric Pouech 3d4d7e0153 Added a generic mechanism to set up hooks for dispatching signal
handlers outside ntdll.
2002-07-31 18:46:09 +00:00
Alexandre Julliard 65c6d38581 Replace all uses of PREFIX and @function by the __ASM_NAME and
__ASM_FUNC macros.
2002-07-22 20:47:11 +00:00
François Gouget 103295c769 Reset signals to SIG_DFL before starting a child process. 2002-06-13 21:57:38 +00:00
Eric Pouech 0d588a4a82 Fixed DebugBreakProcess (now generates EXCEPTION_BREAKPOINT instead of
EXCEPTION_SINGLE_STEP).
2002-06-02 21:36:39 +00:00
Eric Pouech 93bfa0d6b1 Implementation for console control events (includes process groups
support).
2002-06-02 21:22:22 +00:00
Vincent Béron 9a62491660 Removed trailing whitespace. 2002-05-31 23:06:46 +00:00
Alexandre Julliard 59008670be Moved the selector access functions out of winnt.h into libwine. 2002-05-16 20:32:16 +00:00
Alexandre Julliard 894b188fcf Moved __ASM_GLOBAL_FUNC macros and interlocked functions to port.[ch] 2002-04-25 21:40:56 +00:00
Alexandre Julliard 0799c1a780 Added LGPL standard comment, and copyright notices where necessary.
Global replacement of debugtools.h by wine/debug.h.
2002-03-09 23:29:33 +00:00
Alexandre Julliard 50c6b74a34 Added SIGNAL_Reset function. 2002-01-07 18:02:35 +00:00
Ove Kaaven 4eb0bebd90 Fixed vm86_enter race conditions. 2002-01-04 21:57:04 +00:00
Ove Kaaven bf1e9682f4 Protect against an interrupt-pending signal recursion. 2001-10-28 21:16:22 +00:00
Patrik Stridvall 4b1574577d - Made sure that the files that contains the declarations
of the implementated functions are included.
- Corrected mismatching prototypes.
- Cleaned up the include section.
2001-07-23 23:50:18 +00:00
Patrik Stridvall a274dd9105 Fixed some issues found by winapi_check. 2001-07-02 01:22:10 +00:00
Alexandre Julliard 7f862cb2d2 Don't compile vm86-specific code on platforms that don't support it. 2001-06-25 21:08:47 +00:00
Ove Kaaven 6e33f63e4a Extended __wine_enter_vm86 to handle pending interrupts. 2001-06-21 00:39:34 +00:00