2012-10-17 05:41:58 +08:00
|
|
|
//===-- SBExpressionOptions.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/API/SBExpressionOptions.h"
|
|
|
|
#include "lldb/API/SBStream.h"
|
|
|
|
|
|
|
|
#include "lldb/Target/Target.h"
|
|
|
|
|
|
|
|
using namespace lldb;
|
|
|
|
using namespace lldb_private;
|
|
|
|
|
|
|
|
|
2012-10-17 06:58:25 +08:00
|
|
|
SBExpressionOptions::SBExpressionOptions () :
|
|
|
|
m_opaque_ap(new EvaluateExpressionOptions())
|
2012-10-17 05:41:58 +08:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
SBExpressionOptions::SBExpressionOptions (const SBExpressionOptions &rhs)
|
|
|
|
{
|
|
|
|
m_opaque_ap.reset(new EvaluateExpressionOptions());
|
|
|
|
*(m_opaque_ap.get()) = rhs.ref();
|
|
|
|
}
|
|
|
|
|
|
|
|
const SBExpressionOptions &
|
|
|
|
SBExpressionOptions::operator = (const SBExpressionOptions &rhs)
|
|
|
|
{
|
|
|
|
if (this != &rhs)
|
|
|
|
{
|
|
|
|
this->ref() = rhs.ref();
|
|
|
|
}
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
|
|
|
SBExpressionOptions::~SBExpressionOptions()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
bool
|
2012-10-17 06:58:25 +08:00
|
|
|
SBExpressionOptions::GetCoerceResultToId () const
|
2012-10-17 05:41:58 +08:00
|
|
|
{
|
|
|
|
return m_opaque_ap->DoesCoerceToId ();
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2012-10-17 06:58:25 +08:00
|
|
|
SBExpressionOptions::SetCoerceResultToId (bool coerce)
|
2012-10-17 05:41:58 +08:00
|
|
|
{
|
|
|
|
m_opaque_ap->SetCoerceToId (coerce);
|
|
|
|
}
|
|
|
|
|
|
|
|
bool
|
2012-10-17 06:58:25 +08:00
|
|
|
SBExpressionOptions::GetUnwindOnError () const
|
2012-10-17 05:41:58 +08:00
|
|
|
{
|
|
|
|
return m_opaque_ap->DoesUnwindOnError ();
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
SBExpressionOptions::SetUnwindOnError (bool unwind)
|
|
|
|
{
|
|
|
|
m_opaque_ap->SetUnwindOnError (unwind);
|
|
|
|
}
|
|
|
|
|
2013-01-15 10:47:48 +08:00
|
|
|
bool
|
|
|
|
SBExpressionOptions::GetIgnoreBreakpoints () const
|
|
|
|
{
|
|
|
|
return m_opaque_ap->DoesIgnoreBreakpoints ();
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
SBExpressionOptions::SetIgnoreBreakpoints (bool ignore)
|
|
|
|
{
|
|
|
|
m_opaque_ap->SetIgnoreBreakpoints (ignore);
|
|
|
|
}
|
|
|
|
|
2012-10-17 05:41:58 +08:00
|
|
|
lldb::DynamicValueType
|
2012-10-17 06:58:25 +08:00
|
|
|
SBExpressionOptions::GetFetchDynamicValue () const
|
2012-10-17 05:41:58 +08:00
|
|
|
{
|
|
|
|
return m_opaque_ap->GetUseDynamic ();
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2012-10-17 06:58:25 +08:00
|
|
|
SBExpressionOptions::SetFetchDynamicValue (lldb::DynamicValueType dynamic)
|
2012-10-17 05:41:58 +08:00
|
|
|
{
|
|
|
|
m_opaque_ap->SetUseDynamic (dynamic);
|
|
|
|
}
|
|
|
|
|
|
|
|
uint32_t
|
2012-10-17 06:58:25 +08:00
|
|
|
SBExpressionOptions::GetTimeoutInMicroSeconds () const
|
2012-10-17 05:41:58 +08:00
|
|
|
{
|
|
|
|
return m_opaque_ap->GetTimeoutUsec ();
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2012-10-17 06:58:25 +08:00
|
|
|
SBExpressionOptions::SetTimeoutInMicroSeconds (uint32_t timeout)
|
2012-10-17 05:41:58 +08:00
|
|
|
{
|
|
|
|
m_opaque_ap->SetTimeoutUsec (timeout);
|
|
|
|
}
|
|
|
|
|
2014-03-29 05:58:28 +08:00
|
|
|
uint32_t
|
|
|
|
SBExpressionOptions::GetOneThreadTimeoutInMicroSeconds () const
|
|
|
|
{
|
|
|
|
return m_opaque_ap->GetOneThreadTimeoutUsec ();
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
SBExpressionOptions::SetOneThreadTimeoutInMicroSeconds (uint32_t timeout)
|
|
|
|
{
|
|
|
|
m_opaque_ap->SetOneThreadTimeoutUsec (timeout);
|
|
|
|
}
|
|
|
|
|
2012-10-17 05:41:58 +08:00
|
|
|
bool
|
2012-10-17 06:58:25 +08:00
|
|
|
SBExpressionOptions::GetTryAllThreads () const
|
2012-10-17 05:41:58 +08:00
|
|
|
{
|
2013-11-07 08:11:47 +08:00
|
|
|
return m_opaque_ap->GetTryAllThreads ();
|
2012-10-17 05:41:58 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2012-10-17 06:58:25 +08:00
|
|
|
SBExpressionOptions::SetTryAllThreads (bool run_others)
|
2012-10-17 05:41:58 +08:00
|
|
|
{
|
2013-11-07 08:11:47 +08:00
|
|
|
m_opaque_ap->SetTryAllThreads (run_others);
|
|
|
|
}
|
|
|
|
|
2014-02-28 10:52:06 +08:00
|
|
|
bool
|
|
|
|
SBExpressionOptions::GetStopOthers () const
|
|
|
|
{
|
|
|
|
return m_opaque_ap->GetStopOthers ();
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
SBExpressionOptions::SetStopOthers (bool run_others)
|
|
|
|
{
|
|
|
|
m_opaque_ap->SetStopOthers (run_others);
|
|
|
|
}
|
|
|
|
|
2013-11-07 08:11:47 +08:00
|
|
|
bool
|
|
|
|
SBExpressionOptions::GetTrapExceptions () const
|
|
|
|
{
|
|
|
|
return m_opaque_ap->GetTrapExceptions ();
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
SBExpressionOptions::SetTrapExceptions (bool trap_exceptions)
|
|
|
|
{
|
|
|
|
m_opaque_ap->SetTrapExceptions (trap_exceptions);
|
2012-10-17 05:41:58 +08:00
|
|
|
}
|
|
|
|
|
2014-05-05 10:26:40 +08:00
|
|
|
void
|
|
|
|
SBExpressionOptions::SetCancelCallback (lldb::ExpressionCancelCallback callback, void *baton)
|
|
|
|
{
|
|
|
|
m_opaque_ap->SetCancelCallback (callback, baton);
|
|
|
|
}
|
|
|
|
|
2012-10-17 05:41:58 +08:00
|
|
|
EvaluateExpressionOptions *
|
|
|
|
SBExpressionOptions::get() const
|
|
|
|
{
|
|
|
|
return m_opaque_ap.get();
|
|
|
|
}
|
|
|
|
|
|
|
|
EvaluateExpressionOptions &
|
|
|
|
SBExpressionOptions::ref () const
|
|
|
|
{
|
|
|
|
return *(m_opaque_ap.get());
|
|
|
|
}
|