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:
Rene Gollent 2016-08-13 21:17:41 -04:00
parent b7012e6c46
commit 8471ec3d56

View File

@ -826,6 +826,9 @@ ThreadHandler::_HandleSingleStepStep(CpuState* cpuState)
if (stackTrace != NULL) {
StackFrame* frame = stackTrace->FrameAt(0);
Image* image = frame->GetImage();
if (image == NULL)
return false;
ImageDebugInfo* info = NULL;
if (GetImageDebugInfo(image, info) != B_OK)
return false;