LLDB mainline
Public Member Functions | Protected 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 ()
 
void Increment (uint64_t amount, const char *description=nullptr)
 

Protected Member Functions

lldb_private::Progressref () const
 

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/2]

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/2]

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()

SBProgress::~SBProgress ( )
default

Member Function Documentation

◆ Increment()

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

Definition at line 37 of file SBProgress.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_up.

◆ ref()

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

Definition at line 43 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 62 of file SBProgress.h.

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


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