From a6d671fc8e78d055a33f98a16b04181b79f5da67 Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Tue, 23 Sep 2008 22:43:40 +0000 Subject: [PATCH] The variable_stack_depth field in the profiler update message was not set correctly. Could cause "profile" to crash. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27716 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/system/kernel/debug/user_debugger.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/system/kernel/debug/user_debugger.cpp b/src/system/kernel/debug/user_debugger.cpp index 63ccff83ad..bd1bc665dd 100644 --- a/src/system/kernel/debug/user_debugger.cpp +++ b/src/system/kernel/debug/user_debugger.cpp @@ -1024,6 +1024,7 @@ user_debug_thread_exiting(struct thread* thread) int32 sampleCount = threadDebugInfo.profile.sample_count; int32 droppedTicks = threadDebugInfo.profile.dropped_ticks; int32 stackDepth = threadDebugInfo.profile.stack_depth; + bool variableStackDepth = threadDebugInfo.profile.variable_stack_depth; int32 imageEvent = threadDebugInfo.profile.image_event; threadDebugInfo.profile.sample_area = -1; threadDebugInfo.profile.samples = NULL; @@ -1042,6 +1043,7 @@ user_debug_thread_exiting(struct thread* thread) message.sample_count = sampleCount; message.dropped_ticks = droppedTicks; message.stack_depth = stackDepth; + message.variable_stack_depth = variableStackDepth; message.image_event = imageEvent; message.stopped = true; debugger_write(debuggerPort, B_DEBUGGER_MESSAGE_PROFILER_UPDATE, @@ -1253,6 +1255,7 @@ profiling_buffer_full(void*) int32 sampleCount = debugInfo.profile.sample_count; int32 droppedTicks = debugInfo.profile.dropped_ticks; int32 stackDepth = debugInfo.profile.stack_depth; + bool variableStackDepth = debugInfo.profile.variable_stack_depth; int32 imageEvent = debugInfo.profile.image_event; // notify the debugger @@ -1267,6 +1270,7 @@ profiling_buffer_full(void*) message.sample_count = sampleCount; message.dropped_ticks = droppedTicks; message.stack_depth = stackDepth; + message.variable_stack_depth = variableStackDepth; message.image_event = imageEvent; message.stopped = false; @@ -2337,6 +2341,7 @@ debug_nub_thread(void *) addr_t* samples = NULL; int32 sampleCount = 0; int32 stackDepth = 0; + bool variableStackDepth = false; int32 imageEvent = 0; int32 droppedTicks = 0; @@ -2354,6 +2359,8 @@ debug_nub_thread(void *) sampleCount = threadDebugInfo.profile.sample_count; droppedTicks = threadDebugInfo.profile.dropped_ticks; stackDepth = threadDebugInfo.profile.stack_depth; + variableStackDepth + = threadDebugInfo.profile.variable_stack_depth; imageEvent = threadDebugInfo.profile.image_event; threadDebugInfo.profile.sample_area = -1; threadDebugInfo.profile.samples = NULL; @@ -2372,6 +2379,8 @@ debug_nub_thread(void *) reply.profiler_update.origin.thread = threadID; reply.profiler_update.image_event = imageEvent; reply.profiler_update.stack_depth = stackDepth; + reply.profiler_update.variable_stack_depth + = variableStackDepth; reply.profiler_update.sample_count = sampleCount; reply.profiler_update.dropped_ticks = droppedTicks; reply.profiler_update.stopped = true;