LLDB  mainline
Public Types | Public Member Functions | Protected Attributes | List of all members
lldb_private::Status Class Reference

#include "lldb/Utility/Status.h"

Collaboration diagram for lldb_private::Status:
Collaboration graph
[legend]

Public Types

typedef uint32_t ValueType
 Every error value that this object can contain needs to be able to fit into ValueType. More...
 

Public Member Functions

 Status ()
 
 Status (ValueType err, lldb::ErrorType type=lldb::eErrorTypeGeneric)
 Initialize the error object with a generic success value. More...
 
 Status (std::error_code EC)
 
 Status (const char *format,...) __attribute__((format(printf
 
 ~Status ()
 
 Status (llvm::Error error)
 
const Statusoperator= (llvm::Error error)
 
llvm::Error ToError () const
 
const char * AsCString (const char *default_error_str="unknown error") const
 Get the error string associated with the current error. More...
 
void Clear ()
 Clear the object state. More...
 
bool Fail () const
 Test for error condition. More...
 
ValueType GetError () const
 Access the error value. More...
 
lldb::ErrorType GetType () const
 Access the error type. More...
 
void SetMachError (uint32_t err)
 Set accessor from a kern_return_t. More...
 
void SetExpressionError (lldb::ExpressionResults, const char *mssg)
 
int SetExpressionErrorWithFormat (lldb::ExpressionResults, const char *format,...) __attribute__((format(printf
 
int void SetError (ValueType err, lldb::ErrorType type)
 Set accessor with an error value and type. More...
 
void SetErrorToErrno ()
 Set the current error to errno. More...
 
void SetErrorToGenericError ()
 Set the current error to a generic error. More...
 
void SetErrorString (llvm::StringRef err_str)
 Set the current error string to err_str. More...
 
int SetErrorStringWithFormat (const char *format,...) __attribute__((format(printf
 Set the current error string to a formatted error string. More...
 
int int SetErrorStringWithVarArg (const char *format, va_list args)
 
template<typename... Args>
void SetErrorStringWithFormatv (const char *format, Args &&... args)
 
bool Success () const
 Test for success condition. More...
 
bool WasInterrupted () const
 Test for a failure due to a generic interrupt. More...
 

Protected Attributes

ValueType m_code = 0
 Member variables. More...
 
lldb::ErrorType m_type
 The type of the above error code. More...
 
std::string m_string
 A string representation of the error code. More...
 

Detailed Description

An error handling class.

This class is designed to be able to hold any error code that can be encountered on a given platform. The errors are stored as a value of type Status::ValueType. This value should be large enough to hold any and all errors that the class supports. Each error has an associated type that is of type lldb::ErrorType. New types can be added to support new error types, and architecture specific types can be enabled. In the future we may wish to switch to a registration mechanism where new error types can be registered at runtime instead of a hard coded scheme.

All errors in this class also know how to generate a string representation of themselves for printing results and error codes. The string value will be fetched on demand and its string value will be cached until the error is cleared of the value of the error changes.

Definition at line 44 of file Status.h.

Member Typedef Documentation

◆ ValueType

Every error value that this object can contain needs to be able to fit into ValueType.

Definition at line 48 of file Status.h.

Constructor & Destructor Documentation

◆ Status() [1/5]

Status::Status ( )

Definition at line 40 of file Status.cpp.

◆ Status() [2/5]

Status::Status ( ValueType  err,
lldb::ErrorType  type = lldb::eErrorTypeGeneric 
)
explicit

Initialize the error object with a generic success value.

Parameters
[in]errAn error code.
[in]typeThe type for err.

Definition at line 42 of file Status.cpp.

◆ Status() [3/5]

Status::Status ( std::error_code  EC)

Definition at line 48 of file Status.cpp.

◆ Status() [4/5]

Status::Status ( const char *  format,
  ... 
)
explicit

Definition at line 54 of file Status.cpp.

References SetErrorStringWithVarArg(), and SetErrorToGenericError().

◆ ~Status()

Status::~Status ( )
default

◆ Status() [5/5]

lldb_private::Status::Status ( llvm::Error  error)
inlineexplicit

Definition at line 70 of file Status.h.

References error().

Member Function Documentation

◆ AsCString()

const char * Status::AsCString ( const char *  default_error_str = "unknown error") const

Get the error string associated with the current error.

Gets the error value as a NULL terminated C string. The error string will be fetched and cached on demand. The error string will be retrieved from a callback that is appropriate for the type of the error and will be cached until the error value is changed or cleared.

Returns
The error as a NULL terminated C string value if the error is valid and is able to be converted to a string value, NULL otherwise.

Definition at line 131 of file Status.cpp.

References lldb::eErrorTypeMachKernel, lldb::eErrorTypePOSIX, lldb::eErrorTypeWin32, m_code, m_string, m_type, and Success().

Referenced by lldb_private::ClangUserExpression::AddArguments(), lldb_private::process_linux::NativeProcessLinux::AddThread(), lldb_private::process_gdb_remote::ProcessGDBRemote::AsyncThread(), lldb_private::Process::CanJIT(), lldb_private::RenderScriptRuntime::CaptureScriptInit(), lldb_private::process_gdb_remote::GDBRemoteCommunication::ConnectLocally(), lldb_private::BreakpointOptions::CreateFromStructuredData(), lldb_private::Breakpoint::CreateFromStructuredData(), lldb_private::RenderScriptRuntime::CreateKernelBreakpoint(), lldb_private::RenderScriptRuntime::CreateReductionBreakpoint(), lldb_private::RenderScriptRuntime::CreateScriptGroupBreakpoint(), EntityPersistentVariable::Dematerialize(), EntityVariable::Dematerialize(), EntityRegister::Dematerialize(), EntityPersistentVariable::DestroyAllocation(), lldb_private::IRExecutionUnit::DisassembleFunction(), lldb_private::ConnectionFileDescriptor::Disconnect(), lldb_private::LLVMUserExpression::DoExecute(), CommandObjectTargetCreate::DoExecute(), CommandObjectBreakpointSet::DoExecute(), CommandObjectPlatformProcessAttach::DoExecute(), PlatformPOSIX::DoLoadImage(), lldb_private::ValueObject::DumpPrintableRepresentation(), lldb_private::RenderScriptRuntime::EvalRSExpression(), lldb_private::LLVMUserExpression::FinalizeJITExecution(), lldb_private::RenderScriptRuntime::GetAllocationData(), lldb_private::ThreadPlanStepInstruction::GetDescription(), lldb_private::ThreadPlanStepOverRange::GetDescription(), lldb_private::ThreadPlanStepInRange::GetDescription(), lldb_private::StringSummaryFormat::GetDescription(), lldb::SBValue::GetError(), lldb_private::MemoryHistoryASan::GetHistoryThreads(), lldb_private::Module::GetMemoryObjectFile(), lldb_private::IRExecutionUnit::GetRunnableInfo(), lldb::SBValue::GetValueAsSigned(), lldb::SBValue::GetValueAsUnsigned(), lldb_private::ClangExpressionDeclMap::GetVariableValue(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerCommon::Handle_qLaunchSuccess(), HandleFileAction(), lldb_private::ClangUtilityFunction::Install(), lldb_private::RenderScriptRuntime::LoadAllocation(), lldb_private::RenderScriptRuntime::LoadModule(), EntityPersistentVariable::MakeAllocation(), PlatformPOSIX::MakeLoadImageUtilityFunction(), EntityPersistentVariable::Materialize(), EntityVariable::Materialize(), EntityResultVariable::Materialize(), EntitySymbol::Materialize(), EntityRegister::Materialize(), lldb_private::ConnectionFileDescriptor::OpenCommandPipe(), lldb_private::ClangUserExpression::Parse(), lldb_private::StopInfoBreakpoint::PerformAction(), lldb_private::ClangExpressionParser::PrepareForExecution(), lldb_private::ClangUserExpression::PrepareForParsing(), lldb_private::LLVMUserExpression::PrepareToExecuteJITExpression(), lldb::SBThreadPlan::QueueThreadPlanForRunToAddress(), lldb::SBThreadPlan::QueueThreadPlanForStepInRange(), lldb::SBThreadPlan::QueueThreadPlanForStepOut(), lldb::SBThreadPlan::QueueThreadPlanForStepOverRange(), lldb::SBThreadPlan::QueueThreadPlanForStepScripted(), lldb_private::RegisterContextUnwind::ReadFrameAddress(), RecurseCopy_Callback(), lldb_private::process_linux::NativeThreadLinux::RequestStop(), lldb_private::InstrumentationRuntimeASan::RetrieveReportData(), lldb_private::InstrumentationRuntimeTSan::RetrieveReportData(), lldb_private::InstrumentationRuntimeUBSan::RetrieveReportData(), lldb_private::Process::RunThreadPlan(), lldb::SBThread::RunToAddress(), lldb_private::RenderScriptRuntime::SaveAllocation(), lldb::SBValue::SetData(), lldb_private::ValueObject::SetData(), CommandObjectBreakpointSet::CommandOptions::SetOptionValue(), CommandObjectSourceList::CommandOptions::SetOptionValue(), CommandObjectBreakpointRead::CommandOptions::SetOptionValue(), ABISysV_arm::SetReturnValueObject(), ABIMacOSX_arm::SetReturnValueObject(), ABISysV_x86_64::SetReturnValueObject(), ABIWindows_x86_64::SetReturnValueObject(), ABIMacOSX_i386::SetReturnValueObject(), ABISysV_mips64::SetReturnValueObject(), ABISysV_mips::SetReturnValueObject(), ABISysV_ppc::SetReturnValueObject(), ABISysV_ppc64::SetReturnValueObject(), ABISysV_arm64::SetReturnValueObject(), ABISysV_s390x::SetReturnValueObject(), ABISysV_i386::SetReturnValueObject(), ABISysV_arc::SetReturnValueObject(), ABIMacOSX_arm64::SetReturnValueObject(), lldb::SBValue::SetValueFromCString(), lldb::SBThread::StepInstruction(), lldb::SBThread::StepInto(), lldb::SBThread::StepOut(), lldb::SBThread::StepOutOfFrame(), lldb::SBThread::StepOverUntil(), lldb::SBThread::StepUsingScriptedThreadPlan(), CommandObjectProcessLaunchOrAttach::StopProcessIfNecessary(), ToError(), lldb_private::ClangUserExpression::TryParse(), lldb_private::ValueObjectChild::UpdateValue(), lldb::SBValue::Watch(), and lldb_private::FunctionCaller::WriteFunctionWrapper().

◆ Clear()

void Status::Clear ( )

Clear the object state.

Reverts the state of this object to contain a generic success value and frees any cached error string value.

Definition at line 168 of file Status.cpp.

References lldb::eErrorTypeInvalid, m_code, m_string, and m_type.

Referenced by CoreSimulatorSupport::Device::Boot(), EntityResultVariable::Dematerialize(), lldb_private::IRExecutionUnit::DisassembleFunction(), lldb_private::StackFrame::GetFrameBaseValue(), lldb_private::UserExpression::GetObjectPointer(), lldb_private::Value::GetValueByteSize(), IRInterpreter::Interpret(), operator=(), lldb_private::ConnectionGenericFile::Read(), lldb_private::NativeProcessProtocol::ReadCStringFromMemory(), lldb_private::Target::ReadCStringFromMemory(), lldb_private::Process::ReadCStringFromMemory(), ReadRegisterValueAsScalar(), lldb_private::process_freebsd::NativeThreadFreeBSD::Resume(), lldb_private::NativeFile::SeekFromCurrent(), lldb_private::NativeFile::SeekFromEnd(), lldb_private::NativeFile::SeekFromStart(), CommandObjectRenderScriptRuntimeAllocationDump::CommandOptions::SetOptionValue(), lldb_private::StringSummaryFormat::SetSummaryString(), CoreSimulatorSupport::Device::Shutdown(), lldb_private::Communication::StartReadThread(), lldb_private::OptionArgParser::ToAddress(), lldb_private::StackFrame::UpdatePreviousFrameFromCurrentFrame(), lldb_private::ValueObjectCast::UpdateValue(), lldb_private::ValueObjectChild::UpdateValue(), lldb_private::ValueObjectMemory::UpdateValue(), lldb_private::ValueObjectRegisterSet::UpdateValue(), lldb_private::ValueObjectVariable::UpdateValue(), lldb_private::ValueObjectDynamicValue::UpdateValue(), lldb_private::ValueObjectRegister::UpdateValue(), lldb_private::ValueObjectSynthetic::UpdateValue(), lldb_private::ValueObject::UpdateValueIfNeeded(), lldb_private::ConnectionGenericFile::Write(), and lldb_private::IRMemoryMap::~IRMemoryMap().

◆ Fail()

bool Status::Fail ( ) const

Test for error condition.

Returns
true if this object contains an error, false otherwise.

Definition at line 182 of file Status.cpp.

References m_code.

Referenced by lldb_private::process_linux::NativeProcessLinux::AddThread(), lldb_private::process_gdb_remote::ProcessGDBRemote::AsyncThread(), lldb_private::process_netbsd::NativeProcessNetBSD::Attach(), lldb_private::process_freebsd::NativeProcessFreeBSD::Attach(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::AttachToProcess(), lldb_private::RenderScriptRuntime::CaptureScriptInit(), CheckIfWatchpointsSupported(), lldb_private::process_gdb_remote::ProcessGDBRemote::ConnectToReplayServer(), lldb_private::BreakpointOptions::CreateFromStructuredData(), lldb_private::Breakpoint::CreateFromStructuredData(), lldb_private::RenderScriptRuntime::CreateKernelBreakpoint(), lldb_private::RenderScriptRuntime::CreateReductionBreakpoint(), lldb_private::RenderScriptRuntime::CreateScriptGroupBreakpoint(), lldb_private::process_linux::NativeProcessLinux::Detach(), lldb_private::Target::DisableAllWatchpoints(), lldb_private::ConnectionFileDescriptor::Disconnect(), CommandObjectMemoryTagWrite::DoExecute(), CommandObjectTargetCreate::DoExecute(), CommandObjectBreakpointSet::DoExecute(), CommandObjectThreadJump::DoExecute(), CommandObjectPlatformProcessAttach::DoExecute(), PlatformPOSIX::DoLoadImage(), lldb_private::ProcessWindows::DoResume(), lldb_private::ValueObject::DumpPrintableRepresentation(), lldb_private::Target::EnableAllWatchpoints(), lldb_private::CPPLanguageRuntime::FindLibCppStdFunctionCallableInfo(), lldb_private::IRMemoryMap::FindSpace(), lldb_private::RenderScriptRuntime::FindStructTypeName(), lldb_private::RenderScriptRuntime::GetAllocationData(), lldb_private::formatters::LibcxxVectorBoolSyntheticFrontEnd::GetChildAtIndex(), lldb_private::StringSummaryFormat::GetDescription(), PlatformRemoteMacOSX::GetFileWithUUID(), PlatformDarwin::GetSharedModuleWithLocalCache(), lldb_private::Variable::GetValuesForVariableExpressionPath(), GetVTableAddress(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerCommon::Handle_qPlatform_shell(), lldb_private::RenderScriptRuntime::JITSubelements(), lldb_private::process_netbsd::NativeProcessNetBSD::Factory::Launch(), lldb_private::process_freebsd::NativeProcessFreeBSD::Factory::Launch(), lldb_private::process_linux::NativeProcessLinux::Factory::Launch(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::LaunchProcess(), PlatformAppleSimulator::LaunchProcess(), lldb_private::ProcessDebugger::LaunchProcess(), DynamicLoaderPOSIXDYLD::LoadInterpreterModule(), DynamicLoaderPOSIXDYLD::LoadVDSO(), lldb_private::ClangExpressionDeclMap::LookUpLldbClass(), lldb_private::ClangExpressionDeclMap::LookUpLldbObjCClass(), PlatformPOSIX::MakeLoadImageUtilityFunction(), EntityVariable::Materialize(), lldb_private::process_netbsd::NativeProcessNetBSD::MonitorClone(), lldb_private::process_freebsd::NativeProcessFreeBSD::MonitorClone(), lldb_private::process_freebsd::NativeProcessFreeBSD::MonitorSIGTRAP(), lldb_private::process_linux::NativeProcessLinux::MonitorSIGTRAP(), lldb_private::formatters::ObjCBOOLSummaryProvider(), ProcessElfCore::parseLinuxNotes(), lldb_private::process_linux::NativeProcessLinux::PopulateMemoryRegionCache(), lldb::SBThreadPlan::QueueThreadPlanForRunToAddress(), lldb::SBThreadPlan::QueueThreadPlanForStepInRange(), lldb::SBThreadPlan::QueueThreadPlanForStepOut(), lldb::SBThreadPlan::QueueThreadPlanForStepOverRange(), lldb::SBThreadPlan::QueueThreadPlanForStepScripted(), lldb_private::RegisterContextUnwind::ReadFrameAddress(), RecurseCopy_Callback(), lldb_private::Target::RemoveAllWatchpoints(), lldb_private::NativeProcessProtocol::RemoveWatchpoint(), lldb_private::NativeProcessWindows::Resume(), lldb_private::InstrumentationRuntimeMainThreadChecker::RetrieveReportData(), ObjectFileMachO::SaveCore(), lldb_private::NativeProcessProtocol::SetHardwareBreakpoint(), ABISysV_arm::SetReturnValueObject(), ABISysV_x86_64::SetReturnValueObject(), ABIMacOSX_arm::SetReturnValueObject(), ABIWindows_x86_64::SetReturnValueObject(), ABISysV_mips64::SetReturnValueObject(), ABISysV_mips::SetReturnValueObject(), ABISysV_ppc64::SetReturnValueObject(), ABISysV_s390x::SetReturnValueObject(), ABISysV_ppc::SetReturnValueObject(), ABIMacOSX_i386::SetReturnValueObject(), ABISysV_arm64::SetReturnValueObject(), ABISysV_i386::SetReturnValueObject(), ABISysV_arc::SetReturnValueObject(), ABIMacOSX_arm64::SetReturnValueObject(), lldb_private::process_netbsd::NativeProcessNetBSD::SetupTrace(), lldb_private::process_freebsd::NativeProcessFreeBSD::SetupTrace(), lldb_private::NativeProcessProtocol::SetWatchpoint(), lldb::SBThread::StepUsingScriptedThreadPlan(), lldb_private::formatters::VectorIteratorSyntheticFrontEnd::Update(), lldb_private::ValueObjectCast::UpdateValue(), lldb_private::ValueObjectDynamicValue::UpdateValue(), and lldb_private::ValueObjectSynthetic::UpdateValue().

◆ GetError()

Status::ValueType Status::GetError ( ) const

◆ GetType()

ErrorType Status::GetType ( ) const

Access the error type.

Returns
The error type enumeration value.

Definition at line 178 of file Status.cpp.

References m_type.

◆ operator=()

const Status & Status::operator= ( llvm::Error  error)

◆ SetError()

void Status::SetError ( ValueType  err,
lldb::ErrorType  type 
)

Set accessor with an error value and type.

Set accessor for the error value to err and the error type to type.

Parameters
[in]errA mach error code.
[in]typeThe type for err.

Definition at line 217 of file Status.cpp.

References m_code, m_string, and m_type.

Referenced by lldb_private::ConnectionGenericFile::Connect(), lldb_private::ProcessDebugger::DeallocateMemory(), lldb::SBHostOS::ThreadCancel(), lldb::SBHostOS::ThreadCreate(), lldb::SBHostOS::ThreadDetach(), and lldb::SBHostOS::ThreadJoin().

◆ SetErrorString()

void Status::SetErrorString ( llvm::StringRef  err_str)

Set the current error string to err_str.

Set accessor for the error string value for a generic errors, or to supply additional details above and beyond the standard error strings that the standard type callbacks typically provide. This allows custom strings to be supplied as an error explanation. The error string value will remain until the error value is cleared or a new error value/type is assigned.

Parameters
err_strThe new custom error string to copy and cache.

Definition at line 242 of file Status.cpp.

References m_string, SetErrorToGenericError(), string(), and Success().

Referenced by lldb_private::ClangUserExpression::AddArguments(), CoreSimulatorSupport::Device::Boot(), lldb_private::ConnectionFileDescriptor::BytesAvailable(), lldb_private::ConnectionFileDescriptor::Connect(), lldb_private::Communication::Connect(), PlatformAppleSimulator::ConnectRemote(), lldb_private::ProcessDebugger::DeallocateMemory(), EntityResultVariable::Dematerialize(), lldb_private::IRExecutionUnit::DisassembleFunction(), PlatformAppleSimulator::DisconnectRemote(), lldb_private::DWARFExpression::Evaluate(), lldb_private::process_gdb_remote::ProcessGDBRemote::FlashErase(), lldb_private::StackFrame::GetFrameBaseExpression(), lldb_private::StackFrame::GetFrameBaseValue(), lldb_private::Target::GetOrCreateModule(), lldb::SBValue::GetSP(), lldb_private::Value::GetValueByteSize(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::HandshakeWithServer(), PlatformAppleSimulator::LaunchProcess(), lldb_private::ProcessDebugger::LaunchProcess(), EntityResultVariable::Materialize(), operator=(), lldb_private::ClangExpressionParser::PrepareForExecution(), lldb_private::Thread::QueueThreadPlan(), lldb_private::ConnectionFileDescriptor::Read(), lldb_private::Communication::Read(), lldb_private::Target::ReadCStringFromMemory(), lldb_private::Process::ReadCStringFromMemory(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::ReadExtFeature(), lldb_private::Communication::ReadFromConnection(), ReadRegisterValueAsScalar(), RecurseCopy_Callback(), lldb_private::Thread::ReturnFromFrame(), lldb_private::ClangExpressionParser::RunStaticInitializers(), lldb_private::ClangUserExpression::ScanContext(), lldb_private::NativeFile::SeekFromCurrent(), lldb_private::NativeFile::SeekFromEnd(), lldb_private::NativeFile::SeekFromStart(), lldb::SBDebugger::SetCurrentPlatform(), SetErrorStringWithFormatv(), ABISysV_arc::SetReturnValueObject(), CoreSimulatorSupport::Device::Shutdown(), lldb::SBHostOS::ThreadDetach(), lldb_private::ValueObjectChild::UpdateValue(), lldb_private::ValueObjectMemory::UpdateValue(), lldb_private::ValueObjectVariable::UpdateValue(), lldb_private::ValueObject::UpdateValueIfNeeded(), lldb_private::ConnectionFileDescriptor::Write(), lldb_private::Communication::Write(), and lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::WriteMemoryTags().

◆ SetErrorStringWithFormat()

int Status::SetErrorStringWithFormat ( const char *  format,
  ... 
)

Set the current error string to a formatted error string.

Parameters
formatA printf style format string

Definition at line 256 of file Status.cpp.

References m_string, and SetErrorStringWithVarArg().

Referenced by lldb_private::ConnectionGenericFile::Connect(), lldb_private::ConnectionFileDescriptor::Connect(), EntityPersistentVariable::Dematerialize(), EntityVariable::Dematerialize(), EntityResultVariable::Dematerialize(), EntityRegister::Dematerialize(), EntityPersistentVariable::DestroyAllocation(), lldb_private::IRExecutionUnit::DisassembleFunction(), lldb_private::DWARFExpression::Evaluate(), lldb_private::process_gdb_remote::ProcessGDBRemote::FlashDone(), lldb_private::process_gdb_remote::ProcessGDBRemote::FlashErase(), lldb_private::UserExpression::GetObjectPointer(), lldb_private::Target::GetREPL(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::HandshakeWithServer(), lldb_private::Target::Launch(), lldb_private::ProcessDebugger::LaunchProcess(), EntityPersistentVariable::MakeAllocation(), EntityPersistentVariable::Materialize(), EntityVariable::Materialize(), EntityResultVariable::Materialize(), EntitySymbol::Materialize(), EntityRegister::Materialize(), lldb_private::ClangExpressionParser::PrepareForExecution(), ReadRegisterValueAsScalar(), RecurseCopy_Callback(), lldb_private::Thread::ReturnFromFrameWithIndex(), lldb_private::Debugger::RunREPL(), lldb_private::ClangExpressionParser::RunStaticInitializers(), CommandObjectRenderScriptRuntimeReductionBreakpointSet::CommandOptions::SetOptionValue(), CommandObjectRenderScriptRuntimeKernelBreakpointSet::CommandOptions::SetOptionValue(), CommandObjectRenderScriptRuntimeAllocationDump::CommandOptions::SetOptionValue(), CommandObjectRenderScriptRuntimeAllocationList::CommandOptions::SetOptionValue(), ABISysV_arc::SetReturnValueObject(), lldb_private::OptionArgParser::ToAddress(), and lldb_private::ValueObjectChild::UpdateValue().

◆ SetErrorStringWithFormatv()

template<typename... Args>
void lldb_private::Status::SetErrorStringWithFormatv ( const char *  format,
Args &&...  args 
)
inline

Definition at line 173 of file Status.h.

References SetErrorString().

Referenced by lldb_private::DWARFExpression::Evaluate().

◆ SetErrorStringWithVarArg()

int Status::SetErrorStringWithVarArg ( const char *  format,
va_list  args 
)

◆ SetErrorToErrno()

void Status::SetErrorToErrno ( )

◆ SetErrorToGenericError()

void Status::SetErrorToGenericError ( )

◆ SetExpressionError()

void Status::SetExpressionError ( lldb::ExpressionResults  result,
const char *  mssg 
)

Definition at line 192 of file Status.cpp.

References lldb::eErrorTypeExpression, m_code, m_string, and m_type.

◆ SetExpressionErrorWithFormat()

int Status::SetExpressionErrorWithFormat ( lldb::ExpressionResults  result,
const char *  format,
  ... 
)

◆ SetMachError()

void Status::SetMachError ( uint32_t  err)

Set accessor from a kern_return_t.

Set accessor for the error value to err and the error type to MachKernel.

Parameters
[in]errA mach error code.

Definition at line 186 of file Status.cpp.

References lldb::eErrorTypeMachKernel, m_code, m_string, and m_type.

◆ Success()

bool Status::Success ( ) const

Test for success condition.

Returns true if the error code in this object is considered a successful return value.

Returns
true if this object contains an value that describes success (non-erro), false otherwise.

Definition at line 288 of file Status.cpp.

References m_code.

Referenced by lldb_private::ClangUserExpression::AddArguments(), lldb_private::ClangExpressionDeclMap::AddValueToStruct(), RemoteNXMapTable::const_iterator::AdvanceToValidIndex(), lldb_private::NativeProcessWindows::AllocateMemory(), lldb_private::process_linux::NativeThreadLinux::AnnotateSyncTagCheckFault(), AsCString(), InterpreterStackFrame::AssignValue(), lldb_private::process_netbsd::NativeProcessNetBSD::Factory::Attach(), lldb_private::process_freebsd::NativeProcessFreeBSD::Factory::Attach(), lldb_private::process_gdb_remote::ProcessGDBRemote::BuildDynamicRegisterInfo(), lldb_private::Process::CanJIT(), lldb_private::RenderScriptRuntime::CaptureDebugHintScriptGroup2(), lldb_private::RenderScriptRuntime::CaptureScriptInvokeForEachMulti(), lldb_private::NativeRegisterContextDBReg_x86::ClearHardwareWatchpoint(), lldb_private::ValueObject::CreateConstantValue(), lldb_private::PipeWindows::CreateNew(), EntityPersistentVariable::Dematerialize(), EntityVariable::Dematerialize(), EntityResultVariable::Dematerialize(), EntityRegister::Dematerialize(), EntityPersistentVariable::DestroyAllocation(), lldb_private::Target::DisableWatchpointByID(), lldb_private::IRExecutionUnit::DisassembleFunction(), lldb_private::LLVMUserExpression::DoExecute(), PlatformPOSIX::DoLoadImage(), lldb_private::process_gdb_remote::ProcessGDBRemote::DoWriteMemory(), EntityPersistentVariable::DumpToLog(), EntityVariable::DumpToLog(), EntityResultVariable::DumpToLog(), EntitySymbol::DumpToLog(), EntityRegister::DumpToLog(), lldb_private::Target::EnableWatchpointByID(), InterpreterStackFrame::EvaluateValue(), lldb_private::LLVMUserExpression::FinalizeJITExecution(), lldb_private::IRMemoryMap::FindSpace(), lldb_private::process_gdb_remote::ProcessGDBRemote::FlashErase(), lldb_private::formatters::BlockPointerSyntheticFrontEnd::GetChildAtIndex(), lldb_private::formatters::LibcxxSharedPtrSyntheticFrontEnd::GetChildAtIndex(), lldb_private::formatters::LibcxxUniquePtrSyntheticFrontEnd::GetChildAtIndex(), lldb_private::ThreadPlanStepInstruction::GetDescription(), lldb_private::ThreadPlanStepOverRange::GetDescription(), lldb_private::ThreadPlanStepInRange::GetDescription(), lldb_private::StackFrame::GetFrameBaseValue(), lldb_private::RenderScriptRuntime::GetFrameVarAsUnsigned(), lldb_private::DynamicLoaderWindowsDYLD::GetLoadAddress(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::GetMemoryRegionInfo(), lldb_private::UserExpression::GetObjectPointer(), lldb_private::Target::GetREPL(), lldb_private::IRExecutionUnit::GetRunnableInfo(), lldb_private::RegisterValue::GetScalarValue(), lldb_private::Value::GetValueByteSize(), GetXcodeSelectPath(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerCommon::Handle_A(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerCommon::Handle_qLaunchSuccess(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_QMemTags(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_vRun(), lldb_private::ClangUtilityFunction::Install(), IRInterpreter::Interpret(), IOHandlerProcessSTDIO::Interrupt(), lldb_private::ConnectionFileDescriptor::InterruptRead(), lldb_private::REPL::IOHandlerInputComplete(), IsInputPending(), lldb_private::RenderScriptRuntime::LoadAllocation(), lldb_private::RenderScriptRuntime::LoadModule(), lldb_private::ThreadPlanAssemblyTracer::Log(), EntityPersistentVariable::MakeAllocation(), InterpreterStackFrame::MakeArgument(), EntityPersistentVariable::Materialize(), EntityVariable::Materialize(), EntityResultVariable::Materialize(), EntitySymbol::Materialize(), EntityRegister::Materialize(), lldb_private::process_freebsd::NativeProcessFreeBSD::NativeProcessFreeBSD(), lldb_private::process_linux::NativeProcessLinux::NativeProcessLinux(), lldb_private::process_netbsd::NativeProcessNetBSD::NativeProcessNetBSD(), lldb_private::ConnectionFileDescriptor::OpenCommandPipe(), lldb_private::ClangUserExpression::Parse(), lldb_private::ClangExpressionParser::ParseInternal(), lldb_private::StopInfoBreakpoint::PerformAction(), lldb_private::StopInfoWatchpoint::PerformAction(), lldb_private::ClangUserExpression::PrepareForParsing(), lldb_private::LLVMUserExpression::PrepareToExecuteJITExpression(), InterpreterStackFrame::PrintData(), lldb_private::NativeProcessProtocol::ReadCStringFromMemory(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::ReadExtFeature(), lldb_private::Process::ReadMemory(), RegisterContextMemory::ReadRegister(), InterpreterStackFrame::ResolveConstant(), lldb_private::process_netbsd::NativeProcessNetBSD::Resume(), lldb_private::process_freebsd::NativeProcessFreeBSD::Resume(), lldb_private::process_freebsd::NativeThreadFreeBSD::Resume(), lldb_private::process_netbsd::NativeThreadNetBSD::Resume(), lldb_private::Thread::ReturnFromFrame(), lldb_private::Debugger::RunREPL(), lldb_private::Process::RunThreadPlan(), lldb::SBThread::RunToAddress(), lldb_private::RenderScriptRuntime::SaveAllocation(), ObjectFileMachO::SaveCore(), lldb_private::ScriptInterpreter::SetBreakpointCommandCallback(), lldb::SBValue::SetData(), lldb_private::ValueObject::SetData(), SetErrorString(), SetErrorStringWithVarArg(), lldb_private::NativeProcessProtocol::SetHardwareBreakpoint(), CommandObjectBreakpointSet::CommandOptions::SetOptionValue(), CommandObjectSourceList::CommandOptions::SetOptionValue(), lldb_private::OptionValueProperties::SetPropertyAtIndexFromArgs(), lldb_private::NativeProcessProtocol::SetWatchpoint(), lldb_private::ThreadPlanStepOverRange::ShouldStop(), lldb_private::AppleThreadPlanStepThroughObjCTrampoline::ShouldStop(), lldb_private::process_freebsd::NativeThreadFreeBSD::SingleStep(), lldb_private::process_netbsd::NativeThreadNetBSD::SingleStep(), lldb::SBThread::StepInstruction(), lldb::SBThread::StepInto(), lldb::SBThread::StepOut(), lldb::SBThread::StepOutOfFrame(), lldb::SBThread::StepOverUntil(), lldb::SBThread::StepUsingScriptedThreadPlan(), CommandObjectProcessLaunchOrAttach::StopProcessIfNecessary(), lldb_private::process_netbsd::NativeThreadNetBSD::Suspend(), lldb_private::process_freebsd::NativeThreadFreeBSD::Suspend(), ToError(), lldb_private::ClangUserExpression::TryParse(), lldb_private::ModuleListProperties::UpdateSymlinkMappings(), lldb_private::ValueObjectCast::UpdateValue(), lldb_private::ValueObjectChild::UpdateValue(), lldb_private::ValueObjectMemory::UpdateValue(), lldb_private::ValueObjectRegisterSet::UpdateValue(), lldb_private::ValueObjectVariable::UpdateValue(), lldb_private::ValueObjectDynamicValue::UpdateValue(), lldb_private::ValueObject::UpdateValueIfNeeded(), lldb_private::IRExecutionUnit::WriteData(), lldb_private::FunctionCaller::WriteFunctionWrapper(), and lldb_private::IRExecutionUnit::WriteNow().

◆ ToError()

llvm::Error Status::ToError ( ) const

Definition at line 90 of file Status.cpp.

References AsCString(), lldb::eErrorTypePOSIX, m_code, m_type, and Success().

Referenced by lldb_private::NativeProcessWindows::AllocateMemory(), lldb_private::process_netbsd::NativeProcessNetBSD::Factory::Attach(), lldb_private::process_freebsd::NativeProcessFreeBSD::Factory::Attach(), lldb_private::process_linux::NativeProcessLinux::Attach(), ComputeSignalInfo(), lldb_private::process_gdb_remote::GDBRemoteCommunication::ConnectLocally(), lldb_private::NativeProcessWindows::DeallocateMemory(), lldb_private::process_linux::IntelPTThreadTrace::GetCPUInfo(), lldb_private::process_netbsd::NativeProcessNetBSD::Factory::Launch(), lldb_private::process_freebsd::NativeProcessFreeBSD::Factory::Launch(), lldb_private::process_linux::NativeProcessLinux::Factory::Launch(), lldb_private::process_netbsd::NativeProcessNetBSD::MonitorClone(), lldb_private::process_freebsd::NativeProcessFreeBSD::MonitorClone(), lldb_private::NativeProcessWindows::NativeProcessWindows(), ProcessElfCore::parseLinuxNotes(), lldb_private::NativeProcessProtocol::ReadCStringFromMemory(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::SendTraceGetBinaryData(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::SendTraceGetState(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::SendTraceStart(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::SendTraceStop(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::SendTraceSupported(), and lldb_private::process_linux::NativeProcessLinux::Syscall().

◆ WasInterrupted()

bool Status::WasInterrupted ( ) const

Test for a failure due to a generic interrupt.

Returns true if the error code in this object was caused by an interrupt. At present only supports Posix EINTR.

Returns
true if this object contains an value that describes failure due to interrupt, false otherwise.

Definition at line 290 of file Status.cpp.

References lldb::eErrorTypePOSIX, m_code, and m_type.

Member Data Documentation

◆ m_code

ValueType lldb_private::Status::m_code = 0
protected

◆ m_string

std::string lldb_private::Status::m_string
mutableprotected

◆ m_type

lldb::ErrorType lldb_private::Status::m_type
protected

The documentation for this class was generated from the following files:
lldb::eErrorTypeInvalid
@ eErrorTypeInvalid
Definition: lldb-enumerations.h:307