* ThreadHandler::_ClearContinuationState(): Forgot to set fStepStatement to
NULL after releasing its reference, so it could be released again later. * No longer attach the source code to StackFrame, but rather to FunctionDebugInfo. Besides being the more obvious place it also prevents un-/reloading the source code when stepping. Only disadvantage is that we never unload the source again yet. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31256 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -325,24 +325,24 @@ TeamDebugger::MessageReceived(BMessage* message)
|
||||
|
||||
|
||||
void
|
||||
TeamDebugger::StackFrameSourceCodeRequested(TeamWindow* window,
|
||||
StackFrame* frame)
|
||||
TeamDebugger::FunctionSourceCodeRequested(TeamWindow* window,
|
||||
FunctionDebugInfo* function)
|
||||
{
|
||||
// mark loading
|
||||
AutoLocker< ::Team> locker(fTeam);
|
||||
if (frame->SourceCodeState() != STACK_SOURCE_NOT_LOADED)
|
||||
if (function->SourceCodeState() != FUNCTION_SOURCE_NOT_LOADED)
|
||||
return;
|
||||
frame->SetSourceCode(NULL, STACK_SOURCE_LOADING);
|
||||
function->SetSourceCode(NULL, FUNCTION_SOURCE_LOADING);
|
||||
locker.Unlock();
|
||||
|
||||
// schedule the job
|
||||
if (fWorker->ScheduleJob(
|
||||
new(std::nothrow) LoadSourceCodeJob(fDebuggerInterface,
|
||||
fDebuggerInterface->GetArchitecture(), fTeam, frame),
|
||||
fDebuggerInterface->GetArchitecture(), fTeam, function),
|
||||
this) != B_OK) {
|
||||
// scheduling failed -- mark unavailable
|
||||
locker.Lock();
|
||||
frame->SetSourceCode(NULL, STACK_SOURCE_UNAVAILABLE);
|
||||
function->SetSourceCode(NULL, FUNCTION_SOURCE_UNAVAILABLE);
|
||||
locker.Unlock();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user