blob: a297dd84d57a5969bffb0a8fe6fb8e6e0cc4e3cf [file] [log] [blame]
//===-- ThreadPlanShouldStopHere.cpp ----------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
#include "lldb/Target/Thread.h"
#include "lldb/Target/ThreadPlanShouldStopHere.h"
using namespace lldb;
using namespace lldb_private;
// C Includes
// C++ Includes
// Other libraries and framework includes
// Project includes
//----------------------------------------------------------------------
// ThreadPlanShouldStopHere constructor
//----------------------------------------------------------------------
ThreadPlanShouldStopHere::ThreadPlanShouldStopHere(ThreadPlan *owner, ThreadPlanShouldStopHereCallback callback, void *baton) :
m_callback (callback),
m_baton (baton),
m_owner (owner),
m_flags (ThreadPlanShouldStopHere::eNone)
{
}
//----------------------------------------------------------------------
// Destructor
//----------------------------------------------------------------------
ThreadPlanShouldStopHere::~ThreadPlanShouldStopHere()
{
}
void
ThreadPlanShouldStopHere::SetShouldStopHereCallback (ThreadPlanShouldStopHereCallback callback, void *baton)
{
m_callback = callback;
m_baton = baton;
}
ThreadPlan *
ThreadPlanShouldStopHere::InvokeShouldStopHereCallback ()
{
if (m_callback)
return m_callback (m_owner, m_flags, m_baton);
else
return NULL;
}