GCC Middle and Back End API Reference
diagnostic_execution_path Struct Reference
Inheritance diagram for diagnostic_execution_path:
Collaboration diagram for diagnostic_execution_path:

Public Member Functions

 diagnostic_execution_path (const diagnostics::logical_locations::manager &logical_loc_mgr)
diagnostics::paths::event_id_t add_event_va (const diagnostic_physical_location *physical_loc, const diagnostic_logical_location *logical_loc, unsigned stack_depth, std::unique_ptr< diagnostic_graph > state_graph, const char *gmsgid, va_list *args)
diagnostic_event_id_t add_event_via_msg_buf (const diagnostic_physical_location *physical_loc, const diagnostic_logical_location *logical_loc, unsigned stack_depth, std::unique_ptr< diagnostic_graph > state_graph, std::unique_ptr< diagnostic_message_buffer > msg_buf)
unsigned num_events () const final override
const diagnostics::paths::eventget_event (int idx) const final override
unsigned num_threads () const final override
const diagnostics::paths::threadget_thread (diagnostics::paths::thread_id_t) const final override
bool same_function_p (int event_idx_a, int event_idx_b) const final override
bool interprocedural_p () const
bool multithreaded_p () const
const logical_locations::manager & get_logical_location_manager () const

Private Member Functions

bool get_first_event_in_a_function (unsigned *out_idx) const

Private Attributes

libgdiagnostics_path_thread m_thread
std::vector< std::unique_ptr< libgdiagnostics_path_event > > m_events
const logical_locations::manager & m_logical_loc_mgr

Detailed Description

This has to be a "struct" as it is exposed in the C API.   

Constructor & Destructor Documentation

◆ diagnostic_execution_path()

diagnostic_execution_path::diagnostic_execution_path ( const diagnostics::logical_locations::manager & logical_loc_mgr)
inline

Member Function Documentation

◆ add_event_va()

diagnostics::paths::event_id_t diagnostic_execution_path::add_event_va ( const diagnostic_physical_location * physical_loc,
const diagnostic_logical_location * logical_loc,
unsigned stack_depth,
std::unique_ptr< diagnostic_graph > state_graph,
const char * gmsgid,
va_list * args )
inline

References m_events.

◆ add_event_via_msg_buf()

diagnostic_event_id_t diagnostic_execution_path::add_event_via_msg_buf ( const diagnostic_physical_location * physical_loc,
const diagnostic_logical_location * logical_loc,
unsigned stack_depth,
std::unique_ptr< diagnostic_graph > state_graph,
std::unique_ptr< diagnostic_message_buffer > msg_buf )
inline

References m_events.

◆ get_event()

const diagnostics::paths::event & diagnostic_execution_path::get_event ( int idx) const
inlinefinaloverridevirtual

Implements diagnostics::paths::path.

References m_events.

◆ get_first_event_in_a_function()

bool path::get_first_event_in_a_function ( unsigned * out_idx) const
privateinherited
class diagnostics::paths::path.   
Subroutine of path::interprocedural_p.
Look for the first event in this path that is within a function
i.e. has a non-null logical location for which function_p is true.
If found, write its index to *OUT_IDX and return true.
Otherwise return false.   

References get_event(), diagnostics::paths::event::get_logical_location(), i, m_logical_loc_mgr, and num_events().

Referenced by interprocedural_p().

◆ get_logical_location_manager()

const logical_locations::manager & diagnostics::paths::path::get_logical_location_manager ( ) const
inlineinherited

◆ get_thread()

const diagnostics::paths::thread & diagnostic_execution_path::get_thread ( diagnostics::paths::thread_id_t ) const
inlinefinaloverridevirtual

Implements diagnostics::paths::path.

References m_thread.

◆ interprocedural_p()

bool path::interprocedural_p ( ) const
inherited
Return true if the events in this path involve more than one
function, or false if it is purely intraprocedural.   

References get_event(), get_first_event_in_a_function(), diagnostics::paths::event::get_stack_depth(), i, num_events(), and same_function_p().

◆ multithreaded_p()

bool diagnostics::paths::path::multithreaded_p ( ) const
inherited

◆ num_events()

unsigned diagnostic_execution_path::num_events ( ) const
inlinefinaloverridevirtual

Implements diagnostics::paths::path.

References final(), and m_events.

◆ num_threads()

unsigned diagnostic_execution_path::num_threads ( ) const
inlinefinaloverridevirtual

Implements diagnostics::paths::path.

References final().

◆ same_function_p()

bool diagnostic_execution_path::same_function_p ( int event_idx_a,
int event_idx_b ) const
inlinefinaloverridevirtual

Implements diagnostics::paths::path.

References m_events.

Field Documentation

◆ m_events

std::vector<std::unique_ptr<libgdiagnostics_path_event> > diagnostic_execution_path::m_events
private

◆ m_logical_loc_mgr

const logical_locations::manager& diagnostics::paths::path::m_logical_loc_mgr
privateinherited

◆ m_thread

libgdiagnostics_path_thread diagnostic_execution_path::m_thread
private

The documentation for this struct was generated from the following file: