* 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:
Ingo Weinhold
2009-06-26 15:11:56 +00:00
parent 66ae5b2d99
commit 6fb6551c97
14 changed files with 228 additions and 161 deletions
+6 -6
View File
@@ -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();
}
}