threadID parameter to spawn_kernel_thread_etc(). It's now possible to
set the ID of a new thread. Used in team.c to make team ID and the ID of
the main thread equal.
Fascinatingly the two added functions prompt my compiler to issue
`missing prototype' warnings, although those are obviously there. It would
be nice if someone could solve that riddle.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11621 a95241bf-73f2-0310-859d-f6bbb57e9c96
non-POSIX functions that we have disabled from the build. Not sure if
we really want to change that (ie making those functions public).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11579 a95241bf-73f2-0310-859d-f6bbb57e9c96
a previous and unfinished transaction. It should now work correctly.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11553 a95241bf-73f2-0310-859d-f6bbb57e9c96
info.
* Implemented arch_set_cpu_state() (Axel, please check, what registers
the debugger should actually be allowed to modify).
* Fixed arch_get_cpu_state(). We now explicitly copy the registers
manually instead of using memcpy(). Added support for extended
registers (FPU,...).
* Completed break- and watchpoint support.
* Implemented handling of debug and breakpoint exceptions.
The x86 specific part of the userland debugging support should be complete
now. That is in theory the entire debugging interface is available on x86
machines now. It's almost completely untested yet, though.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11526 a95241bf-73f2-0310-859d-f6bbb57e9c96
needed to get the topmost user iframe. Added i386_get_user_iframe() for
exactly that purpose.
* Added reinitialization of user debugging for the new thread when
switching the context.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11523 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Made the parameter for restoring the FPU state const.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11522 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Added event callbacks for break- and watchpoints and single stepping.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11520 a95241bf-73f2-0310-859d-f6bbb57e9c96
functions for setting break-/watchpoints (implemented).
Break-/watchpoints don't work yet, though. Missing is still the setting
of the debug control register DR7 somewhere in the interrupt code and
the handling of debug exceptions.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11509 a95241bf-73f2-0310-859d-f6bbb57e9c96
* In team_delete_team() we no longer explicitly destroy the team debug
info. It is not necessary, since the terminating debug nub thread will
do that anyway. Moreover we access the debugger port in a safer manner
now.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11504 a95241bf-73f2-0310-859d-f6bbb57e9c96
by the team lock, but by a lock in the structure. This is necessary
since we can't acquire the team lock while thread switching, for then the
thread lock is already held.
* Added support for single stepping and break-/watchpoints.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11503 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Now a debugged thread and the debug nub thread are not longer blocking
on ports when they receive a SIGKILL[THR] (we couldn't kill a debugged
team before).
* Small fixes. More correct cleanup when the debug nub thread terminates.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11491 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Added is_kill_signal_pending(). Can anyone tell me why the compiler
complains about a missing previous prototype for it? <ksignal.h> is
included, and when only preprocessing the file, the prototype is clearly
there. I'm clueless.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11488 a95241bf-73f2-0310-859d-f6bbb57e9c96
- If the thread's B_THREAD_DEBUG_STOP flag is set, it is now always
stopped before handling the signals. Unless a SIGKILL[THR] signal is
pending.
- Also notify the debugger, when a signal is ignored.
* The signal's sigaction structure is additionally passed to the debugger
now.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11478 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Now we deal correctly with thread debug flags (child threads inherit
the parent ones, save for syscall tracing in which case it needs to
be specified explicitly).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11477 a95241bf-73f2-0310-859d-f6bbb57e9c96
In the first case this is probably too early, since the image is not
really loaded at that time by the loader. We should probably introduce
a syscall the loader can invoke for that purpose.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11475 a95241bf-73f2-0310-859d-f6bbb57e9c96
convenience.
* Added/implemented callbacks for almost all missing debug events (team,
thread, image creation/deletion, exceptions/faults, signals).
* The debugger can now specify how to deal with the event that stopped an
event (ignore or handle signals, exceptions/faults).
* Implemented B_DEBUGGED_THREAD_GET_WHY_STOPPED debugger message.
* The cpu_state is now passed to the debugger with
B_DEBUGGER_MESSAGE_THREAD_STOPPED notifications.
* Completed _user_debugger() implementation.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11474 a95241bf-73f2-0310-859d-f6bbb57e9c96
POSIX demands: if you pass in a NULL pointer, a buffer will now be
allocated for you.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11388 a95241bf-73f2-0310-859d-f6bbb57e9c96