LLDB mainline
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
 Get the error code.
SBStructuredData GetErrorData () const
 Get the error in machine-readable form.
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 (lldb_private::Status &&error)
lldb_private::Statusget ()
lldb_private::Statusoperator-> ()
const lldb_private::Statusoperator* () const
lldb_private::Statusref ()
void SetError (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 SBFrame
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 23 of file SBError.cpp.

References LLDB_INSTRUMENT_VA.

Referenced by lldb_private::python::SWIGBridge, operator=(), SBError(), and ~SBError().

◆ SBError() [2/4]

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

Definition at line 25 of file SBError.cpp.

References LLDB_INSTRUMENT_VA, m_opaque_up, and SBError().

◆ SBError() [3/4]

SBError::SBError ( const char * message)

Definition at line 32 of file SBError.cpp.

References LLDB_INSTRUMENT_VA, and SetErrorString().

◆ ~SBError()

◆ SBError() [4/4]

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

Definition at line 38 of file SBError.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_up.

Member Function Documentation

◆ __attribute__()

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

References GetDescription(), and IsValid().

◆ Clear()

void SBError::Clear ( )

Definition at line 63 of file SBError.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_up.

Referenced by lldb::SBDebugger::CreateTarget(), and ~SBError().

◆ CreateIfNeeded()

void SBError::CreateIfNeeded ( )
private

Definition at line 182 of file SBError.cpp.

References m_opaque_up.

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

◆ Fail()

bool SBError::Fail ( ) const

◆ get()

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

Definition at line 189 of file SBError.cpp.

References m_opaque_up.

Referenced by lldb_private::python::SWIGBridge.

◆ 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 55 of file SBError.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_up.

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

◆ GetDescription()

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

Definition at line 201 of file SBError.cpp.

References GetCString(), LLDB_INSTRUMENT_VA, and m_opaque_up.

Referenced by __attribute__().

◆ GetError()

uint32_t SBError::GetError ( ) const

Get the error code.

Definition at line 91 of file SBError.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_up.

Referenced by ~SBError().

◆ GetErrorData()

SBStructuredData SBError::GetErrorData ( ) const

Get the error in machine-readable form.

Particularly useful for compiler diagnostics.

Definition at line 102 of file SBError.cpp.

References LLDB_INSTRUMENT_VA, lldb::SBStructuredData::m_impl_up, m_opaque_up, and SBStructuredData.

Referenced by ~SBError().

◆ GetType()

ErrorType SBError::GetType ( ) const

Definition at line 114 of file SBError.cpp.

References lldb::eErrorTypeInvalid, LLDB_INSTRUMENT_VA, and m_opaque_up.

Referenced by ~SBError().

◆ IsValid()

bool SBError::IsValid ( ) const

Definition at line 172 of file SBError.cpp.

References LLDB_INSTRUMENT_VA.

Referenced by __attribute__().

◆ operator bool()

SBError::operator bool ( ) const
explicit

Definition at line 176 of file SBError.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_up.

◆ operator*()

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

Definition at line 196 of file SBError.cpp.

References m_opaque_up.

Referenced by lldb_private::python::SWIGBridge.

◆ operator->()

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

Definition at line 187 of file SBError.cpp.

References m_opaque_up.

Referenced by lldb_private::python::SWIGBridge.

◆ operator=()

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

Definition at line 45 of file SBError.cpp.

References LLDB_INSTRUMENT_VA, m_opaque_up, and SBError().

Referenced by ~SBError().

◆ ref()

◆ SetError() [1/2]

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

Definition at line 131 of file SBError.cpp.

References CreateIfNeeded(), and m_opaque_up.

◆ SetError() [2/2]

◆ SetErrorString()

◆ SetErrorToErrno()

void SBError::SetErrorToErrno ( )

Definition at line 136 of file SBError.cpp.

References CreateIfNeeded(), lldb_private::Status::FromErrno(), LLDB_INSTRUMENT_VA, and m_opaque_up.

Referenced by ~SBError().

◆ SetErrorToGenericError()

void SBError::SetErrorToGenericError ( )

Definition at line 143 of file SBError.cpp.

References CreateIfNeeded(), LLDB_INSTRUMENT_VA, m_opaque_up, and lldb_private::Status.

Referenced by ~SBError().

◆ Success()

◆ lldb_private::python::SWIGBridge

friend class lldb_private::python::SWIGBridge
friend

Definition at line 104 of file SBError.h.

References error(), get(), operator*(), operator->(), ref(), SBError(), and SetError().

◆ lldb_private::ScriptInterpreter

friend class lldb_private::ScriptInterpreter
friend

Definition at line 103 of file SBError.h.

◆ SBBreakpoint

friend class SBBreakpoint
friend

Definition at line 80 of file SBError.h.

References SBBreakpoint.

Referenced by SBBreakpoint.

◆ SBBreakpointLocation

friend class SBBreakpointLocation
friend

Definition at line 81 of file SBError.h.

References SBBreakpointLocation.

Referenced by SBBreakpointLocation.

◆ SBBreakpointName

friend class SBBreakpointName
friend

Definition at line 82 of file SBError.h.

References SBBreakpointName.

Referenced by SBBreakpointName.

◆ SBCommandReturnObject

friend class SBCommandReturnObject
friend

Definition at line 83 of file SBError.h.

References SBCommandReturnObject.

Referenced by SBCommandReturnObject.

◆ SBCommunication

friend class SBCommunication
friend

Definition at line 84 of file SBError.h.

References SBCommunication.

Referenced by SBCommunication.

◆ SBData

friend class SBData
friend

Definition at line 86 of file SBError.h.

References SBData.

Referenced by SBData.

◆ SBDebugger

friend class SBDebugger
friend

Definition at line 87 of file SBError.h.

References SBDebugger.

Referenced by SBDebugger.

◆ SBFile

friend class SBFile
friend

Definition at line 88 of file SBError.h.

References SBFile.

Referenced by SBFile.

◆ SBFormat

friend class SBFormat
friend

Definition at line 89 of file SBError.h.

References SBFormat.

Referenced by SBFormat.

◆ SBFrame

friend class SBFrame
friend

Definition at line 90 of file SBError.h.

References SBFrame.

Referenced by SBFrame.

◆ SBHostOS

friend class SBHostOS
friend

Definition at line 91 of file SBError.h.

References SBHostOS.

Referenced by SBHostOS.

◆ SBPlatform

friend class SBPlatform
friend

Definition at line 92 of file SBError.h.

References SBPlatform.

Referenced by SBPlatform.

◆ SBProcess

friend class SBProcess
friend

Definition at line 93 of file SBError.h.

References SBProcess.

Referenced by SBProcess.

◆ SBReproducer

friend class SBReproducer
friend

Definition at line 94 of file SBError.h.

References SBReproducer.

Referenced by SBReproducer.

◆ SBSaveCoreOptions

friend class SBSaveCoreOptions
friend

Definition at line 85 of file SBError.h.

References SBSaveCoreOptions.

Referenced by SBSaveCoreOptions.

◆ SBStructuredData

friend class SBStructuredData
friend

Definition at line 95 of file SBError.h.

References SBStructuredData.

Referenced by GetErrorData(), SBStructuredData, and ~SBError().

◆ SBTarget

friend class SBTarget
friend

Definition at line 96 of file SBError.h.

References SBTarget.

Referenced by SBTarget.

◆ SBThread

friend class SBThread
friend

Definition at line 97 of file SBError.h.

References SBThread.

Referenced by SBThread.

◆ SBTrace

friend class SBTrace
friend

Definition at line 98 of file SBError.h.

References SBTrace.

Referenced by SBTrace.

◆ SBValue

friend class SBValue
friend

Definition at line 99 of file SBError.h.

References SBValue.

Referenced by SBValue.

◆ SBValueList

friend class SBValueList
friend

Definition at line 100 of file SBError.h.

References SBValueList.

Referenced by SBValueList.

◆ SBWatchpoint

friend class SBWatchpoint
friend

Definition at line 101 of file SBError.h.

References SBWatchpoint.

Referenced by SBWatchpoint.

Member Data Documentation

◆ m_opaque_up


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