libdebugger: Fix #12913.
ThreadHandler: - When single stepping, verify that current instruction pointer is actually within a valid image. Otherwise we'll crash attempting to retrieve debug information for it.
This commit is contained in:
@@ -826,6 +826,9 @@ ThreadHandler::_HandleSingleStepStep(CpuState* cpuState)
|
|||||||
if (stackTrace != NULL) {
|
if (stackTrace != NULL) {
|
||||||
StackFrame* frame = stackTrace->FrameAt(0);
|
StackFrame* frame = stackTrace->FrameAt(0);
|
||||||
Image* image = frame->GetImage();
|
Image* image = frame->GetImage();
|
||||||
|
if (image == NULL)
|
||||||
|
return false;
|
||||||
|
|
||||||
ImageDebugInfo* info = NULL;
|
ImageDebugInfo* info = NULL;
|
||||||
if (GetImageDebugInfo(image, info) != B_OK)
|
if (GetImageDebugInfo(image, info) != B_OK)
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user