Author: bonefish Date: 2011-05-14 01:08:22 +0200 (Sat, 14 May 2011) New Revision: 41487 Changeset: https://dev.haiku-os.org/changeset/41487 Modified: haiku/branches/developer/bonefish/signals/src/system/kernel/arch/x86/arch_user_debugger.cpp Log: Mostly aesthetical changes. Moved the thread->flags change in x86_exit_user_debug_at_kernel_entry() into the section protected by the team debug info lock, which is more correct but shouldn't make any practical difference. Modified: haiku/branches/developer/bonefish/signals/src/system/kernel/arch/x86/arch_user_debugger.cpp =================================================================== --- haiku/branches/developer/bonefish/signals/src/system/kernel/arch/x86/arch_user_debugger.cpp 2011-05-13 23:05:09 UTC (rev 41486) +++ haiku/branches/developer/bonefish/signals/src/system/kernel/arch/x86/arch_user_debugger.cpp 2011-05-13 23:08:22 UTC (rev 41487) @@ -781,11 +781,11 @@ // disable kernel breakpoints disable_breakpoints(); + // install the user breakpoints GRAB_TEAM_DEBUG_INFO_LOCK(thread->team->debug_info); arch_team_debug_info &teamInfo = thread->team->debug_info.arch_info; - // install the user breakpoints install_breakpoints(teamInfo); atomic_or(&thread->flags, THREAD_FLAGS_BREAKPOINTS_INSTALLED); @@ -818,11 +818,14 @@ // install kernel breakpoints Team* kernelTeam = team_get_kernel_team(); + GRAB_TEAM_DEBUG_INFO_LOCK(kernelTeam->debug_info); + install_breakpoints(kernelTeam->debug_info.arch_info); - RELEASE_TEAM_DEBUG_INFO_LOCK(kernelTeam->debug_info); atomic_and(&thread->flags, ~THREAD_FLAGS_BREAKPOINTS_INSTALLED); + + RELEASE_TEAM_DEBUG_INFO_LOCK(kernelTeam->debug_info); }