* Added support for debugger handover.
* Implemented _user_wait_for_debugger(). * Reworked a few bits to ensure that after a remove_team_debugger() or after requesting a debugger handover the debugger doesn't get any more messages. * When the debugger is removed or dies, the debugged threads should now cleanup their debug info and continue, instead of waiting at their debug port forever. All the new features are not tested. Will happen, when gdb will be debugged. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11664 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -40,6 +40,9 @@ struct team_debug_info {
|
||||
thread_id nub_thread;
|
||||
port_id nub_port;
|
||||
// the port the nub thread is waiting on for commands from the debugger
|
||||
sem_id debugger_write_lock;
|
||||
// synchronizes writes to the debugger port with the setting (but not
|
||||
// clearing) of the B_TEAM_DEBUG_DEBUGGER_HANDOVER flag
|
||||
|
||||
struct arch_team_debug_info arch_info;
|
||||
};
|
||||
@@ -61,6 +64,7 @@ struct thread_debug_info {
|
||||
// team debugging flags (user-specifiable flags are in <debugger.h>)
|
||||
enum {
|
||||
B_TEAM_DEBUG_DEBUGGER_INSTALLED = 0x0001,
|
||||
B_TEAM_DEBUG_DEBUGGER_HANDOVER = 0x0002,
|
||||
|
||||
B_TEAM_DEBUG_KERNEL_FLAG_MASK = 0xffff,
|
||||
|
||||
@@ -87,6 +91,7 @@ typedef enum {
|
||||
B_DEBUGGED_THREAD_MESSAGE_CONTINUE = 0,
|
||||
B_DEBUGGED_THREAD_GET_WHY_STOPPED,
|
||||
B_DEBUGGED_THREAD_SET_CPU_STATE,
|
||||
B_DEBUGGED_THREAD_DEBUGGER_CHANGED,
|
||||
} debugged_thread_message;
|
||||
|
||||
typedef struct {
|
||||
@@ -109,6 +114,12 @@ typedef union {
|
||||
} debugged_thread_message_data;
|
||||
|
||||
|
||||
// internal messages sent to the nub thread
|
||||
typedef enum {
|
||||
B_DEBUG_MESSAGE_HANDED_OVER = -1,
|
||||
} debug_nub_kernel_message;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user