Added team_debug_info::debugger_changed_condition to serialize changes to the

installed team debugger and adjusted the code accordingly. It's not needed yet,
but I intend to add support for software breakpoints and those require a bit of
uninitialization that needs to be synchronized with debugger changes and can't
be done with interrupts disabled.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31194 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold
2009-06-23 01:39:51 +00:00
parent 91393e7810
commit ba391bcc56
3 changed files with 234 additions and 146 deletions
+9
View File
@@ -20,6 +20,7 @@
#define B_DEBUG_PROFILE_BUFFER_FLUSH_THRESHOLD 70 /* in % */
struct ConditionVariable;
struct function_profile_info;
struct thread;
@@ -61,6 +62,14 @@ struct team_debug_info {
vint32 image_event;
// counter incremented whenever an image is created/deleted
struct ConditionVariable* debugger_changed_condition;
// Set whenever someone is going (or planning) to change the debugger.
// If one wants to do the same, one has to wait for this condition.
// Both threads lock (outer) and team debug info lock (inner) have to
// be held when accessing this field. After setting to a condition
// variable the thread won't be deleted (until unsetting it) -- it might
// be removed from the team hash table, though.
struct arch_team_debug_info arch_info;
};