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

A Progress indicator helper class. More...

#include <SBProgress.h>

Public Member Functions

 SBProgress (const char *title, const char *details, SBDebugger &debugger)
 Construct a progress object with a title, details and a given debugger.
 
 SBProgress (const char *title, const char *details, uint64_t total_units, SBDebugger &debugger)
 Construct a progress object with a title, details, the total units of work to be done, and a given debugger.
 
 SBProgress (SBProgress &&rhs)
 
 ~SBProgress ()
 
void Increment (uint64_t amount, const char *description=nullptr)
 
void Finalize ()
 Explicitly finalize an SBProgress, this can be used to terminate a progress on command instead of waiting for a garbage collection or other RAII to destroy the contained progress object.
 

Protected Member Functions

lldb_private::Progressref () const
 

Private Member Functions

 SBProgress (const SBProgress &rhs)=delete
 
const SBProgressoperator= (const SBProgress &rhs)=delete
 

Private Attributes

std::unique_ptr< lldb_private::Progressm_opaque_up
 

Detailed Description

A Progress indicator helper class.

Any potentially long running sections of code in LLDB should report progress so that clients are aware of delays that might appear during debugging. Delays commonly include indexing debug information, parsing symbol tables for object files, downloading symbols from remote repositories, and many more things.

The Progress class helps make sure that progress is correctly reported and will always send an initial progress update, updates when Progress::Increment() is called, and also will make sure that a progress completed update is reported even if the user doesn't explicitly cause one to be sent.

Definition at line 30 of file SBProgress.h.

Constructor & Destructor Documentation

◆ SBProgress() [1/4]

SBProgress::SBProgress ( const char *  title,
const char *  details,
SBDebugger debugger 
)

Construct a progress object with a title, details and a given debugger.

Parameters
titleThe title of the progress object.
detailsThe details of the progress object.
debuggerThe debugger for this progress object to report to.

Definition at line 15 of file SBProgress.cpp.

References lldb_private::Progress::eExternal, lldb::SBDebugger::get(), LLDB_INSTRUMENT_VA, and m_opaque_up.

◆ SBProgress() [2/4]

SBProgress::SBProgress ( const char *  title,
const char *  details,
uint64_t  total_units,
SBDebugger debugger 
)

Construct a progress object with a title, details, the total units of work to be done, and a given debugger.

Parameters
titleThe title of the progress object.
detailsThe details of the progress object.
total_unitsThe total number of units of work to be done.
debuggerThe debugger for this progress object to report to.

Definition at line 25 of file SBProgress.cpp.

References lldb_private::Progress::eExternal, lldb::SBDebugger::get(), LLDB_INSTRUMENT_VA, and m_opaque_up.

◆ SBProgress() [3/4]

SBProgress::SBProgress ( SBProgress &&  rhs)

Definition at line 35 of file SBProgress.cpp.

◆ ~SBProgress()

SBProgress::~SBProgress ( )
default

◆ SBProgress() [4/4]

lldb::SBProgress::SBProgress ( const SBProgress rhs)
privatedelete

Member Function Documentation

◆ Finalize()

void SBProgress::Finalize ( )

Explicitly finalize an SBProgress, this can be used to terminate a progress on command instead of waiting for a garbage collection or other RAII to destroy the contained progress object.

Definition at line 52 of file SBProgress.cpp.

References m_opaque_up.

◆ Increment()

void SBProgress::Increment ( uint64_t  amount,
const char *  description = nullptr 
)

Definition at line 40 of file SBProgress.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_up.

◆ operator=()

const SBProgress & lldb::SBProgress::operator= ( const SBProgress rhs)
privatedelete

◆ ref()

lldb_private::Progress & SBProgress::ref ( ) const
protected

Definition at line 61 of file SBProgress.cpp.

References m_opaque_up.

Member Data Documentation

◆ m_opaque_up

std::unique_ptr<lldb_private::Progress> lldb::SBProgress::m_opaque_up
private

Definition at line 74 of file SBProgress.h.

Referenced by Finalize(), Increment(), ref(), and SBProgress().


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