LLDB mainline
|
An error handling class. More...
#include "lldb/Utility/Status.h"
Public Types | |
typedef uint32_t | ValueType |
Every error value that this object can contain needs to be able to fit into ValueType. | |
Public Member Functions | |
Status () | |
Status (ValueType err, lldb::ErrorType type=lldb::eErrorTypeGeneric) | |
Initialize the error object with a generic success value. | |
Status (std::error_code EC) | |
Status (const char *format,...) __attribute__((format(printf | |
~Status () | |
Status (llvm::Error error) | |
const Status & | operator= (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. | |
void | Clear () |
Clear the object state. | |
bool | Fail () const |
Test for error condition. | |
ValueType | GetError () const |
Access the error value. | |
lldb::ErrorType | GetType () const |
Access the error type. | |
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. | |
void | SetErrorToErrno () |
Set the current error to errno. | |
void | SetErrorToGenericError () |
Set the current error to a generic error. | |
void | SetErrorString (llvm::StringRef err_str) |
Set the current error string to err_str. | |
int | SetErrorStringWithFormat (const char *format,...) __attribute__((format(printf |
Set the current error string to a formatted error string. | |
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. | |
Static Public Member Functions | |
template<typename... Args> | |
static Status | createWithFormat (const char *format, Args &&...args) |
Protected Attributes | |
ValueType | m_code = 0 |
Member variables. | |
lldb::ErrorType | m_type |
The type of the above error code. | |
std::string | m_string |
A string representation of the error code. | |
Private Member Functions | |
Status (const llvm::formatv_object_base &payload) | |
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.
typedef uint32_t lldb_private::Status::ValueType |
Status::Status | ( | ) |
Definition at line 40 of file Status.cpp.
Referenced by createWithFormat().
|
explicit |
Initialize the error object with a generic success value.
[in] | err | An error code. |
[in] | type | The type for err. |
Definition at line 42 of file Status.cpp.
Status::Status | ( | std::error_code | EC | ) |
Definition at line 48 of file Status.cpp.
|
explicit |
Definition at line 54 of file Status.cpp.
References SetErrorStringWithVarArg(), and SetErrorToGenericError().
|
default |
|
inlineexplicit |
|
inlineexplicitprivate |
Definition at line 190 of file Status.h.
References m_string, and SetErrorToGenericError().
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.
Definition at line 129 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::process_gdb_remote::GDBRemoteCommunication::ConnectLocally(), CommandObjectScriptingObjectParsed::Create(), lldb_private::Breakpoint::CreateFromStructuredData(), lldb_private::BreakpointOptions::CreateFromStructuredData(), EntityPersistentVariable::Dematerialize(), EntityVariableBase::Dematerialize(), EntityRegister::Dematerialize(), EntityPersistentVariable::DestroyAllocation(), lldb_private::IRExecutionUnit::DisassembleFunction(), lldb_private::ConnectionFileDescriptor::Disconnect(), CommandObjectBreakpointSet::DoExecute(), CommandObjectCommandsScriptAdd::DoExecute(), CommandObjectCommandsContainerAdd::DoExecute(), CommandObjectCommandsContainerDelete::DoExecute(), CommandObjectPlatformProcessAttach::DoExecute(), CommandObjectTargetCreate::DoExecute(), lldb_private::LLVMUserExpression::DoExecute(), PlatformPOSIX::DoLoadImage(), lldb_private::PlatformWindows::DoLoadImage(), lldb_private::ClangExpressionParser::DoPrepareForExecution(), lldb_private::ValueObject::DumpPrintableRepresentation(), lldb_private::LLVMUserExpression::FinalizeJITExecution(), lldb_private::StringSummaryFormat::GetDescription(), lldb_private::ThreadPlanStepInRange::GetDescription(), lldb_private::ThreadPlanStepInstruction::GetDescription(), lldb_private::ThreadPlanStepOverRange::GetDescription(), lldb::SBValue::GetError(), lldb_private::MemoryHistoryASan::GetHistoryThreads(), lldb_private::Module::GetMemoryObjectFile(), lldb_private::plugin::dwarf::SymbolFileDWARFDebugMap::GetModuleByCompUnitInfo(), lldb_private::IRExecutionUnit::GetRunnableInfo(), lldb_private::plugin::dwarf::SymbolFileDWARF::GetSeparateDebugInfo(), lldb::SBValue::GetValueAsSigned(), lldb::SBValue::GetValueAsUnsigned(), lldb_private::ValueObjectPrinter::GetValueSummaryError(), lldb_private::ClangExpressionDeclMap::GetVariableValue(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerCommon::Handle_qLaunchSuccess(), HandleFileAction(), lldb_private::ClangUtilityFunction::Install(), DynamicLoaderDarwinKernel::KextImageInfo::LoadImageUsingMemoryModule(), EntityPersistentVariable::MakeAllocation(), PlatformPOSIX::MakeLoadImageUtilityFunction(), EntityPersistentVariable::Materialize(), EntityVariableBase::Materialize(), EntityResultVariable::Materialize(), EntitySymbol::Materialize(), EntityRegister::Materialize(), lldb_private::ConnectionFileDescriptor::OpenCommandPipe(), lldb_private::StopInfoBreakpoint::PerformAction(), 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::ReportRetriever::RetrieveReportData(), lldb_private::InstrumentationRuntimeTSan::RetrieveReportData(), lldb_private::InstrumentationRuntimeUBSan::RetrieveReportData(), lldb_private::Process::RunThreadPlan(), lldb::SBThread::RunToAddress(), lldb_private::ValueObject::SetData(), lldb::SBValue::SetData(), CommandObjectBreakpointSet::CommandOptions::SetOptionValue(), CommandObjectBreakpointRead::CommandOptions::SetOptionValue(), CommandObjectSourceList::CommandOptions::SetOptionValue(), ABIMacOSX_arm64::SetReturnValueObject(), ABISysV_arm64::SetReturnValueObject(), ABISysV_arc::SetReturnValueObject(), ABIMacOSX_arm::SetReturnValueObject(), ABISysV_arm::SetReturnValueObject(), ABISysV_mips::SetReturnValueObject(), ABISysV_mips64::SetReturnValueObject(), ABISysV_ppc::SetReturnValueObject(), ABISysV_ppc64::SetReturnValueObject(), ABISysV_riscv::SetReturnValueObject(), ABISysV_s390x::SetReturnValueObject(), ABIMacOSX_i386::SetReturnValueObject(), ABISysV_i386::SetReturnValueObject(), ABISysV_x86_64::SetReturnValueObject(), ABIWindows_x86_64::SetReturnValueObject(), 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().
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 166 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::OptionArgParser::DoToAddress(), lldb_private::plugin::dwarf::DWARFUnit::ExtractUnitDIEIfNeeded(), lldb_private::StackFrame::GetFrameBaseValue(), lldb_private::UserExpression::GetObjectPointerValueObject(), lldb_private::Value::GetValueByteSize(), IRInterpreter::Interpret(), operator=(), lldb_private::ConnectionGenericFile::Read(), lldb_private::Target::ReadCStringFromMemory(), lldb_private::NativeProcessProtocol::ReadCStringFromMemory(), lldb_private::Process::ReadCStringFromMemory(), lldb_private::process_freebsd::NativeThreadFreeBSD::Resume(), lldb_private::NativeFile::SeekFromCurrent(), lldb_private::NativeFile::SeekFromEnd(), lldb_private::NativeFile::SeekFromStart(), lldb_private::StringSummaryFormat::SetSummaryString(), CoreSimulatorSupport::Device::Shutdown(), lldb_private::ThreadedCommunication::StartReadThread(), lldb_private::StackFrame::UpdatePreviousFrameFromCurrentFrame(), lldb_private::ValueObjectCast::UpdateValue(), lldb_private::ValueObjectChild::UpdateValue(), lldb_private::ValueObjectDynamicValue::UpdateValue(), lldb_private::ValueObjectMemory::UpdateValue(), lldb_private::ValueObjectRegisterSet::UpdateValue(), lldb_private::ValueObjectRegister::UpdateValue(), lldb_private::ValueObjectSynthetic::UpdateValue(), lldb_private::ValueObjectVariable::UpdateValue(), lldb_private::ValueObjectVTable::UpdateValue(), lldb_private::ValueObject::UpdateValueIfNeeded(), lldb_private::CommandInterpreter::VerifyUserMultiwordCmdPath(), lldb_private::ConnectionGenericFile::Write(), and lldb_private::IRMemoryMap::~IRMemoryMap().
|
inlinestatic |
Definition at line 68 of file Status.h.
References Status().
Referenced by lldb_private::plugin::dwarf::DWARFUnit::ExtractUnitDIEIfNeeded(), lldb_private::plugin::dwarf::SymbolFileDWARF::GetDwoSymbolFileForCompileUnit(), and lldb_private::Platform::ResolveExecutable().
bool Status::Fail | ( | ) | const |
Test for error condition.
Definition at line 180 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_freebsd::NativeProcessFreeBSD::Attach(), lldb_private::process_netbsd::NativeProcessNetBSD::Attach(), lldb_private::Process::CalculateCoreFileSaveRanges(), lldb_private::plugin::dwarf::SymbolFileDWARF::CalculateFrameVariableError(), lldb_private::plugin::dwarf::SymbolFileDWARFDebugMap::CalculateFrameVariableError(), CommandObjectScriptingObjectParsed::CommandObjectScriptingObjectParsed(), CommandObjectScriptingObjectParsed::Create(), lldb_private::Breakpoint::CreateFromStructuredData(), lldb_private::BreakpointOptions::CreateFromStructuredData(), lldb_private::process_linux::NativeProcessLinux::Detach(), lldb_private::process_linux::NativeRegisterContextLinux::DetermineArchitectureViaGPR(), lldb_private::Target::DisableAllWatchpoints(), CommandObjectThreadJump::DoExecute(), CommandObjectBreakpointSet::DoExecute(), CommandObjectCommandsScriptAdd::DoExecute(), CommandObjectCommandsContainerAdd::DoExecute(), CommandObjectMemoryTagWrite::DoExecute(), CommandObjectPlatformProcessAttach::DoExecute(), CommandObjectTargetCreate::DoExecute(), PlatformPOSIX::DoLoadImage(), lldb_private::PlatformWindows::DoLoadImage(), lldb_private::ProcessWindows::DoResume(), lldb_private::ValueObject::DumpPrintableRepresentation(), lldb_private::Target::EnableAllWatchpoints(), lldb_private::PlatformWindows::EvaluateLoaderExpression(), lldb_private::CPPLanguageRuntime::FindLibCppStdFunctionCallableInfo(), lldb_private::IRMemoryMap::FindSpace(), lldb_private::formatters::LibcxxVectorBoolSyntheticFrontEnd::GetChildAtIndex(), lldb_private::StringSummaryFormat::GetDescription(), lldb_private::SymbolFile::GetFrameVariableError(), lldb_private::PlatformDarwinDevice::GetSharedModuleWithLocalCache(), lldb_private::StackFrame::GetValueForVariableExpressionPath(), lldb_private::Variable::GetValuesForVariableExpressionPath(), lldb::SBFrame::GetVariables(), GetVTableAddress(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerCommon::Handle_qPlatform_shell(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_vRun(), lldb_private::Process::Launch(), lldb_private::process_freebsd::NativeProcessFreeBSD::Manager::Launch(), lldb_private::process_linux::NativeProcessLinux::Manager::Launch(), lldb_private::process_netbsd::NativeProcessNetBSD::Manager::Launch(), lldb_private::PlatformAppleSimulator::LaunchProcess(), lldb_private::ProcessDebugger::LaunchProcess(), DynamicLoaderDarwinKernel::KextImageInfo::LoadImageUsingMemoryModule(), DynamicLoaderPOSIXDYLD::LoadInterpreterModule(), DynamicLoaderPOSIXDYLD::LoadVDSO(), lldb_private::ClangExpressionDeclMap::LookUpLldbClass(), lldb_private::ClangExpressionDeclMap::LookUpLldbObjCClass(), PlatformPOSIX::MakeLoadImageUtilityFunction(), EntityVariableBase::Materialize(), lldb_private::process_freebsd::NativeProcessFreeBSD::MonitorClone(), lldb_private::process_netbsd::NativeProcessNetBSD::MonitorClone(), lldb_private::process_linux::NativeProcessLinux::MonitorSIGTRAP(), lldb_private::process_freebsd::NativeProcessFreeBSD::MonitorSIGTRAP(), lldb_private::formatters::ObjCBOOLSummaryProvider(), ProcessElfCore::parseLinuxNotes(), lldb_private::process_linux::NativeProcessLinux::PopulateMemoryRegionCache(), lldb_private::ValueObjectPrinter::PrintValueObject(), 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(), lldb_private::NativeProcessProtocol::SetHardwareBreakpoint(), BreakpointNameOptionGroup::SetOptionValue(), CommandObjectMemoryFind::OptionGroupFindMemory::SetOptionValue(), lldb_private::DynamicRegisterInfo::SetRegisterInfo(), ABIMacOSX_arm64::SetReturnValueObject(), ABISysV_arm64::SetReturnValueObject(), ABISysV_arc::SetReturnValueObject(), ABIMacOSX_arm::SetReturnValueObject(), ABISysV_arm::SetReturnValueObject(), ABISysV_mips::SetReturnValueObject(), ABISysV_mips64::SetReturnValueObject(), ABISysV_ppc::SetReturnValueObject(), ABISysV_ppc64::SetReturnValueObject(), ABISysV_riscv::SetReturnValueObject(), ABISysV_s390x::SetReturnValueObject(), ABIMacOSX_i386::SetReturnValueObject(), ABISysV_i386::SetReturnValueObject(), ABISysV_x86_64::SetReturnValueObject(), ABIWindows_x86_64::SetReturnValueObject(), lldb_private::process_freebsd::NativeProcessFreeBSD::SetupTrace(), lldb_private::process_netbsd::NativeProcessNetBSD::SetupTrace(), lldb_private::NativeProcessProtocol::SetWatchpoint(), lldb_private::AppleThreadPlanStepThroughObjCTrampoline::ShouldStop(), lldb::SBThread::StepUsingScriptedThreadPlan(), lldb_private::PlatformWindows::UnloadImage(), lldb_private::formatters::VectorIteratorSyntheticFrontEnd::Update(), lldb_private::ValueObjectCast::UpdateValue(), lldb_private::ValueObjectDynamicValue::UpdateValue(), lldb_private::ValueObjectSynthetic::UpdateValue(), and ValueObjectVTableChild::UpdateValue().
Status::ValueType Status::GetError | ( | ) | const |
Access the error value.
Definition at line 173 of file Status.cpp.
References m_code.
Referenced by lldb_private::process_linux::NativeProcessLinux::Attach(), PlatformPOSIX::EvaluateLibdlExpression(), EntityVariableBase::Materialize(), lldb_private::process_freebsd::NativeThreadFreeBSD::Resume(), lldb_private::PlatformWindows::UnloadImage(), and lldb_private::ConnectionGenericFile::Write().
ErrorType Status::GetType | ( | ) | const |
Access the error type.
Definition at line 176 of file Status.cpp.
References m_type.
const Status & Status::operator= | ( | llvm::Error | error | ) |
Definition at line 62 of file Status.cpp.
References Clear(), error(), SetErrorString(), and SetErrorToGenericError().
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.
[in] | err | A mach error code. |
[in] | type | The type for err. |
Definition at line 207 of file Status.cpp.
References m_code, m_string, and m_type.
Referenced by lldb_private::ConnectionGenericFile::Connect(), and lldb_private::ProcessDebugger::DeallocateMemory().
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.
err_str | The new custom error string to copy and cache. |
Definition at line 232 of file Status.cpp.
References m_string, SetErrorToGenericError(), and Success().
Referenced by lldb_private::ClangUserExpression::AddArguments(), lldb_private::CommandInterpreter::AddUserCommand(), lldb_private::PlatformQemuUser::Attach(), CoreSimulatorSupport::Device::Boot(), lldb_private::ConnectionFileDescriptor::BytesAvailable(), lldb_private::ValueObject::CastToBasicType(), lldb_private::ValueObject::CastToEnumType(), CommandObjectScriptingObjectParsed::CommandObjectScriptingObjectParsed(), lldb_private::ConnectionFileDescriptor::Connect(), lldb_private::PlatformAppleSimulator::ConnectRemote(), lldb_private::ProcessDebugger::DeallocateMemory(), EntityResultVariable::Dematerialize(), lldb_private::IRExecutionUnit::DisassembleFunction(), lldb_private::PlatformAppleSimulator::DisconnectRemote(), lldb_private::ClangExpressionParser::DoPrepareForExecution(), lldb_private::process_gdb_remote::ProcessGDBRemote::FlashErase(), lldb_private::StackFrame::GetFrameBaseExpression(), lldb_private::StackFrame::GetFrameBaseValue(), lldb_private::Target::GetOrCreateModule(), lldb_private::Target::GetREPL(), lldb::SBValue::GetSP(), lldb_private::Value::GetValueByteSize(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::HandshakeWithServer(), lldb_private::PlatformAppleSimulator::LaunchProcess(), lldb_private::ProcessDebugger::LaunchProcess(), lldb_private::PlatformWindows::MakeLoadImageUtilityFunction(), EntityResultVariable::Materialize(), operator=(), CommandObjectTargetModulesLookup::CommandOptions::OptionParsingFinished(), lldb_private::Thread::QueueThreadPlan(), lldb_private::ThreadedCommunication::Read(), lldb_private::ConnectionFileDescriptor::Read(), lldb_private::Target::ReadCStringFromMemory(), lldb_private::Process::ReadCStringFromMemory(), lldb_private::Communication::ReadFromConnection(), RecurseCopy_Callback(), lldb_private::Thread::ReturnFromFrame(), lldb_private::Debugger::RunREPL(), lldb_private::ExpressionParser::RunStaticInitializers(), lldb_private::ClangUserExpression::ScanContext(), lldb_private::NativeFile::SeekFromCurrent(), lldb_private::NativeFile::SeekFromEnd(), lldb_private::NativeFile::SeekFromStart(), lldb::SBDebugger::SetCurrentPlatform(), SetErrorStringWithFormatv(), lldb_private::Debugger::SetInputString(), ABISysV_arc::SetReturnValueObject(), ABISysV_riscv::SetReturnValueObject(), CoreSimulatorSupport::Device::Shutdown(), lldb_private::ValueObjectChild::UpdateValue(), lldb_private::ValueObjectDynamicValue::UpdateValue(), lldb_private::ValueObjectMemory::UpdateValue(), lldb_private::ValueObjectVariable::UpdateValue(), lldb_private::ValueObjectVTable::UpdateValue(), ValueObjectVTableChild::UpdateValue(), lldb_private::ValueObject::UpdateValueIfNeeded(), lldb_private::CommandInterpreter::VerifyUserMultiwordCmdPath(), lldb_private::Communication::Write(), lldb_private::ConnectionFileDescriptor::Write(), and lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::WriteMemoryTags().
int Status::SetErrorStringWithFormat | ( | const char * | format, |
... | |||
) |
Set the current error string to a formatted error string.
format | A printf style format string |
Definition at line 246 of file Status.cpp.
References m_string, and SetErrorStringWithVarArg().
Referenced by lldb_private::ValueObject::CastToBasicType(), lldb_private::ValueObject::CastToEnumType(), lldb_private::ConnectionGenericFile::Connect(), lldb_private::ConnectionFileDescriptor::Connect(), lldb_private::ConnectionFileDescriptor::ConnectFD(), EntityPersistentVariable::Dematerialize(), EntityVariableBase::Dematerialize(), EntityResultVariable::Dematerialize(), EntityRegister::Dematerialize(), EntityPersistentVariable::DestroyAllocation(), lldb_private::IRExecutionUnit::DisassembleFunction(), lldb_private::ClangExpressionParser::DoPrepareForExecution(), lldb_private::OptionArgParser::DoToAddress(), lldb_private::process_gdb_remote::ProcessGDBRemote::FlashDone(), lldb_private::process_gdb_remote::ProcessGDBRemote::FlashErase(), lldb_private::plugin::dwarf::SymbolFileDWARFDebugMap::GetModuleByCompUnitInfo(), lldb_private::Target::GetREPL(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::HandshakeWithServer(), lldb_private::Target::Launch(), lldb_private::ProcessDebugger::LaunchProcess(), EntityPersistentVariable::MakeAllocation(), lldb_private::PlatformWindows::MakeLoadImageUtilityFunction(), EntityPersistentVariable::Materialize(), EntityVariableBase::Materialize(), EntityResultVariable::Materialize(), EntitySymbol::Materialize(), EntityRegister::Materialize(), RecurseCopy_Callback(), lldb_private::Thread::ReturnFromFrameWithIndex(), lldb_private::Debugger::RunREPL(), lldb_private::ExpressionParser::RunStaticInitializers(), lldb_private::Debugger::SetInputString(), ABISysV_arc::SetReturnValueObject(), ABISysV_riscv::SetReturnValueObject(), lldb_private::ValueObjectChild::UpdateValue(), lldb_private::ValueObjectVTable::UpdateValue(), ValueObjectVTableChild::UpdateValue(), and lldb_private::CommandInterpreter::VerifyUserMultiwordCmdPath().
|
inline |
Definition at line 169 of file Status.h.
References SetErrorString().
Referenced by lldb_private::CommandInterpreter::AddUserCommand(), CommandObjectScriptingObjectParsed::CommandObjectScriptingObjectParsed(), lldb_private::Process::DoWriteMemoryTags(), lldb_private::ClangUserExpression::GetCppObjectPointer(), lldb_private::UserExpression::GetObjectPointer(), and lldb_private::UserExpression::GetObjectPointerValueObject().
int Status::SetErrorStringWithVarArg | ( | const char * | format, |
va_list | args | ||
) |
Definition at line 259 of file Status.cpp.
References m_string, SetErrorToGenericError(), Success(), and lldb_private::VASprintf().
Referenced by SetErrorStringWithFormat(), SetExpressionErrorWithFormat(), and Status().
void Status::SetErrorToErrno | ( | ) |
Set the current error to errno.
Update the error value to be errno
and update the type to be Status::POSIX
.
Definition at line 214 of file Status.cpp.
References lldb::eErrorTypePOSIX, m_code, m_string, and m_type.
Referenced by lldb_private::ConnectionFileDescriptor::ConnectFile(), lldb_private::ConnectionFileDescriptor::ConnectSerialPort(), HandleFileAction(), lldb_private::process_linux::NativeThreadLinux::RequestStop(), lldb_private::FileSystem::ResolveSymbolicLink(), lldb_private::NativeFile::SeekFromCurrent(), lldb_private::NativeFile::SeekFromEnd(), and lldb_private::NativeFile::SeekFromStart().
void Status::SetErrorToGenericError | ( | ) |
Set the current error to a generic error.
Update the error value to be LLDB_GENERIC_ERROR
and update the type to be Status::Generic
.
Definition at line 222 of file Status.cpp.
References lldb::eErrorTypeGeneric, LLDB_GENERIC_ERROR, m_code, m_string, and m_type.
Referenced by lldb_private::IRExecutionUnit::DisassembleFunction(), lldb_private::ClangExpressionParser::DoPrepareForExecution(), operator=(), SetErrorString(), SetErrorStringWithVarArg(), Status(), lldb_private::ValueObjectRegisterSet::UpdateValue(), and lldb_private::ValueObjectRegister::UpdateValue().
void Status::SetExpressionError | ( | lldb::ExpressionResults | result, |
const char * | mssg | ||
) |
Definition at line 182 of file Status.cpp.
References lldb::eErrorTypeExpression, m_code, m_string, and m_type.
int Status::SetExpressionErrorWithFormat | ( | lldb::ExpressionResults | result, |
const char * | format, | ||
... | |||
) |
Definition at line 189 of file Status.cpp.
References lldb::eErrorTypeExpression, m_code, m_string, m_type, and SetErrorStringWithVarArg().
bool Status::Success | ( | ) | const |
Test for success condition.
Returns true if the error code in this object is considered a successful return value.
Definition at line 278 of file Status.cpp.
References m_code.
Referenced by lldb_private::ClangUserExpression::AddArguments(), lldb::SBCommandInterpreter::AddCommand(), lldb::SBCommandInterpreter::AddMultiwordCommand(), lldb_private::ClangExpressionDeclMap::AddValueToStruct(), RemoteNXMapTable::const_iterator::AdvanceToValidIndex(), lldb_private::NativeProcessWindows::AllocateMemory(), lldb_private::process_linux::NativeThreadLinux::AnnotateSyncTagCheckFault(), AsCString(), InterpreterStackFrame::AssignValue(), lldb_private::process_freebsd::NativeProcessFreeBSD::Manager::Attach(), lldb_private::process_netbsd::NativeProcessNetBSD::Manager::Attach(), lldb_private::process_gdb_remote::ProcessGDBRemote::BuildDynamicRegisterInfo(), lldb_private::Process::CanJIT(), lldb_private::NativeRegisterContextDBReg_x86::ClearHardwareWatchpoint(), lldb_private::ValueObject::CreateConstantValue(), lldb_private::PipeWindows::CreateNew(), EntityPersistentVariable::Dematerialize(), EntityVariableBase::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(), EntityVariableBase::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::ClangUserExpression::GetCppObjectPointer(), lldb_private::ThreadPlanStepInRange::GetDescription(), lldb_private::ThreadPlanStepInstruction::GetDescription(), lldb_private::ThreadPlanStepOverRange::GetDescription(), lldb_private::ValueObject::GetDynamicValue(), lldb_private::ValueObjectConstResult::GetDynamicValue(), lldb_private::StackFrame::GetFrameBaseValue(), 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::ClangUtilityFunction::Install(), IRInterpreter::Interpret(), IOHandlerProcessSTDIO::Interrupt(), lldb_private::ConnectionFileDescriptor::InterruptRead(), lldb_private::REPL::IOHandlerInputComplete(), IsInputPending(), lldb_private::ThreadPlanAssemblyTracer::Log(), EntityPersistentVariable::MakeAllocation(), InterpreterStackFrame::MakeArgument(), lldb_private::process_linux::NativeProcessLinux::Manager::Manager(), EntityPersistentVariable::Materialize(), EntityVariableBase::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::ClangExpressionParser::ParseInternal(), lldb_private::StopInfoBreakpoint::PerformAction(), lldb_private::ExpressionParser::PrepareForExecution(), lldb_private::ClangUserExpression::PrepareForParsing(), lldb_private::LLVMUserExpression::PrepareToExecuteJITExpression(), InterpreterStackFrame::PrintData(), lldb_private::NativeProcessProtocol::ReadCStringFromMemory(), lldb_private::Process::ReadMemory(), RegisterContextMemory::ReadRegister(), InterpreterStackFrame::ResolveConstant(), lldb_private::process_freebsd::NativeThreadFreeBSD::Resume(), lldb_private::process_netbsd::NativeThreadNetBSD::Resume(), lldb_private::process_freebsd::NativeProcessFreeBSD::Resume(), lldb_private::process_netbsd::NativeProcessNetBSD::Resume(), lldb_private::Thread::ReturnFromFrame(), lldb_private::Debugger::RunREPL(), lldb_private::Process::RunThreadPlan(), lldb::SBThread::RunToAddress(), SaveOffRegionsWithStackPointers(), lldb_private::ValueObject::SetData(), lldb::SBValue::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_freebsd::NativeThreadFreeBSD::Suspend(), lldb_private::process_netbsd::NativeThreadNetBSD::Suspend(), ToError(), lldb_private::ClangUserExpression::TryParse(), lldb_private::ModuleListProperties::UpdateSymlinkMappings(), lldb_private::ValueObjectCast::UpdateValue(), lldb_private::ValueObjectChild::UpdateValue(), lldb_private::ValueObjectDynamicValue::UpdateValue(), lldb_private::ValueObjectMemory::UpdateValue(), lldb_private::ValueObjectRegisterSet::UpdateValue(), lldb_private::ValueObjectVariable::UpdateValue(), ValueObjectVTableChild::UpdateValue(), lldb_private::ValueObject::UpdateValueIfNeeded(), lldb_private::IRExecutionUnit::WriteData(), lldb_private::FunctionCaller::WriteFunctionWrapper(), and lldb_private::IRExecutionUnit::WriteNow().
llvm::Error Status::ToError | ( | ) | const |
Definition at line 89 of file Status.cpp.
References AsCString(), m_code, m_type, and Success().
Referenced by lldb_private::NativeProcessWindows::AllocateMemory(), lldb_private::process_linux::NativeProcessLinux::Attach(), lldb_private::process_freebsd::NativeProcessFreeBSD::Manager::Attach(), lldb_private::process_netbsd::NativeProcessNetBSD::Manager::Attach(), ComputeSignalInfo(), lldb_private::process_gdb_remote::GDBRemoteCommunication::ConnectLocally(), lldb_private::NativeProcessWindows::DeallocateMemory(), lldb_private::process_linux::NativeRegisterContextLinux::DetermineArchitectureViaGPR(), lldb_private::DWARFExpression::Evaluate(), lldb_private::process_freebsd::NativeProcessFreeBSD::Manager::Launch(), lldb_private::process_linux::NativeProcessLinux::Manager::Launch(), lldb_private::process_netbsd::NativeProcessNetBSD::Manager::Launch(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::LaunchProcess(), lldb_private::process_freebsd::NativeProcessFreeBSD::MonitorClone(), lldb_private::process_netbsd::NativeProcessNetBSD::MonitorClone(), lldb_private::NativeProcessWindows::NativeProcessWindows(), ProcessElfCore::parseLinuxNotes(), lldb_private::ValueObjectPrinter::PrintValueObject(), 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().
|
protected |
Member variables.
Status code as an integer value.
Definition at line 185 of file Status.h.
Referenced by AsCString(), Clear(), Fail(), GetError(), SetError(), SetErrorToErrno(), SetErrorToGenericError(), SetExpressionError(), SetExpressionErrorWithFormat(), Success(), and ToError().
|
mutableprotected |
A string representation of the error code.
Definition at line 188 of file Status.h.
Referenced by AsCString(), Clear(), SetError(), SetErrorString(), SetErrorStringWithFormat(), SetErrorStringWithVarArg(), SetErrorToErrno(), SetErrorToGenericError(), SetExpressionError(), SetExpressionErrorWithFormat(), and Status().
|
protected |
The type of the above error code.
Definition at line 186 of file Status.h.
Referenced by AsCString(), Clear(), GetType(), SetError(), SetErrorToErrno(), SetErrorToGenericError(), SetExpressionError(), SetExpressionErrorWithFormat(), and ToError().