haiku/headers
Ingo Weinhold ea2abd110b * Renamed the ROUNDOWN macro to ROUNDDOWN. Also changed the implementation of
ROUNDUP to use '*' and '/' -- the compiler will optimize that for powers of
  two anyway and this implementation works for other numbers as well.
* The thread::fault_handler use in C[++] code was broken with gcc 4. At least
  when other functions were invoked. Trying to trick the compiler wasn't a
  particularly good idea anyway, since the next compiler version could break
  the trick again. So the general policy is to use the fault handlers only in
  assembly code where we have full control. Changed that for x86 (save for the
  vm86 mode, which has a similar mechanism), but not for the other
  architectures.
* Introduced fault_handler, fault_handler_stack_pointer, and fault_jump_buffer
  fields in the cpu_ent structure, which must be used instead of
  thread::fault_handler in the kernel debugger. Consequently user_memcpy() must
  not be used in the kernel debugger either. Introduced a debug_memcpy()
  instead.
* Introduced debug_call_with_fault_handler() function which calls a function
  in a setjmp() and fault handler context. The architecture specific backend
  arch_debug_call_with_fault_handler() has only been implemented for x86 yet.
* Introduced debug_is_kernel_memory_accessible() for use in the kernel
  debugger. It determines whether a range of memory can be accessed in the
  way specified. The architecture specific back end
  arch_vm_translation_map_is_kernel_page_accessible() has only been implemented
  for x86 yet.
* Added arch_debug_unset_current_thread() (only implemented for x86) to unset
  the current thread pointer in the kernel debugger. When entering the kernel
  debugger we do some basic sanity checks of the currently set thread structure
  and unset it, if they fail. This allows certain commands (most importantly
  the stack trace command) to avoid accessing the thread structure.
* x86: When handling a double fault, we do now install a special handler for
  page faults. This allows us to gracefully catch faulting commands, even if
  e.g. the thread structure is toast.

We are now in much better shape to deal with double faults. Hopefully avoiding
the triple faults that some people have been experiencing on their hardware
and ideally even allowing to use the kernel debugger normally.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32073 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-03 12:39:56 +00:00
..
build Fixing random GCC4 warnings. Mostly missing consts, some parentheses, some braces... Should all be harmless and not change anything. 2009-07-16 02:42:03 +00:00
compatibility/bsd Added a strsep() to our BSD compatibility library. 2009-04-08 10:57:46 +00:00
cpp Since wchar support now works, the wstring typedef should now also be safe. 2009-07-29 14:09:43 +00:00
glibc * merged 32bit-wchar_t branches of buildtools and haiku back into 2009-07-07 10:30:09 +00:00
gnu
legacy/network setsockopt and getsockopt use int as others functions 2006-06-23 14:19:11 +00:00
libs Clean up. Renamed spool_file to spoolFile. 2009-07-11 14:37:11 +00:00
os * Fully switch to the Haiku message format so that it is also used for on-disk 2009-07-31 22:19:36 +00:00
posix Add missing definition for wcsstr. This was preventing clucene from building with wide chars enabled. 2009-07-31 22:16:58 +00:00
private * Renamed the ROUNDOWN macro to ROUNDDOWN. Also changed the implementation of 2009-08-03 12:39:56 +00:00
tools * fix gcc4 build of cppunit library by explicitly spelling out std:: in 2009-05-02 19:04:52 +00:00