- More style cleanups.
- Add FindSection() and IsLoaded() calls to ElfFile. - On init, cache the section start/end for the .text and .plt sections in DwarfImageDebugInfo. Use them to make the check for classifying addresses significantly cheaper. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39826 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -590,32 +590,31 @@ ThreadHandler::_HandleSingleStepStep(CpuState* cpuState)
|
||||
if (fStepStatement->ContainsAddress(cpuState->InstructionPointer())) {
|
||||
_SingleStepThread(cpuState->InstructionPointer());
|
||||
return true;
|
||||
} else {
|
||||
StackTrace* stackTrace = fThread->GetStackTrace();
|
||||
Reference<StackTrace> stackTraceReference(stackTrace);
|
||||
}
|
||||
|
||||
if (stackTrace == NULL && cpuState != NULL) {
|
||||
if (fDebuggerInterface->GetArchitecture()->CreateStackTrace(
|
||||
fThread->GetTeam(), this, cpuState, stackTrace) == B_OK) {
|
||||
stackTraceReference.SetTo(stackTrace, true);
|
||||
}
|
||||
StackTrace* stackTrace = fThread->GetStackTrace();
|
||||
Reference<StackTrace> stackTraceReference(stackTrace);
|
||||
|
||||
if (stackTrace == NULL && cpuState != NULL) {
|
||||
if (fDebuggerInterface->GetArchitecture()->CreateStackTrace(
|
||||
fThread->GetTeam(), this, cpuState, stackTrace) == B_OK) {
|
||||
stackTraceReference.SetTo(stackTrace, true);
|
||||
}
|
||||
}
|
||||
|
||||
if (stackTrace != NULL) {
|
||||
StackFrame* frame = stackTrace->FrameAt(0);
|
||||
Image* image = frame->GetImage();
|
||||
ImageDebugInfo* info = NULL;
|
||||
if (GetImageDebugInfo(image, info) != B_OK)
|
||||
return false;
|
||||
if (stackTrace != NULL) {
|
||||
StackFrame* frame = stackTrace->FrameAt(0);
|
||||
Image* image = frame->GetImage();
|
||||
ImageDebugInfo* info = NULL;
|
||||
if (GetImageDebugInfo(image, info) != B_OK)
|
||||
return false;
|
||||
|
||||
Reference<ImageDebugInfo>(info, true);
|
||||
|
||||
if (info->GetAddressSectionType(
|
||||
Reference<ImageDebugInfo>(info, true);
|
||||
if (info->GetAddressSectionType(
|
||||
cpuState->InstructionPointer())
|
||||
== ADDRESS_SECTION_TYPE_PLT) {
|
||||
_SingleStepThread(cpuState->InstructionPointer());
|
||||
return true;
|
||||
}
|
||||
_SingleStepThread(cpuState->InstructionPointer());
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user