LLDB mainline
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
lldb::SBError Class Reference

#include <SBError.h>

Public Member Functions

 SBError ()
 
 SBError (const lldb::SBError &rhs)
 
 SBError (const char *message)
 
 ~SBError ()
 
const SBErroroperator= (const lldb::SBError &rhs)
 
const char * GetCString () const
 Get the error string as a NULL terminated UTF8 c-string.
 
void Clear ()
 
bool Fail () const
 
bool Success () const
 
uint32_t GetError () const
 
lldb::ErrorType GetType () const
 
void SetError (uint32_t err, lldb::ErrorType type)
 
void SetErrorToErrno ()
 
void SetErrorToGenericError ()
 
void SetErrorString (const char *err_str)
 
 __attribute__ ((format(printf, 2, 3))) int SetErrorStringWithFormat(const char *format
 
 operator bool () const
 
bool IsValid () const
 
bool GetDescription (lldb::SBStream &description)
 

Protected Member Functions

 SBError (const lldb_private::Status &error)
 
lldb_private::Statusget ()
 
lldb_private::Statusoperator-> ()
 
const lldb_private::Statusoperator* () const
 
lldb_private::Statusref ()
 
void SetError (const lldb_private::Status &lldb_error)
 

Private Member Functions

void CreateIfNeeded ()
 

Private Attributes

std::unique_ptr< lldb_private::Statusm_opaque_up
 

Friends

class SBBreakpoint
 
class SBBreakpointLocation
 
class SBBreakpointName
 
class SBCommandReturnObject
 
class SBCommunication
 
class SBSaveCoreOptions
 
class SBData
 
class SBDebugger
 
class SBFile
 
class SBFormat
 
class SBHostOS
 
class SBPlatform
 
class SBProcess
 
class SBReproducer
 
class SBStructuredData
 
class SBTarget
 
class SBThread
 
class SBTrace
 
class SBValue
 
class SBValueList
 
class SBWatchpoint
 
class lldb_private::ScriptInterpreter
 
class lldb_private::python::SWIGBridge
 

Detailed Description

Definition at line 23 of file SBError.h.

Constructor & Destructor Documentation

◆ SBError() [1/4]

SBError::SBError ( )

Definition at line 20 of file SBError.cpp.

References LLDB_INSTRUMENT_VA.

◆ SBError() [2/4]

SBError::SBError ( const lldb::SBError rhs)

Definition at line 22 of file SBError.cpp.

References lldb_private::clone(), LLDB_INSTRUMENT_VA, and m_opaque_up.

◆ SBError() [3/4]

SBError::SBError ( const char *  message)

Definition at line 28 of file SBError.cpp.

References LLDB_INSTRUMENT_VA, and SetErrorString().

◆ ~SBError()

SBError::~SBError ( )
default

◆ SBError() [4/4]

SBError::SBError ( const lldb_private::Status error)
protected

Definition at line 34 of file SBError.cpp.

References LLDB_INSTRUMENT_VA.

Member Function Documentation

◆ __attribute__()

lldb::SBError::__attribute__ ( (format(printf, 2, 3))  ) const

◆ Clear()

void SBError::Clear ( )

Definition at line 57 of file SBError.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_up.

Referenced by lldb::SBDebugger::CreateTarget().

◆ CreateIfNeeded()

void SBError::CreateIfNeeded ( )
private

Definition at line 158 of file SBError.cpp.

References m_opaque_up.

Referenced by ref(), SetError(), SetErrorString(), SetErrorToErrno(), and SetErrorToGenericError().

◆ Fail()

bool SBError::Fail ( ) const

◆ get()

lldb_private::Status * SBError::get ( )
protected

Definition at line 165 of file SBError.cpp.

References m_opaque_up.

◆ GetCString()

const char * SBError::GetCString ( ) const

Get the error string as a NULL terminated UTF8 c-string.

This SBError object owns the returned string and this object must be kept around long enough to use the returned string.

Definition at line 49 of file SBError.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_up.

Referenced by lldb::SBDebugger::CreateTarget(), lldb::SBFrame::EvaluateExpression(), and GetDescription().

◆ GetDescription()

bool SBError::GetDescription ( lldb::SBStream description)

Definition at line 177 of file SBError.cpp.

References GetCString(), LLDB_INSTRUMENT_VA, and m_opaque_up.

◆ GetError()

uint32_t SBError::GetError ( ) const

Definition at line 85 of file SBError.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_up.

◆ GetType()

ErrorType SBError::GetType ( ) const

Definition at line 96 of file SBError.cpp.

References lldb::eErrorTypeInvalid, LLDB_INSTRUMENT_VA, and m_opaque_up.

◆ IsValid()

bool SBError::IsValid ( ) const

Definition at line 148 of file SBError.cpp.

References LLDB_INSTRUMENT_VA.

◆ operator bool()

SBError::operator bool ( ) const
explicit

Definition at line 152 of file SBError.cpp.

References LLDB_INSTRUMENT_VA.

◆ operator*()

const lldb_private::Status & SBError::operator* ( ) const
protected

Definition at line 172 of file SBError.cpp.

References m_opaque_up.

◆ operator->()

lldb_private::Status * SBError::operator-> ( )
protected

Definition at line 163 of file SBError.cpp.

References m_opaque_up.

◆ operator=()

const SBError & SBError::operator= ( const lldb::SBError rhs)

Definition at line 41 of file SBError.cpp.

References lldb_private::clone(), LLDB_INSTRUMENT_VA, and m_opaque_up.

◆ ref()

lldb_private::Status & SBError::ref ( )
protected

◆ SetError() [1/2]

void SBError::SetError ( const lldb_private::Status lldb_error)
protected

Definition at line 113 of file SBError.cpp.

References CreateIfNeeded(), and m_opaque_up.

◆ SetError() [2/2]

void SBError::SetError ( uint32_t  err,
lldb::ErrorType  type 
)

◆ SetErrorString()

void SBError::SetErrorString ( const char *  err_str)

Definition at line 132 of file SBError.cpp.

References CreateIfNeeded(), LLDB_INSTRUMENT_VA, and m_opaque_up.

Referenced by lldb::SBBreakpoint::AddNameWithErrorHandling(), lldb::SBProcess::AllocateMemory(), lldb::SBTarget::BreakpointsCreateFromFile(), lldb::SBTarget::BreakpointsWriteToFile(), lldb::SBPlatform::ConnectRemote(), lldb::SBProcess::Continue(), lldb::SBDebugger::CreateTarget(), lldb::SBProcess::DeallocateMemory(), lldb::SBProcess::Destroy(), lldb::SBProcess::Detach(), lldb::SBPlatform::ExecuteConnected(), lldb::SBPlatform::Get(), lldb::SBProcess::GetMemoryRegionInfo(), lldb::SBProcess::GetNumSupportedHardwareWatchpoints(), lldb::SBThread::JumpToLine(), lldb::SBProcess::Kill(), lldb::SBProcess::LoadImage(), lldb::SBPlatform::MakeDirectory(), lldb::SBProcess::ReadCStringFromMemory(), lldb::SBProcess::ReadMemory(), lldb::SBTarget::ReadMemory(), lldb::SBProcess::ReadPointerFromMemory(), lldb::SBProcess::ReadUnsignedFromMemory(), lldb::SBThread::ResumeNewPlan(), SBError(), lldb::SBProcess::SendEventData(), lldb::SBPlatform::SetFilePermissions(), lldb::SBDebugger::SetInputString(), lldb::SBBreakpoint::SetScriptCallbackBody(), lldb::SBBreakpointLocation::SetScriptCallbackBody(), lldb::SBBreakpointLocation::SetScriptCallbackFunction(), lldb::SBBreakpoint::SetScriptCallbackFunction(), lldb::SBBreakpointName::SetScriptCallbackFunction(), lldb::SBTarget::SetSectionLoadAddress(), lldb::SBProcess::Signal(), lldb::SBThread::StepOverUntil(), lldb::SBProcess::Stop(), lldb::SBProcess::UnloadImage(), and lldb::SBProcess::WriteMemory().

◆ SetErrorToErrno()

void SBError::SetErrorToErrno ( )

Definition at line 118 of file SBError.cpp.

References CreateIfNeeded(), LLDB_INSTRUMENT_VA, and m_opaque_up.

◆ SetErrorToGenericError()

void SBError::SetErrorToGenericError ( )

Definition at line 125 of file SBError.cpp.

References CreateIfNeeded(), LLDB_INSTRUMENT_VA, and m_opaque_up.

◆ Success()

bool SBError::Success ( ) const

Friends And Related Function Documentation

◆ lldb_private::python::SWIGBridge

friend class lldb_private::python::SWIGBridge
friend

Definition at line 98 of file SBError.h.

◆ lldb_private::ScriptInterpreter

friend class lldb_private::ScriptInterpreter
friend

Definition at line 97 of file SBError.h.

◆ SBBreakpoint

friend class SBBreakpoint
friend

Definition at line 75 of file SBError.h.

◆ SBBreakpointLocation

friend class SBBreakpointLocation
friend

Definition at line 76 of file SBError.h.

◆ SBBreakpointName

friend class SBBreakpointName
friend

Definition at line 77 of file SBError.h.

◆ SBCommandReturnObject

friend class SBCommandReturnObject
friend

Definition at line 78 of file SBError.h.

◆ SBCommunication

friend class SBCommunication
friend

Definition at line 79 of file SBError.h.

◆ SBData

friend class SBData
friend

Definition at line 81 of file SBError.h.

◆ SBDebugger

friend class SBDebugger
friend

Definition at line 82 of file SBError.h.

◆ SBFile

friend class SBFile
friend

Definition at line 83 of file SBError.h.

◆ SBFormat

friend class SBFormat
friend

Definition at line 84 of file SBError.h.

◆ SBHostOS

friend class SBHostOS
friend

Definition at line 85 of file SBError.h.

◆ SBPlatform

friend class SBPlatform
friend

Definition at line 86 of file SBError.h.

◆ SBProcess

friend class SBProcess
friend

Definition at line 87 of file SBError.h.

◆ SBReproducer

friend class SBReproducer
friend

Definition at line 88 of file SBError.h.

◆ SBSaveCoreOptions

friend class SBSaveCoreOptions
friend

Definition at line 80 of file SBError.h.

◆ SBStructuredData

friend class SBStructuredData
friend

Definition at line 89 of file SBError.h.

◆ SBTarget

friend class SBTarget
friend

Definition at line 90 of file SBError.h.

◆ SBThread

friend class SBThread
friend

Definition at line 91 of file SBError.h.

◆ SBTrace

friend class SBTrace
friend

Definition at line 92 of file SBError.h.

◆ SBValue

friend class SBValue
friend

Definition at line 93 of file SBError.h.

◆ SBValueList

friend class SBValueList
friend

Definition at line 94 of file SBError.h.

◆ SBWatchpoint

friend class SBWatchpoint
friend

Definition at line 95 of file SBError.h.

Member Data Documentation

◆ m_opaque_up

std::unique_ptr<lldb_private::Status> lldb::SBError::m_opaque_up
private

The documentation for this class was generated from the following files: